#include <archon/x3d/server/geometry.H>
Inheritance diagram for Archon::X3D::GeometryNode:
Public Member Functions | |
virtual int | intersect (const Math::Ray3 &, double &dist) const =0 |
Determine the distance along the ray from the ray origin to the surface of this geometric object. | |
virtual void | getNormalAndTexCoord (Vector3 hitPoint, int where, const Shape *, Vector3 *hitNormal, Vector2 *hitTexCoord) const =0 |
Map a surface point to a surface normal and a corresponding texture coordinate. | |
virtual void | render (bool texture, const Shape *shape, const RenderConfig *)=0 |
Render the geometric structure using OpenGL primitives. | |
Static Public Attributes | |
static const NodeType * | type = 0 |
Protected Member Functions | |
GeometryNode () |
Definition at line 79 of file geometry.H.
|
Map a surface point to a surface normal and a corresponding texture coordinate.
Implemented in Archon::X3D::Torus, Archon::X3D::Box, Archon::X3D::Cone, Archon::X3D::Cylinder, Archon::X3D::IndexedLineSet, Archon::X3D::PointSet, Archon::X3D::Sphere, Archon::X3D::ElevationGrid, Archon::X3D::IndexedFaceSet, and Archon::X3D::Text. |
|
Determine the distance along the ray from the ray origin to the surface of this geometric object. The distance is mesured in units of the ray direction vector length and is never negative. Returns zero if the ray does not intersect the geometry. Otherwise non-zero, and the returned value will indicate which part of the geometry that was intersected. When zero is returned the 'dist' parameter is left unchaged. Otherwise it is set to the distance in question. For solid objects like spheres this method shall disregard any intersection with the surface where the ray passes out of the objct. For solid and non-solid objects we shall regard the surface as part of the object. This means that if a ray originates on the surface of any object (dist=0) then this method shall disregard that intersection point. This in turn means that the reported distance always will be strictly positive (it can never be zero). May only be called with a scenegraph write lock. Implemented in Archon::X3D::Torus, Archon::X3D::Box, Archon::X3D::Cone, Archon::X3D::Cylinder, Archon::X3D::IndexedLineSet, Archon::X3D::PointSet, Archon::X3D::Sphere, Archon::X3D::ElevationGrid, Archon::X3D::IndexedFaceSet, and Archon::X3D::Text. |
|
Render the geometric structure using OpenGL primitives. For each vertex set the normal, the color and the texture coordinate. The texture coordinate mey be skipped if the 'texture' parameter is false. The color may be skipped in which case the effective color is controlled by the material. The following GL parameters may not be assumed to have any particular value and may be left changed: vertex normal, vertex color, texture coordinate, polygon front face, color material tracking, one/two sided light model, cull face enable.
Implemented in Archon::X3D::Torus, Archon::X3D::Box, Archon::X3D::Cone, Archon::X3D::Cylinder, Archon::X3D::IndexedLineSet, Archon::X3D::PointSet, Archon::X3D::Sphere, Archon::X3D::ElevationGrid, Archon::X3D::IndexedFaceSet, and Archon::X3D::Text. |