Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::BaseNode Class Reference

BaseNode is the base class for all nodes which are part of the scene hierarchy. More...

#include <basenode.h>

Inheritance diagram for oxygen::BaseNode:

Inheritance graph
[legend]
Collaboration diagram for oxygen::BaseNode:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BaseNode ()
virtual ~BaseNode ()
virtual const salt::MatrixGetLocalTransform () const
 return the local transform of this node.
virtual const salt::MatrixGetWorldTransform () const
 returns the world transform of this node (default: returns parents world transform)
virtual void SetLocalTransform (const salt::Matrix &transform)
 sets the local transform of this node (default: ignored)
virtual void SetWorldTransform (const salt::Matrix &transform)
 sets the world transform of this node (default: ignored)
virtual void ComputeBoundingBox ()
 computes the local bounding box of the node
const salt::AABB3GetWorldBoundingBox () const
 returns the world bounding box of this node
void PrePhysicsUpdate (float deltaTime)
 updates internal state before physics calculation
void PostPhysicsUpdate ()
 updates internal state after physics calculation
void UpdateHierarchy ()
 update hierarchical data (position, bounding volumes, etc.
boost::shared_ptr< SceneGetScene ()
 moves up the hierarchy, until it finds a scene
void EnableDebugMode ()
 enables debug mode controls
void DisableDebugMode ()
 disabled debug mode controls
bool ImportScene (const std::string &fileName, boost::shared_ptr< zeitgeist::ParameterList > parameter)
 imports a scene from a file below this Node

Protected Member Functions

salt::Vector3f GetLocalPos (const salt::Vector3f &worldPos)
 returns the corresponding local coordinates to the given world coordinates
virtual void PrePhysicsUpdateInternal (float deltaTime)
 updates internal state before physics calculation
virtual void PostPhysicsUpdateInternal ()
 updates internal state after physics calculation
virtual void UpdateHierarchyInternal ()
 updates hierarchical date (position, bounding volumes, etc.

Protected Attributes

bool mDebugMode
 debug mode (for additional visualization)
salt::AABB3 mLocalBoundingBox
 local bounding box
salt::AABB3 mWorldBoundingBox
 world bounding box

Static Protected Attributes

static const salt::Matrix mIdentityMatrix
 the identity matrix

Detailed Description

BaseNode is the base class for all nodes which are part of the scene hierarchy.

It's Hierarchy functionality (children, naming, etc..) is inherited from zeitgeist. It does NOT have an explicit local and world transform.

Definition at line 52 of file basenode.h.


Constructor & Destructor Documentation

BaseNode::BaseNode  ) 
 

Definition at line 37 of file basenode.cpp.

BaseNode::~BaseNode  )  [virtual]
 

Definition at line 42 of file basenode.cpp.


Member Function Documentation

void BaseNode::ComputeBoundingBox  )  [virtual]
 

computes the local bounding box of the node

Reimplemented in kerosin::Light, and kerosin::StaticMesh.

Definition at line 86 of file basenode.cpp.

References salt::AABB3::maxVec, salt::AABB3::minVec, mLocalBoundingBox, and salt::TVector3< DATATYPE, TYPE >::Set().

Referenced by PrePhysicsUpdate().

Here is the call graph for this function:

void BaseNode::DisableDebugMode  ) 
 

disabled debug mode controls

Definition at line 167 of file basenode.cpp.

References mDebugMode.

void BaseNode::EnableDebugMode  ) 
 

enables debug mode controls

Definition at line 162 of file basenode.cpp.

References mDebugMode.

salt::Vector3f BaseNode::GetLocalPos const salt::Vector3f worldPos  )  [protected]
 

returns the corresponding local coordinates to the given world coordinates

Definition at line 205 of file basenode.cpp.

References GetWorldTransform(), salt::Matrix::InvertRotationMatrix(), and salt::Matrix::Transform().

Referenced by oxygen::UniversalJoint::GetAnchor(), oxygen::HingeJoint::GetAnchor(), oxygen::Hinge2Joint::GetAnchor(), oxygen::BallJoint::GetAnchor(), and oxygen::UniversalJoint::GetAxis().

Here is the call graph for this function:

const salt::Matrix & BaseNode::GetLocalTransform  )  const [virtual]
 

return the local transform of this node.

(default: returns identity)

Reimplemented in oxygen::Transform.

Definition at line 46 of file basenode.cpp.

References mIdentityMatrix.

shared_ptr< Scene > BaseNode::GetScene  ) 
 

moves up the hierarchy, until it finds a scene

Definition at line 149 of file basenode.cpp.

References zeitgeist::Object::GetSelf().

Referenced by oxygen::ODEObject::GetSpace(), oxygen::ODEObject::GetWorld(), and oxygen::CollisionHandler::OnLink().

Here is the call graph for this function:

const salt::AABB3 & BaseNode::GetWorldBoundingBox  )  const
 

returns the world bounding box of this node

Definition at line 184 of file basenode.cpp.

References mWorldBoundingBox.

