H3D::Node Class Reference

Node is the base class for all classes that can be part of the H3D scene-graph. More...

#include <H3D/Node.h>

Inheritance diagram for H3D::Node:

Inheritance graph

List of all members.

Public Member Functions

 Node ()
 Constructor.
virtual ~Node ()
 Destructor.
virtual void render ()
 the render() function is used for the depth-first rendering traversal of the scene-graph.
virtual void traverseSG (TraverseInfo &ti)
 traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph.
virtual bool lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result)
 Detect intersection between a line segment and the Node.
virtual void closestPoint (const Vec3f &p, NodeIntersectResult &result)
 Find closest point on Node to p.
virtual bool movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result)
 Detect collision between a moving sphere and the Node.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.
virtual FieldgetField (const string &name)
 return a pointer to the field specified by name within this instance


Detailed Description

Node is the base class for all classes that can be part of the H3D scene-graph.


Member Function Documentation

virtual void H3D::Node::closestPoint ( const Vec3f &  p,
NodeIntersectResult &  result 
) [inline, virtual]

Find closest point on Node to p.

Parameters:
p The point to find the closest point to.
result A struct containing various results of closest points such as which geometries the closest points where detected on.

Reimplemented in H3D::Collision, H3D::Inline, H3D::MatrixTransform, H3D::PlanarReflector, H3D::Sphere, H3D::X3DGeometryNode, H3D::X3DGroupingNode, H3D::X3DPrototypeInstance, and H3D::X3DShapeNode.

Referenced by H3D::Collision::closestPoint().

virtual string H3D::Node::defaultXMLContainerField (  )  [inline, virtual]

virtual bool H3D::Node::lineIntersect ( const Vec3f &  from,
const Vec3f &  to,
LineIntersectResult &  result 
) [inline, virtual]

Detect intersection between a line segment and the Node.

Parameters:
from The start of the line segment.
to The end of the line segment.
result Contains info about the closest intersection for every object that intersects the line.
Returns:
true if intersected, false otherwise.

Reimplemented in H3D::Collision, H3D::Inline, H3D::MatrixTransform, H3D::PlanarReflector, H3D::Sphere, H3D::Text, H3D::X3DGeometryNode, H3D::X3DGroupingNode, H3D::X3DPrototypeInstance, and H3D::X3DShapeNode.

Referenced by H3D::Collision::lineIntersect(), and H3D::X3DPointingDeviceSensorNode::updateX3DPointingDeviceSensors().

virtual bool H3D::Node::movingSphereIntersect ( H3DFloat  radius,
const Vec3f &  from,
const Vec3f &  to,
NodeIntersectResult &  result 
) [inline, virtual]

Detect collision between a moving sphere and the Node.

Only nodes to which collision is possible will return true

Parameters:
radius The radius of the sphere
from The start position of the sphere
to The end position of the sphere.
result A struct containing various results of intersections such as which geometries intersected the moving sphere.
Returns:
true if intersected, false otherwise.

Reimplemented in H3D::Collision, H3D::IndexedLineSet, H3D::Inline, H3D::MatrixTransform, H3D::PlanarReflector, H3D::PointSet, H3D::Sphere, H3D::X3DGeometryNode, H3D::X3DGroupingNode, H3D::X3DPrototypeInstance, and H3D::X3DShapeNode.

Referenced by H3D::X3DViewpointNode::detectCollision(), H3D::Collision::movingSphereIntersect(), and H3D::X3DViewpointNode::translate().

virtual void H3D::Node::render (  )  [inline, virtual]

the render() function is used for the depth-first rendering traversal of the scene-graph.

