Open Inventor Reference
|
Cone shape node. More...
#include <Inventor/nodes/SoCone.h>
Public Types | |
enum | Part { SIDES = 0x01, BOTTOM = 0x02, ALL = 0x03 } |
Cone parts: More... | |
Public Member Functions | |
SoCone () | |
Creates a cone node with default settings. | |
void | addPart (SoCone::Part part) |
Turns on/off a part of the cone. (Convenience functions) | |
void | removePart (SoCone::Part part) |
SbBool | hasPart (SoCone::Part part) const |
Returns whether a given part is on or off. (Convenience function) | |
virtual void | GLRender (SoGLRenderAction *action) |
Implements actions. | |
virtual void | rayPick (SoRayPickAction *action) |
Implements picking along a ray by intersecting the ray with each primitive generated by subclass. | |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
Fields | |
SoSFBitMask | parts |
Visible parts of cone. | |
SoSFFloat | bottomRadius |
Radius of bottom circular face. | |
SoSFFloat | height |
Size in y dimension. | |
Protected Member Functions | |
virtual void | generatePrimitives (SoAction *action) |
Generates triangles representing a cone. | |
virtual void | computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er) |
Computes bounding box of cone. | |
virtual | ~SoCone () |
This node represents a simple cone whose central axis is aligned with the y-axis. By default, the cone is centered at (0,0,0) and has a size of -1 to +1 in all three directions. The cone has a radius of 1 at the bottom and a height of 2, with its apex at 1. The cone has two parts: the sides and the bottom.
The cone is transformed by the current cumulative transformation and is drawn with the current lighting model, drawing style, material, and geometric complexity.
If the current material binding is PER_PART
or PER_PART_INDEXED
, the first current material is used for the sides of the cone, and the second is used for the bottom. Otherwise, the first material is used for the entire cone.
When a texture is applied to a cone, it is applied differently to the sides and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a vertical seam at the back, intersecting the yz-plane. For the bottom, a circle is cut out of the texture square and applied to the cone's base circle. The texture appears right side up when the top of the cone is tilted away from the camera.
Cone { parts ALL bottomRadius 1 height 2 }
enum SoCone::Part |
SoCone::SoCone | ( | ) |
virtual SoCone::~SoCone | ( | ) | [protected, virtual] |
void SoCone::addPart | ( | SoCone::Part | part | ) |
virtual void SoCone::computeBBox | ( | SoAction * | action, |
SbBox3f & | box, | ||
SbVec3f & | center | ||
) | [protected, virtual] |
Implements SoShape.
virtual void SoCone::generatePrimitives | ( | SoAction * | action | ) | [protected, virtual] |
Implements SoShape.
virtual void SoCone::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoShape.
SbBool SoCone::hasPart | ( | SoCone::Part | part | ) | const |
static void SoCone::initClass | ( | ) | [static] |
Reimplemented from SoShape.
virtual void SoCone::rayPick | ( | SoRayPickAction * | action | ) | [virtual] |
May be overridden in subclass.
Reimplemented from SoShape.
void SoCone::removePart | ( | SoCone::Part | part | ) |