1SoCone(3IV)()                                                    SoCone(3IV)()
2
3
4

NAME

6       SoCone — cone shape node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoShape > SoCone
10

SYNOPSIS

12       #include <Inventor/nodes/SoCone.h>
13
14     enum Part {
15          SoCone::SIDES       The conical part
16          SoCone::BOTTOM      The bottom circular face
17          SoCone::ALL         All parts
18     }
19
20          Fields from class SoCone:
21
22     SoSFBitMask         parts
23     SoSFFloat           bottomRadius
24     SoSFFloat           height
25
26          Methods from class SoCone:
27
28                         SoCone()
29     void                addPart(SoCone::Part part)
30     void                removePart(SoCone::Part part)
31     SbBool              hasPart(SoCone::Part part) const
32     static SoType       getClassTypeId()
33
34          Methods from class SoNode:
35
36     void                setOverride(SbBool state)
37     SbBool              isOverride() const
38     SoNode *            copy(SbBool copyConnections = FALSE) const
39     virtual SbBool      affectsState() const
40     static SoNode *     getByName(const SbName &name)
41     static int          getByName(const SbName &name, SoNodeList &list)
42
43          Methods from class SoFieldContainer:
44
45     void                setToDefaults()
46     SbBool              hasDefaultValues() const
47     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
48     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
49                              copyConnections = FALSE)
50     SbBool              set(const char *fieldDataString)
51     void                get(SbString &fieldDataString)
52     virtual int         getFields(SoFieldList &resultList) const
53     virtual SoField *   getField(const SbName &fieldName) const
54     SbBool              getFieldName(const SoField *field, SbName &fieldName)
55                              const
56     SbBool              isNotifyEnabled() const
57     SbBool              enableNotify(SbBool flag)
58
59          Methods from class SoBase:
60
61     void                ref()
62     void                unref() const
63     void                unrefNoDelete() const
64     void                touch()
65     virtual SoType      getTypeId() const
66     SbBool              isOfType(SoType type) const
67     virtual void        setName(const SbName &name)
68     virtual SbName      getName() const
69
70

DESCRIPTION

72       This  node  represents a simple cone whose central axis is aligned with
73       the y-axis. By default, the cone is centered at (0,0,0) and has a  size
74       of  -1 to +1 in all three directions. The cone has a radius of 1 at the
75       bottom and a height of 2, with its apex at 1. The cone has  two  parts:
76       the sides and the bottom.
77
78       The cone is transformed by the current cumulative transformation and is
79       drawn with the current lighting model,  drawing  style,  material,  and
80       geometric complexity.
81
82       If  the  current  material binding is PER_PART or PER_PART_INDEXED, the
83       first current material is used for the sides of the cone, and the  sec‐
84       ond  is  used for the bottom. Otherwise, the first material is used for
85       the entire cone.
86
87       When a texture is applied to a cone, it is applied differently  to  the
88       sides  and  bottom.  On  the  sides, the texture wraps counterclockwise
89       (from above) starting at the back of the cone. The texture has a verti‐
90       cal seam at the back, intersecting the yz-plane. For the bottom, a cir‐
91       cle is cut out of the texture square and applied  to  the  cone's  base
92       circle.  The  texture appears right side up when the top of the cone is
93       tilted away from the camera.
94

FIELDS

96     SoSFBitMask         parts
97          Visible parts of cone.
98
99     SoSFFloat           bottomRadius
100     SoSFFloat           height
101          These define the cone's height and the radius of  the  base  circle;
102          values must be greater than 0.0.
103
104

METHODS

106                         SoCone()
107          Creates a cone node with default settings.
108
109     void                addPart(SoCone::Part part)
110     void                removePart(SoCone::Part part)
111          These  are convenience functions that make it easy to turn on or off
112          a part of the cone.
113
114     SbBool              hasPart(SoCone::Part part) const
115          This convenience function returns whether a given part is on or off.
116
117     static SoType       getClassTypeId()
118          Returns type identifier for this class.
119
120

ACTION BEHAVIOR

122       SoGLRenderAction
123          Draws cone based on  the  current  coordinates,  materials,  drawing
124          style, and so on.
125
126     SoRayPickAction
127          Intersects  the  ray  with  the  cone. The part of the cone that was
128          picked is available from the SoConeDetail.
129
130     SoGetBoundingBoxAction
131          Computes the bounding box that encloses the cone.
132
133     SoCallbackAction
134          If any triangle callbacks are registered with the action, they  will
135          be invoked for each successive triangle that approximates the cone.
136
137

FILE FORMAT/DEFAULTS

139       Cone {
140          parts         ALL
141          bottomRadius  1
142          height        2
143     }
144

SEE ALSO

146       SoConeDetail, SoCube, SoCylinder, SoSphere
147
148
149
150
151                                                                 SoCone(3IV)()
Impressum