Click or drag to resize
SoTrackFollower Class

Animates an object or camera along a track.

Inheritance Hierarchy

Namespace: OIV.Inventor.Engines
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoTrackFollower : SoEngine

The SoTrackFollower type exposes the following members.

Constructors
  NameDescription
Public methodSoTrackFollower

Constructor.

Top
Methods
  NameDescription
Public methodComputeData

Returns the position and the three rotations used to compute the orientation field for a given alpha value.

Public methodCopy

Creates and returns an exact copy of the engine.

(Inherited from SoEngine.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlphaValue

Returns the alpha value at a control point, depending on the distance between control points and on the timeStamps values.

Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetOutput

Returns a reference to the engine output with the given name.

(Inherited from SoEngine.)
Public methodGetOutputName

Returns (in outputName) the name of the engine output (output).

(Inherited from SoEngine.)
Public methodGetOutputs

Returns a list of outputs in this engine.

(Inherited from SoEngine.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetTrackCoordinate(SoCoordinate3)
Calls GetTrackCoordinate(coords, 1, false, 16).
Public methodGetTrackCoordinate(SoCoordinate3, Single)
Calls GetTrackCoordinate(coords, width, false, 16).
Public methodGetTrackCoordinate(SoCoordinate3, Single, Boolean)
Calls GetTrackCoordinate(coords, width, flat, 16).
Public methodGetTrackCoordinate(SoCoordinate3, Single, Boolean, Int32)

Returns a set of coordinates that can be used to build a TriangleStripSet or a LineSet that materialized the track.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetName (Inherited from SoBase.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoBase.)
Top
Properties
  NameDescription
Public propertyalpha

The value on which the interpolation is made.

Public propertyheadRotation

The final rotation applied at a control point, which allows the camera or the object to be rotated while following the track.

Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertykeepRollAngle

Indicates if the roll angle should be maintained after the middle of the turn.

Public propertyloop

If loop is true, the animation will loop.

Public propertyorientation
Public propertypoints

Coordinates of the control points.

Public propertyposition
Public propertyradius

Radius of the turn at a control point.

Public propertyrollAngle

Roll angle during the turn at a control point.

Public propertyrollSpeed

Speed at which the roll angle is reached during a turn.

Public propertytimeStamps

Time stamps associated with the control points.

Public propertyuseHeadRotationOnly

If true, the OIV.Inventor.Engines.SoTrackFollower.orientation output field is a direct interpolation of OIV.Inventor.Engines.SoTrackFollower.headRotation values, without taking into consideration the roll angle or the track itself.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Remarks

This engine is designed to add animations to a scene graph. It manages a track that can be followed either by an object (a sub scene graph) or by a camera. The track is defined by a set of control points. Each control point can be associated with a time stamp, a turn angle, roll information, and a head rotation. Only the OIV.Inventor.Engines.SoTrackFollower.points field is required. All other data fields are optional.

The input that drives the animation is the OIV.Inventor.Engines.SoTrackFollower.alpha field. This value should vary between 0 and 1, assuming 0 as the position and orientation at the first control point, and 1 as the position and orientation at the last control point. Alpha values are clamped to the interval [0,1]. An OIV.Inventor.Sensors.SoTimerSensor or other engines can be used to dynamically modify the alpha value.

The outputs are a OIV.Inventor.Engines.SoTrackFollower.position field and an OIV.Inventor.Engines.SoTrackFollower.orientation field that can be connected directly to the corresponding fields of an OIV.Inventor.Nodes.SoCamera or OIV.Inventor.Nodes.SoTransform node (see OIV.Inventor.Fields.SoField.ConnectFrom(OIV.Inventor.Engines.SoEngineOutput)). The values of these fields are computed by interpolating the track points with the OIV.Inventor.Engines.SoTrackFollower.alpha field value.

The rollAngle values are only used if the track specified by the points field is curved.

An example .iv file using OIV.Inventor.Engines.SoTrackFollower is provided in the directory $OIVHOME/data/models/toys/TrackSample.

FILE FORMAT/DEFAULT

TrackFollower {
points 0 0 0
timeStamps 0
radius 0
rollAngle 0
rollSpeed 0
keepRollAngle false
headRotation 0 0 1 0
alpha 0
loop true
useHeadRotationOnly false
}

See Also