const salt::Matrix & BaseNode::GetWorldTransform  )  const [virtual]
 

returns the world transform of this node (default: returns parents world transform)

Reimplemented in oxygen::Scene, and oxygen::Transform.

Definition at line 51 of file basenode.cpp.

References mIdentityMatrix, and zeitgeist::Leaf::mParent.

Referenced by oxygen::Camera::Bind(), oxygen::Camera::DescribeFrustum(), GetLocalPos(), oxygen::SphereCollider::GetPointDepth(), oxygen::PlaneCollider::GetPointDepth(), oxygen::CCylinderCollider::GetPointDepth(), oxygen::BoxCollider::GetPointDepth(), oxygen::Collider::OnLink(), kerosin::Light::Prepare(), oxygen::UniversalJoint::SetAnchor(), oxygen::HingeJoint::SetAnchor(), oxygen::Hinge2Joint::SetAnchor(), oxygen::BallJoint::SetAnchor(), oxygen::HingeJoint::SetAxis(), oxygen::UniversalJoint::SetAxis1(), oxygen::UniversalJoint::SetAxis2(), oxygen::AngularMotor::SetMotorAxis(), oxygen::Collider::SetPosition(), and UpdateHierarchy().

bool oxygen::BaseNode::ImportScene const std::string &  fileName,
boost::shared_ptr< zeitgeist::ParameterList parameter
 

imports a scene from a file below this Node

void BaseNode::PostPhysicsUpdate  ) 
 

updates internal state after physics calculation

Definition at line 109 of file basenode.cpp.

References PostPhysicsUpdateInternal().

Here is the call graph for this function:

void BaseNode::PostPhysicsUpdateInternal  )  [protected, virtual]
 

updates internal state after physics calculation

Reimplemented in oxygen::Body, and oxygen::Space.

Definition at line 176 of file basenode.cpp.

Referenced by PostPhysicsUpdate().

void BaseNode::PrePhysicsUpdate float  deltaTime  ) 
 

updates internal state before physics calculation

Definition at line 92 of file basenode.cpp.

References ComputeBoundingBox(), and PrePhysicsUpdateInternal().

Here is the call graph for this function:

void BaseNode::PrePhysicsUpdateInternal float  deltaTime  )  [protected, virtual]
 

updates internal state before physics calculation

Reimplemented in oxygen::Collider, oxygen::DragController, oxygen::VelocityController, oxygen::FPSController, CollisionPerceptor, Ball, and DriveEffector.

Definition at line 172 of file basenode.cpp.

Referenced by PrePhysicsUpdate(), and Ball::PrePhysicsUpdateInternal().

void BaseNode::SetLocalTransform const salt::Matrix transform  )  [virtual]
 

sets the local transform of this node (default: ignored)

Reimplemented in oxygen::Transform.

Definition at line 66 of file basenode.cpp.

void BaseNode::SetWorldTransform const salt::Matrix transform  )  [virtual]
 

sets the world transform of this node (default: ignored)

Reimplemented in oxygen::Scene, and oxygen::Transform.

Definition at line 70 of file basenode.cpp.

References zeitgeist::Leaf::mParent.

void BaseNode::UpdateHierarchy  ) 
 

update hierarchical data (position, bounding volumes, etc.

.)

Definition at line 124 of file basenode.cpp.

References salt::AABB3::Encapsulate(), GetWorldTransform(), mLocalBoundingBox, mWorldBoundingBox, salt::AABB3::TransformBy(), and UpdateHierarchyInternal().

Here is the call graph for this function:

void BaseNode::UpdateHierarchyInternal  )  [protected, virtual]
 

updates hierarchical date (position, bounding volumes, etc.

.)

Reimplemented in oxygen::Camera, and oxygen::Transform.

Definition at line 180 of file basenode.cpp.

Referenced by UpdateHierarchy().


Member Data Documentation

bool oxygen::BaseNode::mDebugMode [protected]
 

debug mode (for additional visualization)

Definition at line 133 of file basenode.h.

Referenced by DisableDebugMode(), and EnableDebugMode().

const salt::Matrix BaseNode::mIdentityMatrix [static, protected]
 

the identity matrix

Definition at line 130 of file basenode.h.

Referenced by GetLocalTransform(), oxygen::Scene::GetWorldTransform(), GetWorldTransform(), and oxygen::Transform::SetWorldTransform().

salt::AABB3 oxygen::BaseNode::mLocalBoundingBox [protected]
 

local bounding box

Definition at line 136 of file basenode.h.

Referenced by kerosin::StaticMesh::CalcBoundingBox(), kerosin::Light::ComputeBoundingBox(), ComputeBoundingBox(), and UpdateHierarchy().

salt::AABB3 oxygen::BaseNode::mWorldBoundingBox [protected]
 

world bounding box

Definition at line 139 of file basenode.h.

Referenced by GetWorldBoundingBox(), and UpdateHierarchy().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:46:56 2006 for rcssserver3d by  doxygen 1.4.4