SOSFROTATION(3iv)

🌸 SoSFRotation 🌸

okay bestie, welcome to the manual page for SoSFRotation β€” that's SoSFRotation(3IV) if you're being formal about it. it's a field. it holds a rotation. that's the whole vibe. let's get into it πŸ’…


✨ NAME ✨

SoSFRotation β€” a field containing a rotation

lowkey the most self-explanatory name ever and honestly? we love that for it.


🧬 INHERITS FROM 🧬

SoField > SoSField > SoSFRotation

so it's a field, which is a single-value field, which is this. the family tree is giving legacy code royalty πŸ‘‘


πŸ“œ SYNOPSIS πŸ“œ

#include <Inventor/fields/SoSFRotation.h>

Methods from class SoSFRotation:

void                getValue(const SbVec3f &axis, float &angle) const
void                setValue(float q0, float q1, float q2, float q3)
                    setValue(float q[4])
void                setValue(const SbVec3f &axis, float angle)
static SoType       getClassTypeId()
virtual void        getTypeId() const
const SbRotation &  getValue() const
const SbRotation &  operator =(const SbRotation & newValue)
void                setValue(const SbRotation & newValue)
int                 operator ==(const SoSFRotation &f) const
int                 operator !=(const SoSFRotation &f) const

Methods from class SoField:

void                setIgnored(SbBool ignore)
SbBool              isIgnored() const
SbBool              isDefault() const
virtual SbBool      isOfType(SoType type) const
SbBool              set(const char *valueString)
void                get(SbString &valueString)
void                touch()
SbBool              connectFrom(SoField *fromField)
SbBool              connectFrom(SoEngineOutput *fromEngine)
void                disconnect()
SbBool              isConnected() const
SbBool              isConnectedFromField() const
SbBool              getConnectedField(SoField *&writingField) const
SbBool              isConnectedFromEngine() const
SbBool              getConnectedEngine(SoEngineOutput *&engineOutput)
                        const
void                enableConnection(SbBool flag)
SbBool              isConnectionEnabled() const
int                 getForwardConnections(SoFieldList &list) const
SoFieldContainer *  getContainer() const

πŸ’« DESCRIPTION πŸ’«

a field containing a single SbRotation β€” aka an arbitrary rotation. no cap, that's it, that's the field. one rotation, singular, main character energy ✨

SoSFRotations get written to file as four floating point values separated by whitespace. and here's the tea: those 4 values represent an axis of rotation followed by the amount of right-handed rotation about that axis, in radians. so it's axis-then-angle, not angle-then-axis. don't mix it up bestie πŸ™ˆ

for example, a 180 degree rotation about the Y axis is:

0 1 0  3.14159265

see? 0 1 0 is your Y axis, 3.14159265 is pi radians, which is 180 degrees. the math is mathing. periodt πŸ”₯


πŸ› οΈ METHODS πŸ› οΈ

  • void getValue(const SbVec3f &axis, float &angle) const β€” grabs the value of the field as an axis/angle. hands you back both halves of the story 🫢
  • void setValue(float q0, float q1, float q2, float q3) / setValue(float q[4]) β€” sets the field to the given quaternion. four floats, one rotation, iconic.
  • void setValue(const SbVec3f &axis, float angle) β€” sets the field to the rotation given by axis/angle. the classic combo meal πŸ’–
  • static SoType getClassTypeId() / virtual void getTypeId() const β€” returns the type for this class, or for a particular object of this class. one for the class, one for the instance, both valid πŸ’…
  • const SbRotation & getValue() const β€” returns this field's value. the SbRotation itself, right there, no crumbs left πŸŽ€
  • const SbRotation & operator =(const SbRotation & newValue) / void setValue(const SbRotation & newValue) β€” sets this field to newValue. two doors, same destination, slay.
  • int operator ==(const SoSFRotation &f) const / int operator !=(const SoSFRotation &f) const β€” returns TRUE if f is of the same type and has the same value as this field. same type AND same value, both conditions, no shortcuts bestie ⭐

πŸ‘€ SEE ALSO πŸ‘€

SbRotation, SoField, SoSField, SoMFRotation

(the MF one is the multi version, if one rotation just isn't enough for you. iykyk 🌈)


and that's the whole page fr fr πŸ’œ β€” this was SoSFRotation(3IV), and the footer just says SoSFRotation(3IV)() right back at you, no date, no source, just the title again like a little mirror selfie at the bottom of the page. iconic behavior honestly. go rotate something πŸ¦‹πŸ’–