Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

VPSceneNode Class Reference

Base class for objects that compose a scene graph. More...

#include <vpscenenode.h>

Inheritance diagram for VPSceneNode:

VPMemoryObj VPGraphicObj VPLight VPTransform VPBox VPCone VPCurve VPCylinder VPImage VPMesh VPMeshObject VPSphere VPDirectionalLight VPPointLight VPSpotLight VPJoint List of all members.

Public Types

enum  TypeID {
  NONE, GRAPHIC_OBJ, BOX, CONE,
  CURVE, BEZIER, CYLINDER, IMAGE,
  IMAGE_2D, VOLUME, MESH_OBJECT, SPHERE,
  JOINT, BIAXIAL_JOINT, CONDYLAR_JOINT, ELLIPSOID_JOINT,
  SADDLE_JOINT, PLANE_JOINT, POLYAXIAL_JOINT, UNIAXIAL_JOINT,
  HINGE_JOINT, PIVOT_JOINT
}

Public Member Functions

 VPSceneNode ()
 Creates an uninitialized scene node.
 VPSceneNode (const VPSceneNode &node)
virtual ~VPSceneNode ()
VPSceneNodeoperator= (const VPSceneNode &node)
const std::string & GetDescription () const
 Returns a copy of the object's description.
void SetDescription (const std::string &desc)
 Changes the object's description.
void AddChild (const VPSceneNode &child)
 Add a child at the end of child list.
virtual bool DrawOGL () const
 Recursive drawing using OpenGL commands.
virtual TypeID GetID () const
void AutoDeleteChildren () const
 Deletes (dealocate memory) recursively all children marked as 'autoDelete'.

Protected Member Functions

virtual bool DrawInstanceOGL () const
 Non-recursive drawing - should be overriden by every derived clas.

Protected Attributes

std::list< const VPSceneNode * > childList
 Child list.
std::string description
 Textual identification.

Detailed Description

Base class for objects that compose a scene graph.

A SceneNode is something directly related to the rendering engine such as shapes (VPGraphicObj), transformations (VPTransform) and lights (VPLight). Several nodes together create an environment (VPScene) that is draw every rendering cicle. SceneNodes have childs to allow creating a hierarchy of objects. This class should be considered abstract.

Definition at line 22 of file vpscenenode.h.


Member Enumeration Documentation

enum VPSceneNode::TypeID
 

Enumerator:
NONE 
GRAPHIC_OBJ 
BOX 
CONE 
CURVE 
BEZIER 
CYLINDER 
IMAGE 
IMAGE_2D 
VOLUME 
MESH_OBJECT 
SPHERE 
JOINT 
BIAXIAL_JOINT 
CONDYLAR_JOINT 
ELLIPSOID_JOINT 
SADDLE_JOINT 
PLANE_JOINT 
POLYAXIAL_JOINT 
UNIAXIAL_JOINT 
HINGE_JOINT 
PIVOT_JOINT 

Definition at line 26 of file vpscenenode.h.


Constructor & Destructor Documentation

VPSceneNode::VPSceneNode  ) 
 

Creates an uninitialized scene node.

Definition at line 21 of file vpscenenode.cpp.

VPSceneNode::VPSceneNode const VPSceneNode node  ) 
 

Definition at line 30 of file vpscenenode.cpp.

References childList, and description.

VPSceneNode::~VPSceneNode  )  [virtual]
 

Definition at line 25 of file vpscenenode.cpp.


Member Function Documentation

void VPSceneNode::AddChild const VPSceneNode child  ) 
 

Add a child at the end of child list.

Definition at line 43 of file vpscenenode.cpp.

References childList.

void VPSceneNode::AutoDeleteChildren  )  const
 

Deletes (dealocate memory) recursively all children marked as 'autoDelete'.

Definition at line 59 of file vpscenenode.cpp.

References childList.

virtual bool VPSceneNode::DrawInstanceOGL  )  const [inline, protected, virtual]
 

Non-recursive drawing - should be overriden by every derived clas.

Reimplemented in VPMesh, VPMeshObject, and VPSphere.

Definition at line 53 of file vpscenenode.h.

Referenced by DrawOGL().

bool VPSceneNode::DrawOGL  )  const [virtual]
 

Recursive drawing using OpenGL commands.

Returns:
false if VPAT is was not compiled with OpenGL support

Reimplemented in VPTransform.

Definition at line 48 of file vpscenenode.cpp.

References childList, and DrawInstanceOGL().

const std::string& VPSceneNode::GetDescription  )  const [inline]
 

Returns a copy of the object's description.

Definition at line 39 of file vpscenenode.h.

References description.

virtual TypeID VPSceneNode::GetID  )  const [inline, virtual]
 

Reimplemented in VPMeshObject.

Definition at line 47 of file vpscenenode.h.

References NONE.

VPSceneNode & VPSceneNode::operator= const VPSceneNode node  ) 
 

Definition at line 36 of file vpscenenode.cpp.

References childList, and description.

void VPSceneNode::SetDescription const std::string &  desc  )  [inline]
 

Changes the object's description.

Definition at line 41 of file vpscenenode.h.

References description.


Member Data Documentation

std::list<const VPSceneNode*> VPSceneNode::childList [protected]
 

Child list.

Definition at line 53 of file vpscenenode.h.

Referenced by AddChild(), AutoDeleteChildren(), VPGraphicObj::ComputeRecursiveBoundingBox(), VPTransform::DrawOGL(), DrawOGL(), operator=(), and VPSceneNode().

std::string VPSceneNode::description [protected]
 

Textual identification.

Definition at line 58 of file vpscenenode.h.

Referenced by GetDescription(), operator=(), VPLight::operator=(), SetDescription(), VPLight::VPLight(), VPSceneNode(), and VPVolume::VPVolume().


The documentation for this class was generated from the following files:
Generated on Tue Sep 6 10:00:19 2005 for VPAT by  doxygen 1.4.4