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

nvsg::Path Class Reference

Path representation in the tree. More...

#include <Path.h>

Inheritance diagram for nvsg::Path:

Inheritance graph
[legend]
Collaboration diagram for nvsg::Path:

Collaboration graph
[legend]
List of all members.

Public Methods

NVSG_API Path (void)
 Default constructor. More...

NVSG_API Path (const Path &rhs)
 Copy constructor. More...

NVSG_API unsigned int getLength (void) const
 Get the the number of nodes in the path chain. More...

NVSG_API bool isEmpty (void) const
 Test on an empty path. More...

NVSG_API const NodegetHead (void) const
 Get the head node of the path. More...

NVSG_API const NodegetTail (void) const
 Get the Tail Node. More...

NVSG_API const NodegetNodeFromHead (size_t i) const
 Get the ith node from the head. More...

NVSG_API const NodegetNodeFromTail (size_t i) const
 Get the ith node from the tail. More...

NVSG_API void pop (void)
 Pop the last node off. More...

NVSG_API void push (const Node *pNode)
 Push a node at the end of the chain. More...

NVSG_API void truncate (size_t start)
 Remove all nodes from indexed node on. More...


Protected Methods

virtual NVSG_API ~Path (void)
 Prohibit explicit creation on stack by making the destructor protected. More...


Detailed Description

Path representation in the tree.

A Path represents a scene graph or subgraph. It contains pointers to a chain of nodes, each being a child of the previous.


Constructor & Destructor Documentation

NVSG_API nvsg::Path::Path void   
 

Default constructor.

NVSG_API nvsg::Path::Path const Path &    rhs
 

Copy constructor.

virtual NVSG_API nvsg::Path::~Path void    [protected, virtual]
 

Prohibit explicit creation on stack by making the destructor protected.


Member Function Documentation

unsigned int nvsg::Path::getLength void    const [inline]
 

Get the the number of nodes in the path chain.

Returns:
Th number of nodes.

bool nvsg::Path::isEmpty void    const [inline]
 

Test on an empty path.

Note:
This is possibly faster than testing the length.
Returns:
true - path is empty, false - path is not empty

const Node * nvsg::Path::getHead void    const [inline]
 

Get the head node of the path.

Returns:
The first node in the path chain.

const Node * nvsg::Path::getTail void    const [inline]
 

Get the Tail Node.

Returns:
The last node in the path chain.

const Node * nvsg::Path::getNodeFromHead size_t    i const [inline]
 

Get the ith node from the head.

Returns:
Pointer to ith node in the path chain.
Parameters:
i  Index of the desired node (0 = head node)

const Node * nvsg::Path::getNodeFromTail size_t    i const [inline]
 

Get the ith node from the tail.

Returns:
Pointer to the ith node in the path chain (from the tail)
Parameters:
i  Index of the desired node (0 = tail node)

void nvsg::Path::pop void    [inline]
 

Pop the last node off.

NVSG_API void nvsg::Path::push const Node   pNode
 

Push a node at the end of the chain.

Note:
We apply an addRef() so we do not lose the node.
Parameters:
pNode  Node to push

NVSG_API void nvsg::Path::truncate size_t    start
 

Remove all nodes from indexed node on.

Note:
We apply a removeRef().
Parameters:
start  Start index. (0 removes all nodes from the path)


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