73 virtual void update() {
76 bb->
size->setValue( Vec3f( d, d, d ) );
82 Sphere( Inst< SFNode > _metadata = 0,
83 Inst< SFBound > _bound = 0,
84 Inst< SFFloat> _radius = 0,
85 Inst< SFBool > _solid = 0 );
97 virtual void render();
108 virtual bool lineIntersect(
111 LineIntersectResult &result );
118 virtual void closestPoint(
const Vec3f &p,
119 NodeIntersectResult &result );
128 virtual bool movingSphereIntersect(
H3DFloat radius,
131 NodeIntersectResult &result );
161 static GLuint vbo_id[2];
164 static bool vbo_initialized;
166 static vector< GLfloat > sphere_data;
167 static vector< GLuint > sphere_index_data;
Contains the SFFloat field class.
Header file for X3DGeometryNode, X3D scene-graph node.
The BoxBound is a Bound class that specifies the bound using an axis-aligned bounding box.
Definition: Bound.h:144
H3DUniquePtr< SFVec3f > size
The size of the bounding box.
Definition: Bound.h:287
The H3DShadowObjectNode is the base class for all shadow objects for use in the ShadowCaster node.
Definition: H3DShadowObjectNode.h:49
The SFFloat field contains one single-precision floating point number.
Definition: SFFloat.h:41
SFBound is specialized update itself from the radius field of the Sphere node.
Definition: Sphere.h:71
The Sphere node specifies a sphere centred at (0, 0, 0) in the local coordinate system.
Definition: Sphere.h:62
H3DUniquePtr< SFFloat > radius
The radius of the Sphere in metres.
Definition: Sphere.h:140
virtual int nrTriangles()
The number of triangles renderered in this geometry.
Definition: Sphere.h:88
H3DUniquePtr< SFBool > solid
Specifies if both sides of the Sphere should be rendered or only the outside.
Definition: Sphere.h:149
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: Sphere.h:152
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
A template modifier class for adding type checking on the routes to any Field class.
Definition: TypedField.h:84
This is the base node type for all geometry in X3D.
Definition: X3DGeometryNode.h:61
Type getValue(const char *s, const char *&rest)
Function that reads characters from a char * and converts them to a given type.
Definition: X3DFieldConversion.h:134
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