#include <archon/x3d/server/geometry.H>
Inheritance diagram for Archon::X3D::Cone:
Public Member Functions | |
const NodeType * | getType () const |
Cone (BackRef< ExecutionContext > c) | |
double | getBottomRadius () const |
double | getHeight () const |
bool | getSide () const |
bool | getBottom () 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 | initializeGeometryComponent () |
The Cone node specifies a cone which is centred in the local coordinate system and whose central axis is aligned with the local Y-axis. The bottomRadius field specifies the radius of the cone's base, and the height field specifies the height of the cone from the centre of the base to the apex. By default, the cone has a radius of 1.0 at the bottom and a height of 2.0, with its apex at y = height/2 and its bottom at y = -height/2.
The side field specifies whether sides of the cone are created and the bottom field specifies whether the bottom cap of the cone is created.
When a texture is applied to the sides of the cone, the texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a vertical seam at the back in the X=0 plane, from the apex (0, height/2, 0) to the point (0, -height/2, -bottomRadius). For the bottom cap, a circle is cut out of the texture square centred at (0, -height/2, 0) with dimensions (2 x bottomRadius) by (2 x bottomRadius). The bottom cap texture appears right side up when the top of the cone is rotated towards the -Z-axis.
Definition at line 253 of file geometry.H.