SOROTOR(3iv)

๐Ÿ’ซ SoRotor โ€” animated rotation node ๐Ÿ’ซ

okay bestie, we're looking at the SoRotor(3IV) manual page and honestly? she SPINS. let's get into it ๐ŸŒ€


๐ŸŒธ INHERITS FROM ๐ŸŒธ

SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation >
SoRotor

so she's the baby of the family, descended from SoRotation, and all the way up the tree through SoTransformation, SoNode, SoFieldContainer and finally SoBase. generational talent fr ๐Ÿ’…


โœจ SYNOPSIS โœจ

#include <Inventor/nodes/SoRotor.h>

๐ŸŽ€ Fields from class SoRotor

SoSFFloat           speed
SoSFBool            on

๐ŸŽ€ Fields from class SoRotation

SoSFRotation        rotation

๐ŸŽ€ Methods from class SoRotor

                     SoRotor()
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 here's the tea โ˜• โ€” SoRotor is derived from SoRotation, which means it applies a rotation to the current transformation. that part? basic. the glow-up is that she's animated โœจ by hooking up engines to the realTime global field, the rotation value gets animated over time, and boom โ€” spinning effect. literally main character energy ๐ŸŒ€

wanna adjust how fast she goes? tweak the speed field. that's it. that's the whole period-of-rotation situation.

the current rotation at any given moment lives in the rotation field, which she inherited from SoRotation. you can also set that field to tell her which axis to rotate around.

โš ๏ธ heads up bestie: unless you specify a non-zero rotation for rotation, the node has no clue which axis to use. it just doesn't know. it's giving confused.

so like, if you want your rotor spinning about the y-axis, do this:

rotor->rotation.setValue(axis, 0.1);

where axis is a vector containing (0,1,0). and fr fr, any non-zero angle works in this code. pick your fave, she doesn't mind ๐Ÿ’โ€โ™€๏ธ


๐Ÿฆ‹ FIELDS ๐Ÿฆ‹

  • SoSFFloat speed โ€” sets the speed of the rotor, measured in revolutions per second. how fast does she twirl? that's this. ๐Ÿ”ฅ
  • SoSFBool on โ€” the on/off switch so your app can enable or disable the motion easily. no drama, just vibes. โญ

๐ŸŒˆ METHODS ๐ŸŒˆ

  • SoRotor() โ€” creates a rotor node with the default settings. brand new baby rotor, fresh out the box ๐ŸŽ€
  • static SoType getClassTypeId() โ€” hands you the type identifier for this class. iykyk. ๐Ÿ’…

๐Ÿ‘‘ ACTION BEHAVIOR ๐Ÿ‘‘

  • SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction โ€” concatenates the current rotation value with the current transformation matrix. slay, she's doing the math ๐Ÿงฎโœจ
  • SoGetMatrixAction โ€” returns the transformation matrix specified by the rotation. iconic. ๐ŸŒŸ

๐Ÿ“ FILE FORMAT/DEFAULTS ๐Ÿ“

Rotor {
    rotation  0 0 1  0
    speed     1
    on        TRUE
}

there she is, the whole default vibe. rotation of 0 0 1 0, speed of 1, on set to TRUE. periodt. ๐Ÿ’œ


๐Ÿงš SEE ALSO ๐Ÿงš

  • SoPendulum
  • SoShuttle

her two besties. go say hi ๐Ÿซถ


okay that's the whole page!! thanks for reading my little breakdown of the SoRotor(3IV) manual โ€” the footer just says SoRotor(3IV)() with no date or version attached, so that's all the source/version tea we've got ๐Ÿ’€ anyway ily, go make something spin โœจ๐ŸŒ€