#include <archon/x3d/server/geometry.H>
Inheritance diagram for Archon::X3D::Sphere:
Public Member Functions | |
const NodeType * | getType () const |
Sphere (BackRef< ExecutionContext > c) | |
double | getRadius () 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 () |
A sphere is centered in the origin of the local coordinate system. The north pole of the sphere is in the direction of the positive y-axis (upwards in the canonical view). A texture is applied to the sphere by taking the polar coordinates from the surface of the sphere as the texture coordinates (scaled apropriately). The latitude or elevation angle plays the role of the texture y-coordinate such that the north pole corresponds to the top of the texture and the south pole corresponds to the bottom. The logitude or azimuth angle plays the role of the texture x-coordinate. The zero meridian is the meridian that intersects the negative z-axis (ahead in the canonical view). This corresponds to the left and right edge of the texture. The texture is wraped counter-clockwise around the sphere when seen from above.
Definition at line 464 of file geometry.H.