VRUT::VRMLParser::ANode Struct Reference

basic structure for defined Transformation nodes that are hidden in Switch and will be maybe used More...

Inheritance diagram for VRUT::VRMLParser::ANode:

VRUT::VRMLParser::Node

List of all members.

Public Types

typedef std::vector< Node * > Children

Public Member Functions

 ANode (wxString name, SceneNode *sn, wxString defName=wxT(""))
 ~ANode ()
 destructs ANode, if the Light Node wasn't used than delete it
void setParam (MATRIX m)
void setParam (Node *node)
void addToScene (wxString parentUid)

Public Attributes

MATRIX mat
 transformation matrix
std::vector< Node * > children
 list of children


Detailed Description

basic structure for defined Transformation nodes that are hidden in Switch and will be maybe used

Definition at line 217 of file vrmlparser.h.


Member Typedef Documentation

typedef std::vector<Node*> VRUT::VRMLParser::ANode::Children

Definition at line 222 of file vrmlparser.h.


Constructor & Destructor Documentation

VRUT::VRMLParser::ANode::ANode ( wxString  name,
SceneNode sn,
wxString  defName = wxT("") 
) [inline]

creates ANode

Parameters:
[in] name name of Node used in VRUT scene
[in] sn pointer to scene node used in VRUT scene
[in] name used in VRML file to identify the node

Definition at line 227 of file vrmlparser.h.

00227                                                                           :Node(name,sn,defName){
00228           }

VRUT::VRMLParser::ANode::~ANode (  )  [inline]

destructs ANode, if the Light Node wasn't used than delete it

Definition at line 230 of file vrmlparser.h.

00230                   {
00231             if (remove) {
00232               for ( Children::iterator it = children.begin(); it != children.end(); it++)
00233                 delete *it;
00234             }
00235           }


Member Function Documentation

void VRUT::VRMLParser::ANode::setParam ( MATRIX  m  )  [inline]

sets transformation matrix to ANode

Parameters:
[in] m transformation matrix

Definition at line 238 of file vrmlparser.h.

00238                                  {
00239             mat = m;
00240           }

void VRUT::VRMLParser::ANode::setParam ( Node node  )  [inline]

assign new children to the ANode, transformation node

Parameters:
[in] node children to add to transformation node

Definition at line 243 of file vrmlparser.h.

00243                                     {
00244             children.push_back(node);
00245           }

void VRUT::VRMLParser::ANode::addToScene ( wxString  parentUid  )  [inline, virtual]

adds transformation node and all its children to the scene

Parameters:
[in] parentUid uid of a parent node where to insert the Light Node

Implements VRUT::VRMLParser::Node.

Definition at line 248 of file vrmlparser.h.

00248                                               {
00249             //look if it is already in the scene
00250             DefNamesListSN::iterator it = vrmlp->defNamesListSN.find(defName);
00251             if ( it != vrmlp->defNamesListSN.end()) {
00252               wxCommandEvent ev1 = Event::GET_EVT_SCENE_NODE_COPY(vrmlp->sceneID, it->second, parentUid);
00253               return;
00254             }
00255 
00256             wxCommandEvent ev = Event::GET_EVT_SCENE_NODE_TRANSFORM(vrmlp->sceneID, nodeName, mat);
00257             vrmlp->module->PostToKernel(ev);
00258             for ( Children::iterator it = children.begin(); it != children.end(); it++)
00259              (*it)->addToScene(nodeName);
00260           }


Member Data Documentation

transformation matrix

Definition at line 219 of file vrmlparser.h.

list of children

Definition at line 221 of file vrmlparser.h.


The documentation for this struct was generated from the following file:

Generated on Tue Mar 10 14:41:47 2009 for VRUT by  doxygen 1.5.5