logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoRotor — animated rotation node

Action Behavior

SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoRayPickAction
          Concatenates current rotation value with the current transformation matrix.

     SoGetMatrixAction
          Returns transformation matrix specified by the rotation.

Description

       The  SoRotor  class  is  derived from SoRotation, so it applies a rotation to the current transformation.
       Using engines connected to the realTime global field, the rotation value is animated over time, achieving
       a spinning effect.  The period of the rotation can be adjusted by changing the speed field.

       The current rotation at any time is available in the rotation  field,  inherited  from  SoRotation.  This
       field can also be set to specify the axis of rotation.  Note that unless a non-zero rotation is specified
       for the rotation, the node will not know which axis to use. For example, to set a rotor to spin about the
       y-axis, use the following:
          rotor->rotation.setValue(axis,0.1);
     where axis is a vector containing (0,1,0). Any non-zero angle can be used in this code.

Fields

SoSFFloatspeed
          Defines the speed of the rotor, in revolutions per second.

     SoSFBoolon
          Allows applications to enable or disable the motion easily.

File Format/Defaults

Rotor{rotation0010speed1onTRUE}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoTransformation > SoRotation > SoRotor

Methods

SoRotor()
          Creates a rotor node with default settings.

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoRotor — animated rotation node

See Also

SoPendulum,SoShuttleSoRotor(3IV)()

Synopsis

#include<Inventor/nodes/SoRotor.h>

          Fields from class SoRotor:

     SoSFFloatspeedSoSFBoolon

          Fields from class SoRotation:

     SoSFRotationrotation

          Methods from class SoRotor:

                         SoRotor()staticSoTypegetClassTypeId()

          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

See Also