Kanzi 3.9.10
Trajectory Class Reference

Trajectory defines a series of points following a geometrical path. More...

Inheritance diagram for Trajectory:
[legend]

Public Member Functions

Spline copySpline ()
 Gets a cloned copy of the spline in this trajectory.
 
float getAngle ()
 Gets the angle of a circle trajectory in degrees.
 
Vector3 getCircleNormal ()
 Gets the normal vector for the plane of the circle trajectory.
 
Vector3 getCircleOrigin ()
 Gets the origin point of the circle trajectory.
 
float getLength ()
 Gets the curve length of trajectory.
 
Vector3 getLineDirection ()
 Gets the direction vector of the line trajectory.
 
Vector3 getPointAbsolute (float lengthParameter)
 Gets a point on a trajectory by using absolute coordinates ranging from 0.0f to the length of the trajectory.
 
Vector3 getPointRelative (float phaseParameter)
 Gets a point on the trajectory by using relative coordinates.
 
float getRadius ()
 Gets the radius of a circle trajectory.
 
TrajectoryEnums.Type getType ()
 Gets the type of the trajectory.
 
Vector3 getVisualizationPoint (long pointIndex, long pointCount)
 Gets a visualization point of the trajectory.
 
long getVisualizationPointCount ()
 Gets the number of points recommended for visualizing the trajectory.
 
boolean isComplete ()
 Returns true if trajectory is complete and usable.
 
Vector3 scalePoint (Vector3 point, Matrix4x4 transform, Vector3 scaling)
 Gets point that is scaled along the line trajectory, otherwise returns the point multiplied by the given transformation matrix and scaling factor.
 
- Public Member Functions inherited from Resource
String getName ()
 Gets the resource name.
 
String getUrl ()
 Gets the resource URL.
 
void setKeepAlive (boolean keepAlive)
 Sets the keep alive flag.
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to.
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object.
 
long getNative ()
 Gets a pointer to the backing C++ instance.
 
TDataType getOptionalProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type, but does not use the default value if there are no inputs to the property value.
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type.
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value.
 
boolean isStale ()
 Test if the object is stale i.e.
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property.
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type.
 
ObjectRef< TTypetryCreateObjectRef (Class< TType > clazz)
 Tries to create an owning ObjectRef instance to this KanziObject.
 

Static Public Member Functions

static ObjectRef< TrajectorycreateCircle (Vector3 origin, Vector3 up, float angleInDegrees, float radius, Domain domain, String name)
 Creates a circle trajectory.
 
static ObjectRef< TrajectorycreateLine (Vector3 origin, Vector3 direction, float length, Domain domain, String name)
 Creates a line trajectory.
 
static ObjectRef< TrajectorycreateSpline (Spline spline, Domain domain, String name)
 Creates a spline trajectory.
 

Static Public Attributes

static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from Resource
static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from KanziObject
static final Metaclass metaclass = new AbstractMetaclass("Kanzi.Object")
 The Metaclass for the class.
 

Additional Inherited Members

- Public Attributes inherited from ResourceMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Resource")
 Metaclass for Resource.
 
- Public Attributes inherited from TrajectoryMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Trajectory")
 Metaclass for Trajectory.
 

Detailed Description

Trajectory defines a series of points following a geometrical path.

For example, use a trajectory as align paths for 3d objects or animation paths. You can create trajectory as a spline, circle or line trajectory.

Member Function Documentation

◆ copySpline()

Spline copySpline ( )

Gets a cloned copy of the spline in this trajectory.

Use this to get a new identical copy of the spline in spline trajectory.

Returns
SplinePtr copy of the spline owned by this trajectory.

◆ createCircle()

static ObjectRef< Trajectory > createCircle ( Vector3 origin,
Vector3 up,
float angleInDegrees,
float radius,
Domain domain,
String name )
static

Creates a circle trajectory.

Parameters
originOrigin of the circle trajectory.
upNormal vector for the plane where the circle exists. Kanzi internally normalizes the vector.
angleInDegreesRotation angle of the circle trajectory in its plane, in degrees.
radiusRadius of the circle.
domainDomain.
nameName of trajectory.
Returns
TrajectorySharedPtr.

