Provided by: inventor-doc_2.1.5-10-18_all

**NAME**

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

**INHERITS** **FROM**

SoBase > SoFieldContainer > SoNode > SoTransformation > SoAntiSquish

**SYNOPSIS**

#include<Inventor/nodes/SoAntiSquish.h>enumSizing{SoAntiSquish::Xfits the other two axes to match the X axis, whose size is unchangedSoAntiSquish::Yfits the other two axes to match the Y axis, whose size is unchangedSoAntiSquish::Zfits the other two axes to match the Z axis, whose size is unchangedSoAntiSquish::AVERAGE_DIMENSIONuses average of 3 scales in the matrixSoAntiSquish::BIGGEST_DIMENSIONuses biggest of 3 scales in the matrixSoAntiSquish::SMALLEST_DIMENSIONuses smallest of 3 scales in the matrixSoAntiSquish::LONGEST_DIAGONALaccounts for shearing; transforms a cube by the matrix and then uses length of longest diagonal}Fields from class SoAntiSquish:SoSFEnumsizingSoSFBoolrecalcAlwaysMethods 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

**DESCRIPTION**

This node removes nonuniform 3D scaling from the current transformation matrix when traversed by an action. It is used by draggers such as theSoTrackballDraggerthat 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 thesizingfield. This node does not change the translation or rotation in the matrix.

**FIELDS**

SoSFEnumsizingDetermines which of the algorithms enumerated by the typeSizingwill be used to select the new scale when the x,y, and z scales are not equal.SoSFBoolrecalcAlwaysIf recalcAlways isTRUE, this node calculates its unsquishing matrix every time it is traversed. IfFALSE, then this only occurs during the first traversal folllowing a call to recalc().

**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.

**ACTION** **BEHAVIOR**

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

**FILE** **FORMAT/DEFAULTS**

AntiSquish{sizingAVERAGE_DIMENSIONrecalcAlwaysTRUE}

**SEE** **ALSO**

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