'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoTransformManip(3IV) .SH NAME SoTransformManip \(em base class for all transform Nodes with built-in 3D user interfaces .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform > SoTransformManip .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Fields from class SoTransform: .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\ \} \*(Cbtranslation .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFRotation .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbrotation .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\ \} \*(CbscaleFactor .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFRotation .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbscaleOrientation .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\ \} \*(Cbcenter .sp .in 1i \f1Methods from class SoTransformManip: .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\ \} \*(CbSoTransformManip\*(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, SoTransform *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 SoTransform: .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\ \} \*(CbpointAt\*(Cr(const SbVec3f &fromPoint, const SbVec3f &toPoint) .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\ \} \*(CbgetScaleSpaceMatrix\*(Cr(SbMatrix &mat, SbMatrix &inv) 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\ \} \*(CbgetRotationSpaceMatrix\*(Cr(SbMatrix &mat, SbMatrix &inv) 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\ \} \*(CbgetTranslationSpaceMatrix\*(Cr(SbMatrix &mat, SbMatrix &inv) 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\ \} \*(CbmultLeft\*(Cr(const SbMatrix &mat) .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\ \} \*(CbmultRight\*(Cr(const SbMatrix &mat) .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\ \} \*(CbcombineLeft\*(Cr(SoTransformation *nodeOnRight) .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\ \} \*(CbcombineRight\*(Cr(SoTransformation *nodeOnLeft) .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\ \} \*(CbsetMatrix\*(Cr(const SbMatrix &mat) .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\ \} \*(Cbrecenter\*(Cr(const SbVec3f &newCenter) .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 \*(CbSoTransformManip\f1 is the base class for all \*(CbSoTransform\f1 nodes that have a built-in 3D user interface. Since it is derived from \*(CbSoTransform\f1, any changes to its fields result in the rotation, scaling, and/or translation of nodes that follow \&it in the scene graph. .sp Typically, you will want to replace a regular \*(CbSoTransform\f1 with an \*(CbSoTransformManip\f1 (as when the user selects an object to be moved), or vice versa (as when the object is deselected, and the motion 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 Every subclass of \*(CbSoTransformManip\f1 utilizes a dragger of some sort to provide a 3D interface. (This class does \¬ have dragger; but all the subclasses do.) However a manipulator differs from a dragger; it influences other objects in the scene because, as an \*(CbSoTransform\f1, it alters the state. The fields values and movement \&of a dragger, on the other hand, affect only the dragger itself. .sp Each \*(CbSoTransformManip\f1 subclass 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 transformation matrix 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 \&rotate the \f2dragger\f1. Callbacks insure that the \*(Cbrotation\f1 field of the \f2manipulator\f1 will change by the same amount, resulting in the rotation of nodes which follow in the scene graph. Similarly, if you set any of the \*(CbSoTransformManip\f1 fields the \&manipulator will move the dragger accordingly. You can use this feature to impose contraints on a manipulator: If the user moves the manipulator so that a field value becomes too large, you can set the \&field back to your desired maximum, and the whole thing will move back to where you specified. .sp Since each \*(CbSoTransformManip\f1 uses a dragger to provide its interface, you will generally be told to look at the dragger's \&reference page for details of how it moves and what the different parts are for. The interface for the dragger and the manipulator will always be exactly the same. Usually, a \*(CbSoTransformManip\f1 will surround the objects \&that it influences (i.e., those that move along with it). This is because the manipulator turns on the \f2surroundScale\f1 part of its dragger; so the dragger geometry expands to envelope the other objects (see the reference \&page for \*(CbSoSurroundScale\f1). .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\ \} \*(CbSoTransformManip\*(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 \*(CbSoTransform\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 transform node will be copied to this manipulator, and the transform 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, SoTransform *newOne ) const .br .in 1i \f1Replaces the tail of the path, which must be this manipulator, with the given \*(CbSoTransform\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 transform 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 \*(CbSoTransformManip\f1 accumulates a transformation into the current \&transformation just like its base class, \*(CbSoTransform\f1. .sp .in 0.5i \*(CbSoSearchAction .br .in 1i \f1Searches just like an \*(CbSoTransform\f1. Does not search the dragger, which is a hidden child. .sp .in 0.5i \*(CbSoWriteAction .br .in 1i \f1Writes out just like an \*(CbSoTransform\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 \*(CrTransformManip { .in 1i .ta 18m translation 0 0 0 rotation 0 0 1 0 scaleFactor 1 1 1 scaleOrientation 0 0 1 0 center 0 0 0 .in 0.5i } .SH SEE ALSO \*(CbSoDragger, SoTransform, SoCenterballManip, SoHandleBoxManip, SoJackManip, SoSurroundScale, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip