class TdGfxPfObject : public TcGfxObject, public TcGfxPfBackgroundLoader TcGfxLoadRequest TcGfxBgLoaderObserver

Class TdGfxPfObject

Inheritance:


Public Methods

virtual ~TdGfxPfObject()
Destructor.
TdGfxPfObject(const TcUtString &name, const LoadState &ldState, const LoadType &ldType, TcUtString fname)
Constructor
TdGfxPfObject(const TcUtString &name, const LoadState &ldState, const LoadType &ldType, TcUtString fname, const TdGfxPfTravAttributes& travAtts)
Constructor
TdGfxPfObject(const TcUtString &name, const LoadState &ldState, TdGfxPfNodeAdapter *ndAdapter)
Constructor
TdGfxPfObject(TcUtString name)
Constructor
void loadFromSceneFile()
Read in a model description from a text file
virtual void clientLoadGfxObject()
Allows client extension of the loadFromSceneFile
virtual void loadGeometry(const LoadType& ldType = ASYNC)
Load geometry into the scene
virtual void unLoadGeometry()
Unload geometry from the scene
virtual void hideGeometry()
Set the APP, DRAW, ISECT traversal masks to 0.
virtual void unHideGeometry()
Restores the APP, DRAW, ISECT traversal masks to their value prior to being hidden
virtual TcUtVector3f getPosition()
Returns a vector with the current position of the object
virtual int setPosition(TcUtVector3f)
Sets the position of the object
virtual TcUtVector3f getOrientation()
Returns a vector with the current orientation of the object
virtual int setOrientation(TcUtVector3f)
Sets the orientation of the object
virtual int gfxLoadUpdate(const TcGfxPfBackgroundLoader::TcGfxLoadRequest& request)
TcGfxBgLoaderObserver method implementation
virtual void accept(TcGfxVisitor &)
Visitor pattern method.

Protected Methods

TdGfxPfObject(const TcUtString &name, const LoadState &ldState, TcGfxPfComponentAdapter *ndAdapter)
Constructor

Inherited from TcGfxObject:

Public Methods

const TcGfxObject& operator=(const TcGfxObject &right)

Inherited from TcGfxComponent:

Public Classes

enum LoadType
enum LoadState

Public Methods

virtual int addChild(TcGfxComponent *gfxNode)
virtual int removeChild(TcGfxComponent *gfxNode)
virtual void toggleLoadGeometry()
virtual void toggleHideGeometry()
virtual const TcGfxComponent* getCompByName(const TcUtString &)
virtual void triggerEvent(const TcUtString &eventName)
virtual TcActionEvent* getEvent(const TcUtString &eventName)
virtual TcActionEvent* getIterativeEvent(const TcUtString &eventName)
virtual void handleIterativeEvents()
const TcUtString& getCompName()
void addEvent(TcActionEvent *)
void removeEvent(TcActionEvent *)
void addIterativeEvent(TcActionEvent *)
void removeIterativeEvent(TcActionEvent *)
void addUserComponent(const TcUtString &name, TcUserComponent *component)
TcUserComponent* getUserComponent(const TcUtString &name)
void removeUserComponent(const TcUtString &)
const vector <TcActionEvent *> * getEventList()
TcUtString getGeoFileName()
void setGeoLoaded(bool)
void setGeoHidden(bool)
void setCompName(const TcUtString &name)
bool geoLoaded()
bool geoHidden()
TcGfxComponent* getParent()
void setParent(TcGfxComponent *)
void setDspLibComponent(TcGfxDspLibComponent *)
TcGfxDspLibComponent* getDspLibComponent() const

Protected Fields

TcUtString geometryFileName

Inherited from TcGfxPfBackgroundLoader:

Public Classes

class TcGfxLoadRequest
class TcGfxBgLoaderObserver
Nested Class TcGfxLoadRequest::TcGfxBgLoaderObserver.
TcGfxBgLoaderObserver(bool observeClass = false)
Constructor.
virtual ~TcGfxBgLoaderObserver()
Destructor.
virtual int gfxLoadUpdate(const TcGfxPfBackgroundLoader::TcGfxLoadRequest& request)
Clients must inherit from this class and override this function if they wish to be informed when the loader has completed the request
TcGfxLoadRequest()
Constructor
~TcGfxLoadRequest()
Destructor
void setCompName(const TcUtString& name)
Set the name to be set in the pfNode
void setFileName(const TcUtString& name)
Set the file name that the loader will search for in the path set by the PFPATH environment variable
void setParentName(const TcUtString& name)
Set the name of the parent node
const TcUtString& getCompName() const
Returns the component name.
const TcUtString& getFileName() const
Returns the file name.
const TcUtString& getParentName() const
Returns the parent name.
void registerRequest(TcGfxBgLoaderObserver *obs)
Registers the observer and sends the request.
void sendAnonymousRequest()
Sends an anonymous load request with no observer.
bool isAccepted()
Returns true if the the load request has been accepted.
int completeRequest()
Informs observers that the request has been completed.

