SOANTISQUISH(3iv)
π SoAntiSquish π
okay bestie, welcome to the SoAntiSquish(3IV) page β yes that's the manual name, we're keeping it, it's part of the lore π«Ά
β¨ NAME β¨
SoAntiSquish β a transformation node that undoes non-uniform 3D scales. literally its whole job. it un-squishes. iconic behaviour honestly π
πΈ INHERITS FROM πΈ
SoBase > SoFieldContainer > SoNode > SoTransformation > SoAntiSquish
so it's a whole lineage of nodes and it's at the bottom of the family tree, main character energy, slay π
π SYNOPSIS π
#include <Inventor/nodes/SoAntiSquish.h>
the Sizing enum (this is the good part)
enum Sizing {
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
}
ok so like: pick a whole axis and let it stay exactly as-is while the other two get fitted to it (X, Y, Z), OR pick a vibe from the three scales β average (AVERAGE_DIMENSION), biggest (BIGGEST_DIMENSION), smallest (SMALLEST_DIMENSION) β OR go full overachiever and use LONGEST_DIAGONAL, which actually accounts for shearing by transforming a cube with the matrix and then taking the length of the longest diagonal. she's thorough π
Fields from class SoAntiSquish
SoSFEnum sizing
SoSFBool recalcAlways
Methods from class SoAntiSquish
SoAntiSquish()
static SoType getClassTypeId()
void recalc()
Methods from class SoNode
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π¦ DESCRIPTION π¦
ok so picture this: when an action traverses this node, it removes the nonuniform 3D scaling from the current transformation matrix. that's it, that's the gig β¨
it's used by draggers like SoTrackballDragger that need to stay uniformly scaled no matter where they're chilling in the scene graph. like, no matter what cursed non-uniform scaling the ancestors did, these draggers stay proportioned. bestie said "not on my watch" π
the magnitude of the new scale comes from the current transformation matrix plus the sizing field. and important: this node does not touch the translation or rotation in the matrix. only the scale. respect the boundaries π«Ά
π FIELDS π
SoSFEnum sizingβ picks which of the algorithms in theSizingtype gets used to choose the new scale when the x, y, and z scales aren't all equal. this is the "how do we un-squish" dial, iykyk πSoSFBool recalcAlwaysβ ifrecalcAlwaysisTRUE, this node recalculates its unsquishing matrix every single time it's traversed. if it'sFALSE, then it only does that during the first traversal after a call torecalc(). so like, lazy mode vs. always-fresh mode π
β METHODS β
SoAntiSquish()
creates an anti-squish node with default settings. brand new baby node, fresh out the box π
static SoType getClassTypeId()
returns the type identifier for this class. classic.
void recalc()
sets a flag so that the next time this node gets traversed, it recalculates its unsquishing matrix. lowkey a "hey, do the thing again next time" button π
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoRayPickAction
appends the current transformation with a new matrix to create an unsquished result. no cap, that's all these actions get up to here π
π FILE FORMAT/DEFAULTS π
AntiSquish {
sizing AVERAGE_DIMENSION
recalcAlways TRUE
}
so the defaults are AVERAGE_DIMENSION for sizing and TRUE for recalcAlways. periodt π
π SEE ALSO π
SoCenterballDragger, SoJackDragger, SoTrackballDragger, SoTransformerDragger, SoTransformation, SoTransformBoxDragger
go read those next bestie, they're all in the dragger cinematic universe π
and that's a wrap! this was SoAntiSquish(3IV)() from the SoAntiSquish(3IV)() manual β version/date tag included, don't @ me, go un-squish something πβ¨π¦
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms