SOROTATION(3iv)

πŸ’« SoRotation(3IV) β€” okay bestie, it's rotation time πŸ’«

SoRotation(3IV) β€” that's the manual name, that's the vibe, and yes we're doing this together. No cap.


✨ NAME ✨

SoRotation β€” the node that reps a 3D rotation around literally any axis you want. Arbitrary axis, arbitrary angle, main character energy πŸŒ€


πŸ¦‹ INHERITS FROM πŸ¦‹

It's giving very much a whole family tree:

SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation

So it inherited all the drama from every one of those, and we love that for it πŸ’…


🌸 SYNOPSIS 🌸

First, you gotta let the compiler know she exists:

#include <Inventor/nodes/SoRotation.h>

Then here's the whole roster of fields and methods β€” I'm listing every single one, no skipping, we don't do that here 🫢

Fields from class SoRotation:

SoSFRotation        rotation

Methods from class SoRotation:

                     SoRotation()
static SoType        getClassTypeId()

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 πŸŽ€

Okay so, this node defines a 3D rotation about an arbitrary axis through the origin. Like, any axis. Through the origin, specifically β€” don't forget that part bestie, it matters.

The rotation gets accumulated into the current transformation, and that transformation is what gets applied to all the shapes that come after it. So it's not a one-and-done thing, it's a cumulative slay that stacks on top of whatever's already going on 🌈

And the rotation field? It's flexible like that β€” it provides a variety of methods for specifying the rotation. She's versatile. She contains multitudes πŸ’œ


πŸ’– FIELDS πŸ’–

  • SoSFRotation rotation β€” this is the rotation specification itself. That's the whole field. That's the whole job. Iconic πŸ‘‘

🧚 METHODS 🧚

  • SoRotation() β€” makes you a fresh rotation node with all the default settings. A blank canvas, a clean slate, a soft launch ✨
  • static SoType getClassTypeId() β€” hands you the type identifier for this class. It's how she identifies herself in a crowd πŸͺͺ

πŸ”₯ ACTION BEHAVIOR πŸ”₯

Here's what happens when the actions come knocking:

  • SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction β€” all four of these accumulate the rotation transformation into the current transformation. Stack it up, bestie, it's cumulative πŸ“š
  • SoGetMatrixAction β€” this one returns the matrix that corresponds to the rotation. Here's your matrix, queen πŸ‘‘

⭐ FILE FORMAT/DEFAULTS ⭐

This is exactly how she looks written out, and honestly? The default is 0 0 1 0, which is a rotation of 0 around the axis 0 0 1. Not me pointing out that zero degrees of rotation is... no rotation. Groundbreaking. We stan a neutral starting point πŸ™ˆ

Rotation {
    rotation  0 0 1  0
}

🌟 SEE ALSO 🌟

Go bother these two next, they're her besties:

  • SoRotationXYZ
  • SoTransform

Lowkey important reminder: the axis goes through the origin β€” that's not a suggestion, that's the whole deal. And the rotation accumulates, so if your scene looks weird, check what you stacked before it πŸ‘€

And that's the whole page, fr fr β€” straight out of the SoRotation(3IV)() manual, version SoRotation(3IV)(), no date on it because she's timeless πŸ’… Stay rotated, stay iconic, mwah 🫢✨