Reimplemented in H3D::Appearance, H3D::Arc2D, H3D::ArcClose2D, H3D::Background, H3D::Box, H3D::Circle2D, H3D::ComposedCubeMapTexture, H3D::ComposedShader, H3D::Cone, H3D::Cylinder, H3D::Disk2D, H3D::ElevationGrid, H3D::Extrusion, H3D::FillProperties, H3D::GeneratedCubeMapTexture, H3D::H3DVideoTextureNode, H3D::Image3DTexture, H3D::ImageTexture, H3D::IndexedFaceSet, H3D::IndexedLineSet, H3D::IndexedTriangleFanSet, H3D::IndexedTriangleSet, H3D::IndexedTriangleStripSet, H3D::Inline, H3D::LineProperties, H3D::LineSet, H3D::LOD, H3D::Material, H3D::MatrixTransform, H3D::MultiTexture, H3D::MultiTextureTransform, H3D::NurbsCurve, H3D::PackagedShader, H3D::ParticleSystem, H3D::PointSet, H3D::Polyline2D, H3D::Polypoint2D, H3D::ProgramShader, H3D::Rectangle2D, H3D::RenderProperties, H3D::ShaderProgram, H3D::Sphere, H3D::SuperShape, H3D::Switch, H3D::TexGenGeometry, H3D::Text, H3D::TextureBackground, H3D::TextureMatrixTransform, H3D::TextureTransform, H3D::TextureTransform3D, H3D::ToggleGroup, H3D::Transform, H3D::TriangleFanSet, H3D::TriangleSet, H3D::TriangleSet2D, H3D::TriangleStripSet, H3D::TwoSidedMaterial, H3D::X3DBackgroundNode, H3D::X3DGroupingNode, H3D::X3DNurbsSurfaceGeometryNode, H3D::X3DPrototypeInstance, H3D::X3DShapeNode, H3D::X3DTexture2DNode, and H3D::X3DTexture3DNode.

Referenced by H3D::H3DDisplayListObject::DisplayList::callList(), H3D::H3DWindowNode::display(), H3D::Switch::render(), H3D::ParticleSystem::render(), H3D::PlanarReflector::renderPostViewpoint(), H3D::DeviceInfo::renderStyli(), H3D::H3DDisplayListObject::DisplayList::tryBuildDisplayList(), H3D::H3DDisplayListObject::DisplayList::update(), and H3D::GeneratedCubeMapTexture::updateCubeMap().

virtual void H3D::Node::traverseSG ( TraverseInfo ti  )  [inline, virtual]

traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph.

During this traversal things can be updated in the node and HapticObject instances to be rendered should be added to the TraverseInfo object.

Parameters:
ti The TraverseInfo object containing information about the traversal.

Reimplemented in H3D::Appearance, H3D::ArcClose2D, H3D::Billboard, H3D::Box, H3D::Cone, H3D::Cylinder, H3D::DeformableShape, H3D::Disk2D, H3D::ElevationGrid, H3D::Extrusion, H3D::Fog, H3D::ForceField, H3D::GeneratedCubeMapTexture, H3D::H3DVideoTextureNode, H3D::IndexedFaceSet, H3D::IndexedTriangleFanSet, H3D::IndexedTriangleSet, H3D::IndexedTriangleStripSet, H3D::Inline, H3D::LoadSensor, H3D::LOD, H3D::MagneticGeometryEffect, H3D::MatrixTransform, H3D::ParticleSystem, H3D::PlanarReflector, H3D::PositionFunctionEffect, H3D::ProximitySensor, H3D::PythonScript, H3D::Rectangle2D, H3D::Sound, H3D::Sphere, H3D::SpringEffect, H3D::SuperShape, H3D::Switch, H3D::TexGenGeometry, H3D::Text, H3D::TimeFunctionEffect, H3D::ToggleGroup, H3D::TransformInfo, H3D::TriangleFanSet, H3D::TriangleSet, H3D::TriangleSet2D, H3D::TriangleStripSet, H3D::ViewpointGroup, H3D::ViscosityEffect, H3D::VisibilitySensor, H3D::WindPhysicsModel, H3D::X3DAppearanceNode, H3D::X3DBackgroundNode, H3D::X3DGeometryNode, H3D::X3DGroupingNode, H3D::X3DLightNode, H3D::X3DNurbsSurfaceGeometryNode, H3D::X3DPrototypeInstance, H3D::X3DShapeNode, and H3D::X3DViewpointNode.

Referenced by H3D::Scene::idle(), H3D::X3DShapeNode::traverseSG(), H3D::X3DBackgroundNode::traverseSG(), H3D::Switch::traverseSG(), H3D::Sound::traverseSG(), H3D::PlanarReflector::traverseSG(), H3D::ParticleSystem::traverseSG(), H3D::H3DVideoTextureNode::traverseSG(), and H3D::Appearance::traverseSG().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:30:37 2008 for H3D API by  doxygen 1.5.7