Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

NVSGSaveTraverser Class Reference

A Traverser to traverse a scene on saving to nvsg file format. More...

#include <NVSGSaver.h>

Inheritance diagram for NVSGSaveTraverser:

Inheritance graph
[legend]
Collaboration diagram for NVSGSaveTraverser:

Collaboration graph
[legend]
List of all members.

Public Methods

 NVSGSaveTraverser ()
 Default constructor. More...

void setFILE (FILE *fh)
 Sets the FILE where the scene is to be saved to. More...


Protected Methods

void doApply (const nvsg::ViewState *pViewState, const nvsg::Scene *pScene)
 Controls saving of the scene together with a ViewState. More...

virtual void handleJitterCamera (const nvsg::JitterCamera *p, const nvsg::Node *root)
 Save a JitterCamera. More...

virtual void handleParallelCamera (const nvsg::ParallelCamera *p, const nvsg::Node *root)
 Save a ParallelCamera. More...

virtual void handlePerspectiveCamera (const nvsg::PerspectiveCamera *p, const nvsg::Node *root)
 Save a PerspectiveCamera. More...

virtual void handleStereoCamera (const nvsg::StereoCamera *p, const nvsg::Node *root)
 Save a StereoCamera. More...

virtual void handleGeoNode (const nvsg::GeoNode *p)
 Save a GeoNode. More...

virtual void handleGroup (const nvsg::Group *p)
 Save a Group. More...

virtual void handleTransform (const nvsg::Transform *p)
 Save a Transform. More...

virtual void handleAnimatedTransform (const nvsg::AnimatedTransform *p)
 Save an AnimatedTransform. More...

virtual void handleLOD (const nvsg::LOD *p)
 Save a LOD. More...

virtual void handleSwitch (const nvsg::Switch *p)
 Save a Switch. More...

virtual void handleDirectedLight (const nvsg::DirectedLight *p)
 Save a DirectedLight. More...

virtual void handlePointLight (const nvsg::PointLight *p)
 Save a PointLight. More...

virtual void handleSpotLight (const nvsg::SpotLight *p)
 Save a SpotLight. More...

virtual void handleStateSet (const nvsg::StateSet *p)
 Save a StateSet. More...

virtual void handleCgFx (const nvsg::CgFx *p)
 Save a CgFx. More...

virtual void handleFaceAttribute (const nvsg::FaceAttribute *p)
 Save a FaceAttribute. More...

virtual void handleMaterial (const nvsg::Material *p)
 Save a Material. More...

virtual void handleTextureAttribute (const nvsg::TextureAttribute *p)
 Save a TextureAttribute. More...

virtual void handleTextureAttributeItem (const nvsg::TextureAttributeItem *p, size_t tu)
 Save a TextureAttributeItem. More...

virtual void handleTriangles (const nvsg::Triangles *p)
 Save a Triangles. More...

virtual void handleAnimatedTriangles (const nvsg::AnimatedTriangles *p)
 Save a AnimatedTriangles. More...

virtual void handleSkinnedTriangles (const nvsg::SkinnedTriangles *p)
 Save a SkinnedTriangles. More...

virtual void handleTriStrips (const nvsg::TriStrips *p)
 Save a TriStrips. More...

virtual void handleQuads (const nvsg::Quads *p)
 Save a Quads. More...

virtual void handleAnimatedQuads (const nvsg::AnimatedQuads *p)
 Save a AnimatedQuads. More...

virtual void handleQuadStrips (const nvsg::QuadStrips *p)
 Save a QuadStrips. More...

virtual void handleFramedTrafoAnimation (const nvsg::FramedAnimation< nvmath::Trafo > *p)
 Save a FramedTrafoAnimation. More...

virtual void handleFramedVNVectorAnimation (const nvsg::FramedAnimation< nvsg::VNVector > *p)
 Save a FramedVNVectorAnimation. More...

virtual void handleLinearInterpolatedTrafoAnimation (const nvsg::LinearInterpolatedAnimation< nvmath::Trafo > *p)
 Save a LinearInterpolatedTrafoAnimation. More...

virtual void handleLinearInterpolatedVNVectorAnimation (const nvsg::LinearInterpolatedAnimation< nvsg::VNVector > *p)
 Save a LinearInterpolatedVNVectorAnimation. More...


Detailed Description

A Traverser to traverse a scene on saving to nvsg file format.


Constructor & Destructor Documentation

NVSGSaveTraverser::NVSGSaveTraverser  
 

Default constructor.


Member Function Documentation

void NVSGSaveTraverser::setFILE FILE *    fh
 

Sets the FILE where the scene is to be saved to.

Parameters:
fh  FILE to save to

void NVSGSaveTraverser::doApply const nvsg::ViewState   pViewState,
const nvsg::Scene   pScene
[protected, virtual]
 

Controls saving of the scene together with a ViewState.

Note:
This version ignores the ViewState and the Tweakables of the CgFx objects.
Parameters:
pViewState  ViewState to save
pScene  Scene to save

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleJitterCamera const nvsg::JitterCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Save a JitterCamera.

If the JitterCamera p is encountered on saving the first time, it's base camera is traversed with root and it's name is registered.

Note:
The NVSG file format does not support a JitterCamera, so it isn't saved as such.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleParallelCamera const nvsg::ParallelCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Save a ParallelCamera.

