r3aik

r3aik

Class

real/objects/r3aik.h

Library

r3obj

Description:

Ik animation objects. Applies inverse kinematics to sibling objects.

See Also

real/objects/r3aniobj.h

Super Class

r3Level

R3CLID_LEVEL

JavaScript

r3Ainversekinematics

Class Identifier

R3CLID_AINVERSEKINEMATICS - 110

Methods

UPDATETARGETS, EVALIKTARGET, ADDTARGETS, RECONNECT, DETACH, REMOVEMULTIPLEREFEREN,

Attributes

IkPointCount, Displacement, EnableDisplacement,

Registration

int R3RegisterAInverseKinematicsClass(R3APP *app);

R3AIKM_UPDATETARGETS

Method

UPDATETARGETS

Identifier

R3AIKM_UPDATETARGETS

JavaScript

obj.UPDATETARGETS();

Description

I.K or time changed, update targets to match the i.k path

R3AIKM_EVALIKTARGET

Method

EVALIKTARGET

Identifier

R3AIKM_EVALIKTARGET

Param 1:

R3INT, index

Param 2:

R3VECTOR, param

Param 3:

R3VECTOR, result;

JavaScript

obj.EVALIKTARGET(p1, p2, p3);

Description

Evaluate i.k target point in object space.

R3AIKM_ADDTARGETS

Method

ADDTARGETS

Identifier

R3AIKM_ADDTARGETS

Param 3:

R3TAG*, R3AIKA_IkPoints, R3AIKA_IkPointCount

JavaScript

obj.ADDTARGETS(p3);

Description

add new targets to the i.k object

R3AIKM_RECONNECT

Method

RECONNECT

Identifier

R3AIKM_RECONNECT

JavaScript

obj.RECONNECT();

Description

Reconnect points to give new ik path.

R3AIKM_DETACH

Method

DETACH

Identifier

R3AIKM_DETACH

Param 3:

R3OBJ*, skeleton to be detached

JavaScript

obj.DETACH(p3);

Description

Detach (unmap) skeletons from foot steps

R3AIKM_REMOVEMULTIPLEREFEREN

Method

REMOVEMULTIPLEREFEREN

Identifier

R3AIKM_REMOVEMULTIPLEREFEREN

JavaScript

obj.REMOVEMULTIPLEREFEREN();

Description

Inverse kinematics object can apply inverse kinematics to a joint any number of times. This method removes multiple references so that I.K is applied to each joint only once.

IkPointCount

Attribute

IkPointCount

Identifier

R3AIKA_IkPointCount

JavaScript type

Integer

C type

R3INT

Description

number of ik points

Syntax


jsobj.SetIkPointCount(value);


R3INT value = ...;
R3SetAttrs(r3obj, R3AIKA_IkPointCount, value, R3TAG_END);

Displacement

Attribute

Displacement

Identifier

R3AIKA_Displacement

Type

r3Vect

Description

indexed attr, displacement from ideal path

Syntax


jsobj.SetDisplacement(index, value);
value = jsobj.GetDisplacement(index);


R3VECTOR value = ...;
R3SetAttrs(r3obj, R3AIKA_Displacement, value, R3TAG_END);
R3VECTOR value;
R3GetAttrs(r3obj, R3AIKA_Displacement, &value, R3TAG_END);

EnableDisplacement

Attribute

EnableDisplacement

Identifier

R3AIKA_EnableDisplacement

JavaScript type

Boolean

C type

R3BOOL

Description

enable displacement recording

Syntax


jsobj.SetEnableDisplacement(value);
value = jsobj.GetEnableDisplacement();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3AIKA_EnableDisplacement, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3AIKA_EnableDisplacement, &value, R3TAG_END);

index of the point to be controlled

target object

displacement from path

for future expand

initialize to zero

initialize to zero

target object, valid only in R3IKM_EVALTARGET method


r3appobj *

<sect6> <title>r3fprint</title>

r3fprint

Class

plugins/objects/fprint/r3fprint.h

Library

r3fprint

Description:

Foot print inverse kinematics

See Also

