CanvasFrame Object

The CanvasFrame object represents a 3D Canvas Frame.

General GetID
  GetName
  SetName
Hierarchy GetParent
  GetChildCount
  GetChild
  AddChild
Position and Orientation GetPosition
  SetPosition
  GetOrientation
  SetOrientation
  GetTransformMatrix
Objects AddObject
  GetObjectCount
  GetObject
Bones GetBoneCount
  GetBone
Animation GetAnimationStyle
  GetPositionKeyFrameCount
  GetPositionKeyFrame
  GetOrientationKeyFrameCount
  GetOrientationKeyFrame

 

GetName

Gets the name of the frame.

Syntax

object.GetName() As Variant

SetName

Sets the name of the frame.

Syntax

object.SetName(Name As Variant)

Remarks

A frame must be made a child of another frame using the AddChild method before it can be named.

GetParent

Gets the CanvasFrame that is the parent frame of the frame.

Syntax

object.GetParent() As CanvasFrame

GetChildCount

Gets the number of child frames the frame has.

Syntax

object.GetChildCount() As Variant

GetChild

Gets the specified child CanvasFrame object.

Syntax

object.GetChild(Index As Variant) As CanvasFrame

AddChild

Adds the specified CanvasFrame object as a child frame.

Syntax

object.AddChild(Frame As Variant)

Remarks

This will add the frame to the scene.

GetPosition

Gets the position of the frame relative to a specific CanvasFrame object.

Syntax

object.GetPosition(RelativeFrame As Variant,
X As Variant,
Y As Variant,
Z As Variant)

Remarks

Provide Nothing as the RelativeFrame to get the frame's position in world coordinates.

SetPosition

Sets the position of the frame relative to a specific CanvasFrame object.

Syntax

object.SetPosition(RelativeFrame As Variant,
AnimationTime As Variant,
X As Variant,
Y As Variant,
Z As Variant)

Remarks

Provide Nothing as the RelativeFrame to set the frame's position in world coordinates.

The AnimationTime parameter allows you to set a position at a particular time in the animation. This allows you to set frame animation paths.

GetOrientation

Gets the orientation of the frame relative to a specific CanvasFrame object.

Syntax

object.GetOrientation(RelativeFrame As Variant,
DirX As Variant,
DirY As Variant,
DirZ As Variant,
UpX As Variant,
UpY As Variant,
UpZ As Variant)

Remarks

Provide Nothing as the RelativeFrame to get the frame's orientation in world coordinates.

SetOrientation

Sets the orientation of the frame relative to a specific CanvasFrame object.

Syntax

object.SetOrientation(RelativeFrame As Variant,
AnimationTime As Variant,
DirX As Variant,
DirY As Variant,
DirZ As Variant,
UpX As Variant,
UpY As Variant,
UpZ As Variant)

Remarks

Provide Nothing as the RelativeFrame to set the frame's orientation in world coordinates.

The AnimationTime parameter allows you to set an orientation at a particular time in the animation. This allows you to set frame animation paths.

GetTransformMatrix

Gets the transformation matrix of the frame relative to a specific CanvasFrame object.

Syntax

object.GetTransformMatrix(RelativeFrame As Variant,
Mat00 As Variant,
Mat01 As Variant,
Mat02 As Variant,
Mat03 As Variant,
Mat10 As Variant,
Mat11 As Variant,
Mat12 As Variant,
Mat13 As Variant,
Mat20 As Variant,
Mat21 As Variant,
Mat22 As Variant,
Mat23 As Variant,
Mat30 As Variant,
Mat31 As Variant,
Mat32 As Variant,
Mat33 As Variant)

Remarks

Provide Nothing as the RelativeFrame to get the frame's transformation matrix in world coordinates.

AddObject

Adds a CanvasObject object to the frame.

Syntax

object.AddObject(Object As Variant)

Remarks

The object is added to the scene when it is added to a frame.

GetObjectCount

Gets the number of CanvasObject objects in this frame.

Syntax

object.GetObjectCount() As Variant

GetObject

Gets the specified CanvasObject object.

Syntax

object.GetObject(Index As Variant) As CanvasObject

GetBoneCount

Gets the number of CanvasBone objects in this frame.

Syntax

object.GetBoneCount() As Variant

GetBone

Gets the specified CanvasBone object.

Syntax

object.GetBone(Index As Variant) As CanvasBone

GetID

Gets the unique identifier for the frame.

Syntax

object.GetID() As Variant

GetAnimationStyle

Gets the animation style for the frame.

Syntax

object.GetAnimationStyle() As Variant

Remarks

0 = a closed (repeating) animation
1 = an open animation

GetPositionKeyFrameCount

Gets the number of animation position key-frames for this frame.

Syntax

object.GetPositionKeyFrameCount() As Variant

GetPositionKeyFrame

Gets the specified animation position key-frame.

Syntax

object.GetPositionKeyFrame(Index As Variant,
Time As Variant,
X As Variant,
Y As Variant,
Z As Variant)

GetOrientationKeyFrameCount

Gets the number of animation orientation key-frames for this frame.

Syntax

object.GetOrientationKeyFrameCount() As Variant

GetOrientationKeyFrame

Gets the specified animation orientation key-frame.

Syntax

object.GetOrientationKeyFrame(Index As Variant,
Time As Variant,
X As Variant,
Y As Variant,
Z As Variant,
r As Variant)

Remarks

An orientation key-frame is a quaternion.