logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoAntiSquish — transformation node that undoes non-uniform 3D scales

Action Behavior

SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoGetMatrixAction,SoRayPickAction
          Appends the current transformation with a new matrix to create an unsquished result.

Description

       This node removes nonuniform 3D scaling from the current  transformation  matrix  when  traversed  by  an
       action.  It  is  used  by  draggers  such as the SoTrackballDragger that need to stay uniformly scaled no
       matter where they are located in the scene graph.

       The magnitude of the new scale is determined by the current transformation matrix and the  sizing  field.
       This node does not change the translation or rotation in the matrix.

Fields

SoSFEnumsizing
          Determines  which of the algorithms enumerated by the type Sizing will be used to select the new scale
          when the x,y, and z scales are not equal.

     SoSFBoolrecalcAlways
          If recalcAlways is TRUE, this node calculates its unsquishing matrix every time it  is  traversed.  If
          FALSE, then this only occurs during the first traversal folllowing a call to recalc().

File Format/Defaults

AntiSquish{sizingAVERAGE_DIMENSIONrecalcAlwaysTRUE}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoTransformation > SoAntiSquish

Methods

SoAntiSquish()
          Creates an anti-squish node with default settings.

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

     voidrecalc()
          Sets a flag so that the next time the node is traversed, it will recalculate its unsquishing matrix.

Name

       SoAntiSquish — transformation node that undoes non-uniform 3D scales

See Also

SoCenterballDragger,SoJackDragger,SoTrackballDragger,SoTransformerDragger,SoTransformation,SoTransformBoxDraggerSoAntiSquish(3IV)()

Synopsis

#include<Inventor/nodes/SoAntiSquish.h>enumSizing{SoAntiSquish::X     fits the other two axes to match the X axis, whose size is unchanged
          SoAntiSquish::Y     fits the other two axes to match the Y axis, whose size is unchanged
          SoAntiSquish::Z     fits the other two axes to match the Z axis, whose size is unchanged
          SoAntiSquish::AVERAGE_DIMENSION
                              uses average of 3 scales in the matrix
          SoAntiSquish::BIGGEST_DIMENSION
                              uses biggest of 3 scales in the matrix
          SoAntiSquish::SMALLEST_DIMENSION
                              uses smallest of 3 scales in the matrix
          SoAntiSquish::LONGEST_DIAGONAL
                              accounts  for  shearing;  transforms  a cube by the matrix and then uses length of
                                   longest diagonal
     }

          Fields from class SoAntiSquish:

     SoSFEnumsizingSoSFBoolrecalcAlways

          Methods from class SoAntiSquish:

                         SoAntiSquish()staticSoTypegetClassTypeId()voidrecalc()

          Methods from class SoNode:

     voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)

          Methods from class SoFieldContainer:

     voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)

          Methods from class SoBase:

     voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const

See Also