29 #ifndef __X3DSHAPENODE_H__
30 #define __X3DSHAPENODE_H__
74 FieldRef< H3DDisplayListObject,
75 H3DDisplayListObject::DisplayList,
76 &H3DDisplayListObject::displayList >, true > {
100 BaseField::onAdd( n );
101 if( n && owner->use_geometry_bound ) {
103 g->
bound->route( owner->bound );
114 BaseField::onRemove( n );
115 if( n && owner->use_geometry_bound ) {
117 g->
bound->unroute( owner->bound );
139 virtual bool haveValidDisplayList();
146 virtual void callList(
bool build_list =
true );
154 Inst< SFGeometryNode > _geometry = 0,
155 Inst< SFHapticGeometry > _hapticGeometry = 0,
156 Inst< SFNode > _metadata = 0,
157 Inst< SFBound > _bound = 0,
158 Inst< SFVec3f > _bboxCenter = 0,
159 Inst< SFVec3f > _bboxSize = 0,
160 Inst< DisplayList > _displayList = 0
168 const Vec3f &size = bboxSize->getValue();
169 if( size.x == -1 && size.y == -1 && size.z == -1 ) {
170 use_geometry_bound =
true;
174 g->
bound->route( this->bound );
178 bb->
center->setValue( bboxCenter->getValue() );
179 bb->
size->setValue( bboxSize->getValue() );
180 bound->setValue( bb );
186 virtual void render();
198 virtual bool lineIntersect(
201 LineIntersectResult &result );
208 virtual void closestPoint(
const Vec3f &p,
209 NodeIntersectResult &result );
219 virtual bool movingSphereIntersect(
H3DFloat radius,
222 NodeIntersectResult &result );
236 } GeometryRenderMode;
238 static GeometryRenderMode geometry_render_mode;
275 bool use_geometry_bound;
298 bool traverse_multipass_transparency;
Contains the DependentSFNode and DependentMFNode template classes.
Header file for H3DDisplayListObject.
Header file for H3DShadowObjectNode.
Header file for X3DAppearanceNode, X3D scene-graph node.
Header file for X3DBoundedObject.
Header file for X3DChildNode, X3D scene-graph node.
Header file for X3DGeometryNode, X3D scene-graph node.
virtual void initialize()
The BoxBound is a Bound class that specifies the bound using an axis-aligned bounding box.
Definition: Bound.h:144
H3DUniquePtr< SFVec3f > center
The center point of the bounding box.
Definition: Bound.h:285
H3DUniquePtr< SFVec3f > size
The size of the bounding box.
Definition: Bound.h:287
DependentSFNode are modified TypedSFNode fields where the field dirty status is dependent on fields i...
Definition: DependentNodeFields.h:294
Class used for specifying a field member of a node in a DependentSFNode or DependentMFNode specificat...
Definition: DependentNodeFields.h:48
H3DUniquePtr< SFBound > bound
The field containing the bound object.
Definition: H3DBoundedObject.h:59
We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering,...
Definition: H3DDisplayListObject.h:60
This abstract interface class is the base class for all node types that wants to create an OpenGL dis...
Definition: H3DDisplayListObject.h:54
H3DUniquePtr< DisplayList > displayList
The DisplayList instance handling the OpenGL caching of this object.
Definition: H3DDisplayListObject.h:256
Node is the base class for all classes that can be part of the H3D scene-graph.
Definition: Node.h:46
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
This is the base node type for all Appearance nodes.
Definition: X3DAppearanceNode.h:44
This X3D abstract interface type is basis for all X3D node types that have bounds specified as part o...
Definition: X3DBoundedObject.h:46
This abstract node type indicates that the concrete nodes which are instantiated based on it may be u...
Definition: X3DChildNode.h:42
This is the base node type for all geometry in X3D.
Definition: X3DGeometryNode.h:61
This is just a dummy class to get around a bug in Visual C++ 7.1 If the X3DGeometry::DisplayList inhe...
Definition: X3DShapeNode.h:133
Display list is extended in.
Definition: X3DShapeNode.h:143
SFGeometryNode is dependent on the displayList field of its encapsulated X3DGeometryNode node,...
Definition: X3DShapeNode.h:76
virtual void onAdd(Node *n)
This function will be called when the value of RefCountField changes.
Definition: X3DShapeNode.h:99
virtual void onRemove(Node *n)
This function will be called when the value of RefCountField changes.
Definition: X3DShapeNode.h:113
virtual ~SFGeometryNode()
Destructor.
Definition: X3DShapeNode.h:89
SFGeometryNode()
Constructor.
Definition: X3DShapeNode.h:84
This is the base node type for all Shape nodes.
Definition: X3DShapeNode.h:50
H3DUniquePtr< SFShadowObjectNode > shadowVolume
If specified, contains a H3DShadowObjectNode to be used for shadows.
Definition: X3DShapeNode.h:271
H3DUniquePtr< SFAppearanceNode > appearance
The field containing the X3DAppearance node to be used when rendering the shape.
Definition: X3DShapeNode.h:246
virtual void initialize()
Sets up the bound field using the bboxCenter and bboxSize fields.
Definition: X3DShapeNode.h:167
H3DUniquePtr< SFGeometryNode > geometry
Contains the X3DGeometryNode to be rendered.
Definition: X3DShapeNode.h:253
static bool disable_lighting_if_no_app
Set to true if lighting should be disabled when no Appearance or Material node has been specified as ...
Definition: X3DShapeNode.h:284
H3DUniquePtr< SFHapticGeometry > hapticGeometry
If specified, contains a X3DGeometryNode to be rendered haptically.
Definition: X3DShapeNode.h:261
DependentSFNode< X3DAppearanceNode, FieldRef< H3DDisplayListObject, H3DDisplayListObject::DisplayList, &H3DDisplayListObject::displayList >, true > SFAppearanceNode
SFAppearanceNode is dependent on the displayList field of its encapsulated X3DAppearanceNode node,...
Definition: X3DShapeNode.h:60
@ TRANSPARENT_ONLY
render only transparent objects
Definition: X3DShapeNode.h:227
@ SOLID
render only non-transparent objects
Definition: X3DShapeNode.h:233
@ TRANSPARENT_FRONT
render only the front face of transparent objects
Definition: X3DShapeNode.h:229
@ TRANSPARENT_BACK
render only the back face of transparent objects
Definition: X3DShapeNode.h:231
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DShapeNode.h:278
TypedSFNode< X3DGeometryNode > SFHapticGeometry
SFHapticGeometry contains a X3DGeometryNode.
Definition: X3DShapeNode.h:63
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194