◆ createLine()

static ObjectRef< Trajectory > createLine ( Vector3 origin,
Vector3 direction,
float length,
Domain domain,
String name )
static

Creates a line trajectory.

Parameters
originOrigin of the line trajectory.
directionDirection vector for the line. Kanzi internally normalizes the direction.
lengthLength of the line.
domainThe domain where to create the trajectory object.
nameThe name of the trajectory object.
Returns
TrajectorySharedPtr.

◆ createSpline()

static ObjectRef< Trajectory > createSpline ( Spline spline,
Domain domain,
String name )
static

Creates a spline trajectory.

Parameters
splineSpline to use as a trajectory.
domainDomain.
nameName of the trajectory.
Returns
TrajectorySharedPtr.

◆ getAngle()

float getAngle ( )

Gets the angle of a circle trajectory in degrees.

Use this method to find out how a circle trajectory is rotated.

Returns
Angle of the circle trajectory in degrees.

◆ getCircleNormal()

Vector3 getCircleNormal ( )

Gets the normal vector for the plane of the circle trajectory.

Use this method to see which direction the circle trajectory is facing.

Returns
Normal vector for the plane of the circle trajectory.

◆ getCircleOrigin()

Vector3 getCircleOrigin ( )

Gets the origin point of the circle trajectory.

Use this method to see where the circle trajectory is located.

Returns
Origin point of the circle trajectory.

◆ getLength()

float getLength ( )

Gets the curve length of trajectory.

Returns
Curve length of trajectory.

◆ getLineDirection()

Vector3 getLineDirection ( )

Gets the direction vector of the line trajectory.

Use this method to see which direction a line trajectory is pointing towards.

Returns
Direction vector of the line trajectory.

◆ getPointAbsolute()

Vector3 getPointAbsolute ( float lengthParameter)

Gets a point on a trajectory by using absolute coordinates ranging from 0.0f to the length of the trajectory.

If the trajectory has a looping spline, Kanzi wraps around the trajectory the coordinates lower than 0.0f and higher than the length of the trajectory.

Parameters
lengthParameterPoint on the trajectory.

◆ getPointRelative()

Vector3 getPointRelative ( float phaseParameter)

Gets a point on the trajectory by using relative coordinates.

If the trajectory has a looping spline, Kanzi wraps around the trajectory the coordinates lower than 0.0f and higher than 1.0f.

Parameters
phaseParameterPoint on the trajectory. 0.0f start, 1.0f end.

◆ getRadius()

float getRadius ( )

Gets the radius of a circle trajectory.

Use this method to find out how big the radius of a circle trajectory is.

Returns
Radius of the circle trajectory.

◆ getType()

TrajectoryEnums.Type getType ( )

Gets the type of the trajectory.

Use this method to find out whether the trajectory is a spline, line, or a circle trajectory.

Returns
spline for spline trajectories, line for line trajectories, and circle for circle trajectories.

◆ getVisualizationPoint()

Vector3 getVisualizationPoint ( long pointIndex,
long pointCount )

Gets a visualization point of the trajectory.

Returns
Vector3 visualization point of the trajectory.

◆ getVisualizationPointCount()

long getVisualizationPointCount ( )

Gets the number of points recommended for visualizing the trajectory.

Returns
Number of points recommended for visualizing the trajectory.

◆ isComplete()

boolean isComplete ( )

Returns true if trajectory is complete and usable.

Returns
True if trajectory is complete.

◆ scalePoint()

Vector3 scalePoint ( Vector3 point,
Matrix4x4 transform,
Vector3 scaling )

Gets point that is scaled along the line trajectory, otherwise returns the point multiplied by the given transformation matrix and scaling factor.

Use this to place a point along the line trajectory, at given scaling factor.

Parameters
pointVector3 point to be scaled.
transformMatrix4x4 transformation matrix applied to the point.
scalingVector3 scaling the point.
Returns
Vector3 Point scaled along the line trajectory, if type is line trajectory, else point scaled with transform matrix and scaling point.

Member Data Documentation

◆ metaclass

final Metaclass metaclass
static
Initial value:
=
com.rightware.kanzi.metadata.TrajectoryMetadata.metaclass

The Metaclass for the class.