1SoPointLightManip(3IV)()                              SoPointLightManip(3IV)()
2
3
4

NAME

6       SoPointLightManip  —  point  light  node  with 3D interface for editing
7       location
8

INHERITS FROM

10       SoBase > SoFieldContainer > SoNode > SoLight > SoPointLight >  SoPoint‐
11       LightManip
12

SYNOPSIS

14       #include <Inventor/manips/SoPointLightManip.h>
15
16          Fields from class SoPointLight:
17
18     SoSFVec3f           location
19
20          Fields from class SoLight:
21
22     SoSFBool            on
23     SoSFFloat           intensity
24     SoSFColor           color
25
26          Methods from class SoPointLightManip:
27
28                         SoPointLightManip()
29     SoDragger *         getDragger()
30     SbBool              replaceNode(SoPath *p )
31     SbBool              replaceManip(SoPath *p, SoPointLight *newOne ) 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       SoPointLightManip  is  the  base  class for all SoPointLight nodes that
73       have a built-in 3D user interface (this is the only such class provided
74       with  the Inventor toolkit). Since it is derived from SoPointLight, any
75       changes to its fields result in a change of  lighting  for  nodes  that
76       follow  it  in  the  scene graph. In this case, the interface edits the
77       location field. Also, the color  of  the  manipulator's  geometry  will
78       reflect  the  color  of the light (but you can not edit the color using
79       this manipulator).
80
81       Typically, you will want to replace  a  regular  SoPointLight  with  an
82       SoPointLightManip  (as  when the user selects a light to be edited), or
83       vice versa (as when the user is done moving the light and the interface
84       should  go  away). Use the replaceNode() method to insert a manipulator
85       into a scene graph, and the replaceManip() method  to  remove  it  when
86       done.
87
88       The  SoPointLightManip  utilizes an SoPointLightDragger to provide a 3D
89       interface. However, the manipulator differs from the dragger; it lights
90       other  objects  in the scene because, as an SoPointLight, it alters the
91       state. The fields values and movement of  the  dragger,  on  the  other
92       hand,  affect  only  the dragger itself. To find out more about how the
93       interface works and what each part will do, see the reference page  for
94       SoPointLightDragger.  The interfaces of the dragger and the manipulator
95       are identical.
96
97       The SoPointLightManip utilizes its dragger by adding  it  as  a  hidden
98       child.  When an action is applied to the manipulator, such as rendering
99       or handling events, the manipulator first traverses  the  dragger,  and
100       then  the  manipulator  adds its lighting parameters to the state. When
101       you click-drag-release over the manipulator,  it  passes  these  events
102       down  to  the dragger, which moves as a result ("I can't help it, I'm a
103       dragger!").
104
105       The manipulator maintains consistency between the fields of the dragger
106       and  its own fields. Let's say you use the mouse to translate the drag‐
107       ger. Callbacks insure that the location field of the  manipulator  will
108       change  by  the  same amount, thus changing the lighting of nodes which
109       follow in the scene graph. Similarly, if you set the location field  of
110       the  SoPointLightManip,  the manipulator will place the dragger accord‐
111       ingly.
112
113       Because the dragger is a hidden child,  you  can  see  the  dragger  on
114       screen  and interact with it, but the dragger does not show up when you
115       write the manipulator to file. Also, any SoPath will end at the manipu‐
116       lator.  (See  the Actions section of this reference page for a complete
117       description of when the dragger is traversed).
118
119       If you want to get a pointer to the dragger you can  get  it  from  the
120       manipulator  using the getDragger() method. You will need to do this if
121       you want to change the geometry of a manipulator,  since  the  geometry
122       actually belongs to the dragger.
123

METHODS

125                         SoPointLightManip()
126          Constructor.
127
128     SoDragger *         getDragger()
129          Returns  a  pointer  to  the dragger being used by this manipulator.
130          Given this pointer, you can customize  the  dragger  just  like  you
131          would any other dragger. You can change geometry using the setPart()
132          method, or add callbacks using the methods found  in  the  SoDragger
133          reference page.
134
135     SbBool              replaceNode(SoPath *p )
136          Replaces the tail of the path with this manipulator. The tail of the
137          path must be an SoPointLight node (or subclass thereof). If the path
138          has  a nodekit, this will try to use setPart() to insert the manipu‐
139          lator. Otherwise, the manipulator requires that  the  next  to  last
140          node in the path chain be a group.
141
142          The  field  values  from the point light node will be copied to this
143          manipulator, and the light node will be replaced.
144
145          The manipulator will not call ref() on the node it is replacing. The
146          old  node will disappear if it has no references other than from the
147          input path p and its parent, since this manipulator will be  replac‐
148          ing  it  in  both of those places. Nor will the manipulator make any
149          changes to field connections of the old node. The calling process is
150          thus  responsible  for keeping track of its own nodes and field con‐
151          nections.
152
153     SbBool              replaceManip(SoPath *p, SoPointLight *newOne ) const
154          Replaces the tail of the path, which must be this manipulator,  with
155          the  given  SoPointLight  node. If the path has a nodekit, this will
156          try to use setPart() to insert the new node. Otherwise, the  manipu‐
157          lator  requires  that  the  next to last node in the path chain be a
158          group.
159
160          The field values from the manipulator will be copied  to  the  point
161          light node, and the manipulator will be replaced.
162
163          The manipulator will not call ref() or unref()  on the node which is
164          replacing it, nor will it make any changes to field connections. The
165          calling  process  is  thus  responsible for keeping track of its own
166          nodes and field connections.
167
168     static SoType       getClassTypeId()
169          Returns type identifier for this class.
170
171

ACTION BEHAVIOR

173       SoGLRenderAction,  SoCallbackAction,  SoGetBoundingBoxAction,  SoGetMa‐
174       trixAction, SoHandleEventAction, SoRayPickAction
175          First,  traverses the dragger the way an SoGroup would. All draggers
176          place themselves in space,  but  leave  the  current  transformation
177          unchanged  when  finished.  Then  the SoPointLightManip adds a point
178          light into the state, just like its base class, SoPointLight.
179
180     SoSearchAction
181          Searches just like an SoPointLight. Does  not  search  the  dragger,
182          which is a hidden child.
183
184     SoWriteAction
185          Writes  out  just  like an SoPointLight. Does not write the dragger,
186          which is a hidden child. If you really need to write valuable infor‐
187          mation  about  the  dragger,  such  as  customized geometry, you can
188          retrieve the dragger with the getDragger() method and then write  it
189          out separately.
190
191

FILE FORMAT/DEFAULTS

193       PointLightManip {
194          on         TRUE
195          intensity  1
196          color      1 1 1
197          location   0 0 1
198     }
199

SEE ALSO

201       SoDragger,  SoPointLight, SoPointLightDragger, SoDirectionalLightManip,
202       SoSpotLightManip
203
204
205
206
207                                                      SoPointLightManip(3IV)()
Impressum