real/objects/r3aik.h

See Also

plugins/objects/fprint/r3foot.h

Super Class

r3Ainversekinematics

R3CLID_AINVERSEKINEMATICS

JavaScript

r3Footprint

Class Identifier

R3CLID_FOOTPRINT - 1490

Methods

EVALSTEPHEIGHT, DOUPDATE,

Attributes

StepHeight, TouchTime, Phase, Touch, Handness, JointType,

Registration

int R3RegisterFootPrintClass(R3APP *app);

we define handiness using r3foot object

R3FPRINTM_EVALSTEPHEIGHT

Method

EVALSTEPHEIGHT

Identifier

R3FPRINTM_EVALSTEPHEIGHT

Param 2:

R3INT, handness

Param 3:

R3FLOAT, height

JavaScript

obj.EVALSTEPHEIGHT(0, p2, p3);

Description

Evaluate step height in give parameter value

R3FPRINTM_DOUPDATE

Method

DOUPDATE

Identifier

R3FPRINTM_DOUPDATE

JavaScript

obj.DOUPDATE();

Description

Don't call directly.

StepHeight

Attribute

StepHeight

Identifier

R3FPRINTA_StepHeight

JavaScript type

Number

C type

R3FLOAT

Description

Syntax


jsobj.SetStepHeight(value);
value = jsobj.GetStepHeight();


R3FLOAT value = ...;
R3SetAttrs(r3obj, R3FPRINTA_StepHeight, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3FPRINTA_StepHeight, &value, R3TAG_END);

TouchTime

Attribute

TouchTime

Identifier

R3FPRINTA_TouchTime

JavaScript type

Number

C type

R3FLOAT

Description

time

Syntax


jsobj.SetTouchTime(value);
value = jsobj.GetTouchTime();


R3FLOAT value = ...;
R3SetAttrs(r3obj, R3FPRINTA_TouchTime, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3FPRINTA_TouchTime, &value, R3TAG_END);

Phase

Attribute

Phase

Identifier

R3FPRINTA_Phase

JavaScript type

Number

C type

R3FLOAT

Description

phase for the joint I.K path evaluation

Syntax


jsobj.SetPhase(value);
value = jsobj.GetPhase();


R3FLOAT value = ...;
R3SetAttrs(r3obj, R3FPRINTA_Phase, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3FPRINTA_Phase, &value, R3TAG_END);

Touch

Attribute

Touch

Identifier

R3FPRINTA_Touch

JavaScript type

Number

C type

R3FLOAT

Description

time the joint resides on the foot step before taking off towards the next foot step

Syntax


jsobj.SetTouch(value);
value = jsobj.GetTouch();


R3FLOAT value = ...;
R3SetAttrs(r3obj, R3FPRINTA_Touch, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3FPRINTA_Touch, &value, R3TAG_END);

Handness

Attribute

Handness

Identifier

R3FPRINTA_Handness

JavaScript type

Integer

C type

R3INT

Description

left/right handed skeletons are supported, see r3foot.h

Syntax


jsobj.SetHandness(value);
value = jsobj.GetHandness();


R3INT value = ...;
R3SetAttrs(r3obj, R3FPRINTA_Handness, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3FPRINTA_Handness, &value, R3TAG_END);

JointType

Attribute

JointType

Identifier

R3FPRINTA_JointType

JavaScript type

Integer

C type

R3INT

Description

see joint types below

Syntax


jsobj.SetJointType(value);
value = jsobj.GetJointType();


R3INT value = ...;
R3SetAttrs(r3obj, R3FPRINTA_JointType, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3FPRINTA_JointType, &value, R3TAG_END);

Dynamic tags we manage in skeletons

for binding skeletons to foot prints

Indexed dynamic tags (joint specific)

Default values for dynamic tags in case they are not defined

R3FPRINT_DEFAULTTOUCH
R3FPRINT_DEFAULTPHASE

Values for JointType tag

R3IKT_IGNORE
R3IKT_HEEL
R3IKT_MID
R3IKT_TOE

Tags

Tags

R3FPRINTA_RightPhase
</sect6>