'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoSpotLightManip(3IV) .SH NAME SoSpotLightManip \(em spotlight node with 3D interface for editing location, direction, and beam width .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoLight > SoSpotLight > SoSpotLightManip .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Fields from class SoSpotLight: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cblocation .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbdirection .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbdropOffRate .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcutOffAngle .sp .in 1i \f1Fields from class SoLight: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbon .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbintensity .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFColor .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcolor .sp .in 1i \f1Methods from class SoSpotLightManip: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSpotLightManip\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoDragger * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetDragger\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreplaceNode\*(Cr(SoPath *p ) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreplaceManip\*(Cr(SoPath *p, SoSpotLight *newOne ) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .sp .in 1i \f1Methods from class SoNode: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetOverride\*(Cr(SbBool state) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOverride\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SbBool copyConnections = FALSE) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaffectsState\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name, SoNodeList &list) .sp .in 1i \f1Methods from class SoFieldContainer: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetToDefaults\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbhasDefaultValues\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfieldsAreEqual\*(Cr(const SoFieldContainer *fc) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcopyFieldValues\*(Cr(const SoFieldContainer *fc, SbBool copyConnections = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(const char *fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbget\*(Cr(SbString &fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFields\*(Cr(SoFieldList &resultList) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoField * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetField\*(Cr(const SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFieldName\*(Cr(const SoField *field, SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisNotifyEnabled\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbenableNotify\*(Cr(SbBool flag) .sp .in 1i \f1Methods from class SoBase: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbref\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbunref\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbunrefNoDelete\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbtouch\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTypeId\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbName .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetName\*(Cr() const .sp .SH DESCRIPTION \*(CbSoSpotLightManip\f1 is the base class for all \*(CbSoSpotLight\f1 nodes that have a built-in 3D user interface (this is the only such class provided with the Inventor toolkit). Since it is derived from \*(CbSoSpotLight\f1, any changes to its fields result \&in a change of lighting for nodes that follow it in the scene graph. In this case, the interface edits the \*(Cblocation\f1, \*(Cbdirection\f1, and \*(CbcutOffAngle\f1 fields. Also, the color of the manipulator's geometry will reflect the color of the \&light (but you can not edit the color using this manipulator). .sp Typically, you will want to replace a regular \*(CbSoSpotLight\f1 with an \*(CbSoSpotLightManip\f1 (as when the user selects a light to be edited), or vice versa (as when the user is \&done moving the light and the interface should go away). Use the \*(CbreplaceNode()\f1 method to insert a manipulator into a scene graph, and the \*(CbreplaceManip()\f1 method to remove it when done. .sp The \*(CbSoSpotLightManip\f1 utilizes an \*(CbSoSpotLightDragger\f1 to provide a 3D interface. However, \&the manipulator differs from the dragger; it lights other objects in the scene because, as an \*(CbSoSpotLight\f1, it alters the state. The fields values and movement of the dragger, on the other hand, affect only the \&dragger itself. To find out more about how the interface works and what each part will do, see the reference page for \*(CbSoSpotLightDragger\f1. The interfaces of the dragger and the manipulator are identical. .sp The \*(CbSoSpotLightManip\f1 utilizes its \&dragger by adding it as a hidden child. When an action is applied to the manipulator, such as rendering or handling events, the manipulator first traverses the dragger, and then the manipulator adds its \&lighting parameters to the state. When you click-drag-release over the manipulator, it passes these events down to the dragger, which moves as a result ("I can't \f2help\f1 it, I'm a dragger!"). .sp The manipulator \&maintains consistency between the fields of the dragger and its own fields. Let's say you use the mouse to widen the cone of the \f2dragger\f1. Callbacks insure that the \*(CbcutOffAngle\f1 field of the \f2manipulator\f1 will change by the same amount, \&thus changing the lighting of nodes which follow in the scene graph. Similarly, if you set the \*(CbcutOffAngle\f1 field of the \*(CbSoSpotLightManip\f1, the manipulator will widen the beam of the dragger accordingly. .sp Because the dragger is \&a \f2hidden\f1 child, you can see the dragger on screen and interact with it, but the dragger does not show up when you write the manipulator to file. Also, any \*(CbSoPath\f1 will end at the manipulator. (See the Actions section \&of this reference page for a complete description of when the dragger is traversed). .sp If you want to get a pointer to the dragger you can get it from the manipulator using the \*(CbgetDragger()\f1 method. You will need \&to do this if you want to change the geometry of a manipulator, since the geometry actually belongs to the dragger. .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSpotLightManip\*(Cr() .br .in 1i \f1Constructor. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoDragger * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetDragger\*(Cr() .br .in 1i \f1Returns a pointer to the dragger being used by this manipulator. Given this pointer, you can customize the dragger just like you would any other dragger. You can change geometry using the \*(CbsetPart()\f1 method, or \&add callbacks using the methods found in the \*(CbSoDragger\f1 reference page. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreplaceNode\*(Cr(SoPath *p ) .br .in 1i \f1Replaces the tail of the path with this manipulator. The tail of the path must be an \*(CbSoSpotLight\f1 node (or subclass thereof). If the path has a nodekit, this will try to use \*(CbsetPart()\f1 to insert the manipulator. Otherwise, the \&manipulator requires that the next to last node in the path chain be a group. .sp The field values from the spotlight node will be copied to this manipulator, and the light node will be replaced. .sp The manipulator \&will not call \*(Cbref()\f1 on the node it is replacing. The old node will disappear if it has no references other than from the input path \*(Crp\f1 and its parent, since this manipulator will be replacing it in both of those \&places. Nor will the manipulator make any changes to field connections of the old node. The calling process is thus responsible for keeping track of its own nodes and field connections. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreplaceManip\*(Cr(SoPath *p, SoSpotLight *newOne ) const .br .in 1i \f1Replaces the tail of the path, which must be this manipulator, with the given \*(CbSoSpotLight\f1 node. If the path has a nodekit, this will try to use \*(CbsetPart()\f1 to insert the new node. Otherwise, the manipulator requires that the \&next to last node in the path chain be a group. .sp The field values from the manipulator will be copied to the spotlight node, and the manipulator will be replaced. .sp The manipulator will not call \*(Cbref()\f1 or \*(Cbunref()\f1 on the \&node which is replacing it, nor will it make any changes to field connections. The calling process is thus responsible for keeping track of its own nodes and field connections. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i \f1Returns type identifier for this class. .sp .in 0.5i .SH ACTION BEHAVIOR \*(CbSoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction .br .in 1i \f1First, traverses the dragger the way an \*(CbSoGroup\f1 would. All draggers place themselves in space, but leave the current transformation unchanged when finished. Then the \*(CbSoSpotLightManip\f1 adds a spotlight to the state, just like \&its base class, \*(CbSoSpotLight\f1. .sp .in 0.5i \*(CbSoSearchAction .br .in 1i \f1Searches just like an \*(CbSoSpotLight\f1. Does not search the dragger, which is a hidden child. .sp .in 0.5i \*(CbSoWriteAction .br .in 1i \f1Writes out just like an \*(CbSoSpotLight\f1. Does not write the dragger, which is a hidden child. If you really need to write valuable information about the dragger, such as customized geometry, you can retrieve the dragger \&with the \*(CbgetDragger()\f1 method and then write it out separately. .sp .in 0.5i .SH FILE FORMAT/DEFAULTS .nf \*(CrSpotLightManip { .in 1i .ta 13m on TRUE intensity 1 color 1 1 1 location 0 0 1 direction 0 0 -1 dropOffRate 0 cutOffAngle 0.785398 .in 0.5i } .SH SEE ALSO \*(CbSoDragger, SoSpotLight, SoSpotLightDragger, SoDirectionalLightManip, SoPointLightManip