Public Methods

static void addRequest(TcGfxLoadRequest *req)
void initSharedMem()
void handleRequest()
void setPfScene(pfScene *scene)
void setPfNav(pfDCS *nav)
static void backgroundLoadCB(void *data)
static pfNode* manualPfLookup(pfGroup *, const TcUtString&)

Protected Classes

struct TcGfxPfSharedLoaderData

Documentation

Class TdGfxPfObject. It contains information about an object that can be drawn in the scene.

Role: This is the development Graphics class for Performer leaf nodes. Clients can use it as is or extend its functionality by deriving a custom class.

Responsibilities: This class implements methods that enable clients to physically load and unload the object out of performer memory (pfdLoad) as well as the ability to hide and unhide the object.

virtual ~TdGfxPfObject()
Destructor.

TdGfxPfObject(const TcUtString &name, const LoadState &ldState, const LoadType &ldType, TcUtString fname)
Constructor
Parameters:
name - String name given to TcGfxComponent and pfNode.
ldState - Determines whether an object is loaded at instantiation.
ldType - Determines whether an object is synchronously or asynchronously loaded
fname - Specifies the file name that pfdLoad will be sent.

TdGfxPfObject(const TcUtString &name, const LoadState &ldState, const LoadType &ldType, TcUtString fname, const TdGfxPfTravAttributes& travAtts)
Constructor. An object should cannnot be instantiated with ldState == LOADED and ldType == ASYNC since asynchronous loading requires the TdGfxPfObject to be attached to a parent. This request will be ignored.
Parameters:
name - String name given to TcGfxComponent and pfNode.
ldState - Determines whether an object is loaded at instantiation.
ldType - Determines whether an object is synchronously or asynchronously loaded.
fname - Specifies the file name that pfdLoad will be sent.
travAtts - Specifies traversal attributes for one of DRAW, ISECT or CULL. Additional masks can be set by a setTravMask call on the pfComponentAdapter.

TdGfxPfObject(const TcUtString &name, const LoadState &ldState, TdGfxPfNodeAdapter *ndAdapter)
Constructor
Parameters:
name - String name given to TcGfxComponent and pfNode.
ldState - Determines whether an object is loaded at instantiation.
ndAdapter - A pre-instantiated pfNodeAdapter that implements loadFile()

TdGfxPfObject(TcUtString name)
Constructor. This must have its TcGfxPfComponentAdapter explicitly set.
Parameters:
name - String name given to TcGfxComponent and pfNode.

void loadFromSceneFile()
Read in a model description from a text file. Not yet implemented.

virtual void clientLoadGfxObject()
Allows client extension of the loadFromSceneFile. Not yet implemented.

virtual void loadGeometry(const LoadType& ldType = ASYNC)
Load geometry into the scene. This method will invoke the performer loader either in the main process or via the DBASE process.
Parameters:
ldType - Determines whether a synchrnous or asynchronous (using DBASE process) is performed.

virtual void unLoadGeometry()
Unload geometry from the scene. This method will remove the pfNode from the parent and pfDelete it, removing it from memory. An error will be displayed to the console if pfDelete is not successful.

virtual void hideGeometry()
Set the APP, DRAW, ISECT traversal masks to 0.

virtual void unHideGeometry()
Restores the APP, DRAW, ISECT traversal masks to their value prior to being hidden

virtual TcUtVector3f getPosition()
Returns a vector with the current position of the object. Not yet implemented.

virtual int setPosition(TcUtVector3f)
Sets the position of the object. Not yet implemented.

virtual TcUtVector3f getOrientation()
Returns a vector with the current orientation of the object. Not yet implemented.

virtual int setOrientation(TcUtVector3f)
Sets the orientation of the object. Not yet implemented.

virtual int gfxLoadUpdate(const TcGfxPfBackgroundLoader::TcGfxLoadRequest& request)
TcGfxBgLoaderObserver method implementation. This method is invoked when a load request is completed.

virtual void accept(TcGfxVisitor &)
Visitor pattern method.

TdGfxPfObject(const TcUtString &name, const LoadState &ldState, TcGfxPfComponentAdapter *ndAdapter)
Constructor. This constructor enables extension to the TdGfxPfObject class. It is useful when you want to add TdGfxPfObjects that have differing load and unload behavior than a typicial TdGfxPfObject which is loaded from a pfdLoad() call and expects the geoFileName member to be set. The client is responsible for attaching and unattaching the pfNode to the parent as a result of calls to loadGeometry or unLoadGeometry.
Parameters:
name - String name given to TcGfxComponent and pfNode.
ldState - Determines whether an object is loaded at instantiation.
ndAdapter - A pre-instantiated pfNodeAdapter that implements loadFile()


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de