If the ParallelCarmera p is encountered on saving the first time, it is traversed with root and then it's saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handlePerspectiveCamera const nvsg::PerspectiveCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Save a PerspectiveCamera.

If the PerspectiveCamera p is encountered on saving the first time, it is traversed with root and then it's saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleStereoCamera const nvsg::StereoCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Save a StereoCamera.

If the StereoCamera p is encountered on saving the first time, it's associated monoscopic camera is traversed with root and it's name is registered.

Note:
The NVSG file format does not support a StereoCamera, so it isn't saved as such.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleGeoNode const nvsg::GeoNode   p [protected, virtual]
 

Save a GeoNode.

If the GeoNode p is encountered on saving the first time, it is traversed and then saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleGroup const nvsg::Group   p [protected, virtual]
 

Save a Group.

If the Group p is encountered on saving the first time, it is traversed and then saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleTransform const nvsg::Transform   p [protected, virtual]
 

Save a Transform.

If the Transform p is encountered on saving the first time, it is traversed and then saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleAnimatedTransform const nvsg::AnimatedTransform   p [protected, virtual]
 

Save an AnimatedTransform.

If the AnimatedTransform p is encountered on saving the first time, it first is traversed as a Transform, then it's associated Animation is traversed, and finally it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleLOD const nvsg::LOD   p [protected, virtual]
 

Save a LOD.

If the LOD p is encountered on saving the first time, all it's children are traversed, no matter which might be currently active, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleSwitch const nvsg::Switch   p [protected, virtual]
 

Save a Switch.

If the Switch p is encountered on saving the first time, all it's children are traversed, no matter which might be currently active, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleDirectedLight const nvsg::DirectedLight   p [protected, virtual]
 

Save a DirectedLight.

If the DirectedLight p is encountered on saving the first time, first any associated Animation is traversed, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handlePointLight const nvsg::PointLight   p [protected, virtual]
 

Save a PointLight.

If the PointLight p is encountered on saving the first time, first any associated Animation is traversed, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleSpotLight const nvsg::SpotLight   p [protected, virtual]
 

Save a SpotLight.

If the SpotLight p is encountered on saving the first time, first any associated Animation is traversed, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleStateSet const nvsg::StateSet   p [protected, virtual]
 

Save a StateSet.

If the StateSet p is encountered on saving, it is stored as the current one. Then, if it's the first time, it is traversed and then saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleCgFx const nvsg::CgFx   p [protected, virtual]
 

Save a CgFx.

If the CgFx p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleFaceAttribute const nvsg::FaceAttribute   p [protected, virtual]
 

Save a FaceAttribute.

If the FaceAttribute p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleMaterial const nvsg::Material   p [protected, virtual]
 

Save a Material.

If the Material p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleTextureAttribute const nvsg::TextureAttribute   p [protected, virtual]
 

Save a TextureAttribute.

If the TextureAttribute p is encountered on saving the first time, it is traversed and then saved .

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleTextureAttributeItem const nvsg::TextureAttributeItem   p,
size_t    tu
[protected, virtual]
 

Save a TextureAttributeItem.

If the TextureAttributeItem p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleTriangles const nvsg::Triangles   p [protected, virtual]
 

Save a Triangles.

If the Triangles p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleAnimatedTriangles const nvsg::AnimatedTriangles   p [protected, virtual]
 

Save a AnimatedTriangles.

If the AnimatedTriangles p is encountered on saving the first time, any associated Animation is traversed, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleSkinnedTriangles const nvsg::SkinnedTriangles   p [protected, virtual]
 

Save a SkinnedTriangles.

If the SkinnedTriangles p is encountered on saving the first time, any associated Animations are traversed, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleTriStrips const nvsg::TriStrips   p [protected, virtual]
 

Save a TriStrips.

If the TriStrips p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleQuads const nvsg::Quads   p [protected, virtual]
 

Save a Quads.

If the Quads p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleAnimatedQuads const nvsg::AnimatedQuads   p [protected, virtual]
 

Save a AnimatedQuads.

If the AnimatedQuads p is encountered on saving the first time, any associated Animation is traversed, then it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleQuadStrips const nvsg::QuadStrips   p [protected, virtual]
 

Save a QuadStrips.

If the QuadStrips p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleFramedTrafoAnimation const nvsg::FramedAnimation< nvmath::Trafo > *    p [protected, virtual]
 

Save a FramedTrafoAnimation.

If the FramedTrafoAnimation p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleFramedVNVectorAnimation const nvsg::FramedAnimation< nvsg::VNVector > *    p [protected, virtual]
 

Save a FramedVNVectorAnimation.

If the FramedVNVectorAnimation p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleLinearInterpolatedTrafoAnimation const nvsg::LinearInterpolatedAnimation< nvmath::Trafo > *    p [protected, virtual]
 

Save a LinearInterpolatedTrafoAnimation.

If the LinearInterpolatedTrafoAnimation p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.

virtual void NVSGSaveTraverser::handleLinearInterpolatedVNVectorAnimation const nvsg::LinearInterpolatedAnimation< nvsg::VNVector > *    p [protected, virtual]
 

Save a LinearInterpolatedVNVectorAnimation.

If the LinearInterpolatedVNVectorAnimation p is encountered on saving the first time, it is saved.

Reimplemented from nvtraverser::Traverser.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:20 2005 for NVSGSDK by NVIDIA