| 1 |
NAME SoCone "" SO_CONE_ { cone shape node } |
| 2 |
|
| 3 |
INCLUDE nodes/SoCone.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
|
| 7 |
This node represents a simple cone whose central axis is aligned with |
| 8 |
the y-axis. By default, the cone is centered at (0,0,0) and has a size |
| 9 |
of -1 to +1 in all three directions. The cone has a radius of 1 at the |
| 10 |
bottom and a height of 2, with its apex at 1. The cone has two parts: |
| 11 |
the sides and the bottom. |
| 12 |
\p |
| 13 |
The cone is transformed by the current cumulative transformation and |
| 14 |
is drawn with the current lighting model, drawing style, material, and |
| 15 |
geometric complexity. |
| 16 |
\p |
| 17 |
If the current material binding is \kPER_PART\. or |
| 18 |
\kPER_PART_INDEXED\., the first current material is used for the sides |
| 19 |
of the cone, and the second is used for the bottom. Otherwise, the |
| 20 |
first material is used for the entire cone. |
| 21 |
\p |
| 22 |
When a texture is applied to a cone, it is applied differently to the |
| 23 |
sides and bottom. On the sides, the texture wraps counterclockwise |
| 24 |
(from above) starting at the back of the cone. The texture has a |
| 25 |
vertical seam at the back, intersecting the yz-plane. For the bottom, |
| 26 |
a circle is cut out of the texture square and applied to the cone's |
| 27 |
base circle. The texture appears right side up when the top of the |
| 28 |
cone is tilted away from the camera. |
| 29 |
} |
| 30 |
|
| 31 |
ENUM Part { |
| 32 |
SIDES "The conical part", |
| 33 |
BOTTOM "The bottom circular face", |
| 34 |
ALL "All parts" |
| 35 |
} |
| 36 |
|
| 37 |
FIELD parts { Visible parts of cone. } |
| 38 |
|
| 39 |
FIELD bottomRadius {} |
| 40 |
FIELD height { |
| 41 |
These define the cone's height and the radius of the base circle; |
| 42 |
values must be greater than 0.0. |
| 43 |
} |
| 44 |
|
| 45 |
METHOD "" SoCone() { |
| 46 |
Creates a cone node with default settings. |
| 47 |
} |
| 48 |
|
| 49 |
BEGIN C++ |
| 50 |
METHOD "" void addPart(SoCone::Part part) {} |
| 51 |
METHOD "" void removePart(SoCone::Part part) { |
| 52 |
These are convenience functions that make it easy to turn on or off a |
| 53 |
part of the cone. |
| 54 |
} |
| 55 |
METHOD "" SbBool hasPart(SoCone::Part part) const { |
| 56 |
This convenience function returns whether a given part is on or off. |
| 57 |
} |
| 58 |
END |
| 59 |
|
| 60 |
BEGIN C |
| 61 |
METHOD "" void addPart(SoConePart part) {} |
| 62 |
METHOD "" void removePart(SoConePart part) { |
| 63 |
These are convenience functions that make it easy to turn on or off a |
| 64 |
part of the cone. |
| 65 |
} |
| 66 |
METHOD "" SbBool hasPart(SoConePart part) const { |
| 67 |
This convenience function returns whether a given part is on or off. |
| 68 |
} |
| 69 |
END |
| 70 |
|
| 71 |
METHOD "" static SoType getClassTypeId() { |
| 72 |
Returns type identifier for this class. |
| 73 |
} |
| 74 |
|
| 75 |
ACTION SoGLRenderAction { |
| 76 |
Draws cone based on the current coordinates, materials, |
| 77 |
drawing style, and so on. |
| 78 |
} |
| 79 |
|
| 80 |
ACTION SoRayPickAction { |
| 81 |
Intersects the ray with the cone. The part of the cone that was picked |
| 82 |
is available from the \cSoConeDetail\.. |
| 83 |
} |
| 84 |
|
| 85 |
ACTION SoGetBoundingBoxAction { |
| 86 |
Computes the bounding box that encloses the cone. |
| 87 |
} |
| 88 |
|
| 89 |
ACTION SoCallbackAction { |
| 90 |
If any triangle callbacks are registered with the action, they will |
| 91 |
be invoked for each successive triangle that approximates the cone. |
| 92 |
} |
| 93 |
|
| 94 |
ALSO { |
| 95 |
SoConeDetail, |
| 96 |
SoCube, |
| 97 |
SoCylinder, |
| 98 |
SoSphere |
| 99 |
} |