#include <archon/x3d/server/aux.H>
Inheritance diagram for Archon::X3D::Torus:
Public Member Functions | |
const NodeType * | getType () const |
Torus (BackRef< ExecutionContext > c) | |
double | getMajorRadius () const |
double | getMinorRadius () const |
int | intersect (const Math::Ray3 &, double &dist) const |
void | getNormalAndTexCoord (Vector3 hitPoint, int where, const Shape *, Vector3 *hitNormal, Vector2 *hitTexCoord) const |
void | render (bool texture, const Shape *shape, const RenderConfig *) |
Static Public Member Functions | |
static Ref< NodeBase > | instantiate (BackRef< ExecutionContext > c) |
Static Public Attributes | |
static const NodeType * | type = 0 |
Friends | |
void | initializeAuxComponent () |
A torus is described by a major and a minor radius. The major radius describes a circle in the z-x-plane centered at the origin of the local coordinate system. Any point on the surface of the torus can then be describes by a vector drawn from some point on this circle. Each such vector must be perpendicular to the circle at that point and be as long as the minor radius. Thus, the torus is centered at the origin of the local coordinate system and has the y-axis as the axis of revolution. When textures are applied to a torus the texture x-coordinate is taken as the angle of the projection of the surface point onto the z-x-plane taking zero to be the direction of the negative z-axis and increasing counter-clockwise when seen from the positive y-axis. The texture y-coordinate is taken as the angle between the surface point and the center of the torus when seen from the point on the circle of revolution that is closest to the surface point. When seen from a point on the circle of revolution in the direction of revolution the texture y-coordinate increses clockwise.
Definition at line 58 of file aux.H.
|
Implements Archon::X3D::GeometryNode. Definition at line 63 of file aux.C. References Archon::Math::BasicVector< T, N >::set(). |