r3chory

r3keyfr2

r3chory

Class

real/code/r3chory.h

Library

r3code

Description:

CHOREOGRAPHY Class.

See Also

oops/r3root.h

Super Class

r3Model

R3CLID_MODEL

JavaScript

r3Choreography

Class Identifier

R3CLID_CHOREOGRAPHY - 297

Methods

NEWCHOREOGRAPHY, SETBEGINEND, GETBEGINEND, EVALTIME, GETCURVE, SETFREQUENCY, GETFREQUENCY, SETACTIVE, GETACTIVE, GETWEIGHT, SETWEIGHT, GETPERIODIC, SETPERIODIC, GETPHASE, SETPHASE, DELCHOREOGRAPHY, NAMETOORDNUM, COPYCHOREOGRAPHY, RENAME, EXCHANGECHOREOGRAPHY, REPLACECHOREOGRAPHY, TRANSFORMTIMELINE, GETOPEN, SETOPEN, SETOPENALL, GETSHOWCURVE, SETSHOWCURVE, SETSHOWALLCURVES, GETCURVEACTIVE, SETCURVEACTIVE, GETSHOWLARGECURVE, SETSHOWLARGECURVE, TRANSFORMTIMELINEBYI, MAPGLOBALTOLOCAL, MAPLOCALTOGLOBAL, GETCLID, SETCLID, GETTIMEKEYS, UNSELECTALL, SELECTKNOT, MOVE, GETHIDDEN, SETHIDDEN, UP, DOWN, GETCHORNAME, BEGINANIM, ENDANIM, GETCHOROBJECT, SETCHOROBJECT, CHORBEGIN, CHOREND, SETPARENTSENSITIVE, GETPARENTSENSITIVE,

Attributes

Active, Names, Count, Parent,

R3CHRYM_NEWCHOREOGRAPHY

Method

NEWCHOREOGRAPHY

Identifier

R3CHRYM_NEWCHOREOGRAPHY

Return

R3INT, TRUE if succeeded

Param 1:

R3INT, ordnum of the chor to be inserted. -1 inserts after the current chor.

Param 3:

char*, name of the choreography to be created

JavaScript

rc = obj.NEWCHOREOGRAPHY(p1, p3);

Description

Create a new choreography

R3CHRYM_SETBEGINEND

Method

SETBEGINEND

Identifier

R3CHRYM_SETBEGINEND

Return

R3BOOL, true if succeeded

Param 1:

R3INT, choreography index

Param 2:

R3FLOAT, begin time in abs time space

Param 3:

R3FLOAT, end time in abs time space

JavaScript

rc = obj.SETBEGINEND(p1, p2, p3);

Description

Set timeline begin and end.

R3CHRYM_GETBEGINEND

Method

GETBEGINEND

Identifier

R3CHRYM_GETBEGINEND

Return

R3BOOL, true if succeeded

Param 1:

R3INT, choreography index

Param 2:

R3FLOAT, begin

Param 3:

R3FLOAT, end

JavaScript

rc = obj.GETBEGINEND(p1, p2, p3);

Description

Fetch time line begin and end times

R3CHRYM_EVALTIME

Method

EVALTIME

Identifier

R3CHRYM_EVALTIME

Return

R3BOOL, true if succeeded

Param 2:

R3FLOAT, time

Param 3:

R3FLOAT, time in choreographs local space

JavaScript

rc = obj.EVALTIME(0, p2, p3);

Description

Map time to chor's local space.

R3CHRYM_GETCURVE

Method

GETCURVE

Identifier

R3CHRYM_GETCURVE

Return

R3OBJ*, curve

Param 3:

R3INT, choreography

JavaScript

rc = obj.GETCURVE(p3);

Description

Fetch the input curve of given choreography.

R3CHRYM_SETFREQUENCY

Method

SETFREQUENCY

Identifier

R3CHRYM_SETFREQUENCY

Return

R3BOOL, true if valid chor index

Param 1:

R3INT, chor index

Param 3:

R3FLOAT, frequency

JavaScript

rc = obj.SETFREQUENCY(p1, p3);

Description

Set frequency attribute for the given choreography

R3CHRYM_GETFREQUENCY

Method

GETFREQUENCY

Identifier

R3CHRYM_GETFREQUENCY

Return

R3BOOL, true if chor index was valid

Param 1:

R3INT, chor index

Param 3:

R3FLOAT, buffer for the frequency

JavaScript

rc = obj.GETFREQUENCY(p1, p3);

Description

Fetch the frequency attribute of the given choreography

R3CHRYM_SETACTIVE

Method

SETACTIVE

Identifier

R3CHRYM_SETACTIVE

Return

R3BOOL, true if succeeded.

Param 1:

R3INT, choreography to be enabled/disabled

Param 3:

R3BOOL, true to enable, false to disable.

JavaScript

rc = obj.SETACTIVE(p1, p3);

Description

Enable/Disable a choreography

R3CHRYM_GETACTIVE

Method

GETACTIVE

Identifier

R3CHRYM_GETACTIVE

Return

R3BOOL, TRUE if active

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETACTIVE(p3);

Description

See if the given choreography is active.

R3CHRYM_GETWEIGHT

Method

GETWEIGHT

Identifier

R3CHRYM_GETWEIGHT

Return

R3BOOL, TRUE if chor index was valid

Param 1:

R3INT, chor index

Param 3:

R3FLOAT, weight

JavaScript

rc = obj.GETWEIGHT(p1, p3);

Description

Fetch the weight of the given choreography.

R3CHRYM_SETWEIGHT

Method

SETWEIGHT

Identifier

R3CHRYM_SETWEIGHT

Return

R3BOOL, true if chor index was valid

Param 1:

R3INT, chor index

Param 3:

R3FLOAT, weight

JavaScript

rc = obj.SETWEIGHT(p1, p3);

Description

Set the weight attribute for the given choreography.

R3CHRYM_GETPERIODIC

Method

GETPERIODIC

Identifier

R3CHRYM_GETPERIODIC

Return

R3BOOL, TRUE if periodic

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETPERIODIC(p3);

Description

Fetch the periodic attribute of the given choreography.

R3CHRYM_SETPERIODIC

Method

SETPERIODIC

Identifier

R3CHRYM_SETPERIODIC

Return

R3BOOL, true if valid chor

Param 1:

R3INT, chor index

Param 3:

R3BOOL, true to set periodic attribute, false to reset periodic attribute

JavaScript

rc = obj.SETPERIODIC(p1, p3);

Description

Make the given choreography periodic

R3CHRYM_GETPHASE

Method

GETPHASE

Identifier

R3CHRYM_GETPHASE

Return

R3BOOL, true if valid chor

Param 1:

R3INT, chor index

Param 3:

R3FLOAT, phase

JavaScript

rc = obj.GETPHASE(p1, p3);

Description

Fetch the time phase of the given choreography.

R3CHRYM_SETPHASE

Method

SETPHASE

Identifier

R3CHRYM_SETPHASE

Return

R3BOOL, true if valid chor index

Param 1:

R3INT, chor index

Param 3:

R3FLOAT, phase to be set

JavaScript

rc = obj.SETPHASE(p1, p3);

Description

Set phase for the given choreography.

R3CHRYM_DELCHOREOGRAPHY

Method

DELCHOREOGRAPHY

Identifier

R3CHRYM_DELCHOREOGRAPHY

Return

R3BOOL, true if found and successfully deleted

Param 3:

R3INT, ordnum of the choreography to be deleted

JavaScript

rc = obj.DELCHOREOGRAPHY(p3);

Description

Delete choreography by ordnum

R3CHRYM_NAMETOORDNUM

Method

NAMETOORDNUM

Identifier

R3CHRYM_NAMETOORDNUM

Return

R3BOOL, true if choreography was found

Param 1:

char*, name

Param 3:

R3INT*, ordnum

JavaScript

rc = obj.NAMETOORDNUM(p1, p3);

Description

Find ordnum by name

R3CHRYM_COPYCHOREOGRAPHY

Method

COPYCHOREOGRAPHY

Identifier

R3CHRYM_COPYCHOREOGRAPHY

Return

R3BOOL, true if succeeded

Param 1:

R3INT, chor to be copied

Param 3:

R3INT, ordnum of the newly created chor.

JavaScript

rc = obj.COPYCHOREOGRAPHY(p1, p3);

Description

Create a new choreography by duplicating the given choreography

R3CHRYM_RENAME

Method

RENAME

Identifier

R3CHRYM_RENAME

Return

R3BOOL, true if succeeded

Param 1:

R3INT, ordnum

Param 3:

char*, new name.

JavaScript

rc = obj.RENAME(p1, p3);

Description

rename the choreography by ordnum. The name of the choreography consists of three parts: object/choreography/input.

R3CHRYM_EXCHANGECHOREOGRAPHY

Method

EXCHANGECHOREOGRAPHY

Identifier

R3CHRYM_EXCHANGECHOREOGRAPHY

Param 1:

R3INT, choreography to be exported

Param 3:

R3OBJ*, target object

JavaScript

obj.EXCHANGECHOREOGRAPHY(p1, p3);

Description

Copy choreography 'index' to given object.

R3CHRYM_REPLACECHOREOGRAPHY

Method

REPLACECHOREOGRAPHY

Identifier

R3CHRYM_REPLACECHOREOGRAPHY

Return

R3BOOL, true if succeeded

Param 1:

R3INT, index

Param 2:

R3OBJ*, to object

Param 3:

R3INT, to index

JavaScript

rc = obj.REPLACECHOREOGRAPHY(p1, p2, p3);

Description

replace choreography

R3CHRYM_TRANSFORMTIMELINE

Method

TRANSFORMTIMELINE

Identifier

R3CHRYM_TRANSFORMTIMELINE

Param 1:

R3INT, choreography index

Param 2:

R3FLOAT, translate

Param 3:

R3FLOAT, scale

JavaScript

obj.TRANSFORMTIMELINE(p1, p2, p3);

Description

Transform all choreography time lines

R3CHRYM_GETOPEN

Method

GETOPEN

Identifier

R3CHRYM_GETOPEN

Return

R3BOOL, true if open, false if closed

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETOPEN(p3);

Description

See if the choreography level is open or closed.

R3CHRYM_SETOPEN

Method

SETOPEN

Identifier

R3CHRYM_SETOPEN

Return

R3BOOL, true if valid chor index

Param 1:

R3INT, chor index

Param 3:

R3BOOL, true to open, false to close

JavaScript

rc = obj.SETOPEN(p1, p3);

Description

Open or close the given choreography level

R3CHRYM_SETOPENALL

Method

SETOPENALL

Identifier

R3CHRYM_SETOPENALL

Param 3:

R3BOOL, true opens, false closes

JavaScript

obj.SETOPENALL(p3);

Description

Open/close all choreographs

R3CHRYM_GETSHOWCURVE

Method

GETSHOWCURVE

Identifier

R3CHRYM_GETSHOWCURVE

Return

R3BOOL, true if visible

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETSHOWCURVE(p3);

Description

See if the given chor weight curve is visible

R3CHRYM_SETSHOWCURVE

Method

SETSHOWCURVE

Identifier

R3CHRYM_SETSHOWCURVE

Return

R3BOOL, true if succeeded

Param 1:

R3INT, chor index

Param 3:

R3BOOL, true to show, false to hide

JavaScript

rc = obj.SETSHOWCURVE(p1, p3);

Description

Show/hide weight curve for the given choreography

R3CHRYM_SETSHOWALLCURVES

Method

SETSHOWALLCURVES

Identifier

R3CHRYM_SETSHOWALLCURVES

Param 3:

R3BOOL, true or false to show or hide

JavaScript

obj.SETSHOWALLCURVES(p3);

Description

Show/hide all weight curves

R3CHRYM_GETCURVEACTIVE

Method

GETCURVEACTIVE

Identifier

R3CHRYM_GETCURVEACTIVE

Return

R3BOOL, true if active

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETCURVEACTIVE(p3);

Description

See if input curve is active for the given choreography

R3CHRYM_SETCURVEACTIVE

Method

SETCURVEACTIVE

Identifier

R3CHRYM_SETCURVEACTIVE

Return

R3BOOL, true if succeeded

Param 1:

R3INT, chor index

Param 3:

R3BOOL, true to enable, false to disable

JavaScript

rc = obj.SETCURVEACTIVE(p1, p3);

Description

Enable / disable input curve for the given choreography

R3CHRYM_GETSHOWLARGECURVE

Method

GETSHOWLARGECURVE

Identifier

R3CHRYM_GETSHOWLARGECURVE

Return

R3BOOL, true if maximized

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETSHOWLARGECURVE(p3);

Description

See if the curve is in maximized state.

R3CHRYM_SETSHOWLARGECURVE

Method

SETSHOWLARGECURVE

Identifier

R3CHRYM_SETSHOWLARGECURVE

Return

R3BOOL, true if succeeded

Param 1:

R3INT, chor index

Param 3:

R3BOOL, true maximizes, false minizes

JavaScript

rc = obj.SETSHOWLARGECURVE(p1, p3);

Description

Minimize or maximize the curve of the given choreography.

R3CHRYM_TRANSFORMTIMELINEBYI

Method

TRANSFORMTIMELINEBYI

Identifier

R3CHRYM_TRANSFORMTIMELINEBYI

Param 1:

R3INT, choreography index

Param 2:

R3FLOAT, translate

Param 3:

R3FLOAT, scale

JavaScript

obj.TRANSFORMTIMELINEBYI(p1, p2, p3);

Description

Transform a single choreography time lines

R3CHRYM_MAPGLOBALTOLOCAL

Method

MAPGLOBALTOLOCAL

Identifier

R3CHRYM_MAPGLOBALTOLOCAL

Param 1:

R3INT, chor index or -1 for the current chor

Param 3:

R3FLOAT, global time

JavaScript

obj.MAPGLOBALTOLOCAL(p1, p3);

Description

Apply inverse time line transformation to given global time to * get it mapped to objects local time space.

R3CHRYM_MAPLOCALTOGLOBAL

Method

MAPLOCALTOGLOBAL

Identifier

R3CHRYM_MAPLOCALTOGLOBAL

Param 1:

R3INT, chor index or -1 for the current chor

Param 3:

R3FLOAT, time

JavaScript

obj.MAPLOCALTOGLOBAL(p1, p3);

Description

Apply time line transformation specified to map time value from * objects local space to parent space.

R3CHRYM_GETCLID

Method

GETCLID

Identifier

R3CHRYM_GETCLID

Return

R3CLID, class id

Param 3:

R3INT, index of the choreography

JavaScript

rc = obj.GETCLID(p3);

Description

Fetch class id of the choreography specified by chor index.

R3CHRYM_SETCLID

Method

SETCLID

Identifier

R3CHRYM_SETCLID

Return

R3BOOL, true if succeeded

Param 1:

R3INT, index

Param 3:

R3CLID, class id

JavaScript

rc = obj.SETCLID(p1, p3);

Description

Set class id of the choreography specified by chor index. Called internally.

R3CHRYM_GETTIMEKEYS

Method

GETTIMEKEYS

Identifier

R3CHRYM_GETTIMEKEYS

Return

R3BOOL, true if succeeded.

Param 1:

R3INT, animated tag

Param 2:

R3INT, animated tag index, if indexed tag. -1 for regular tags

JavaScript

rc = obj.GETTIMEKEYS(p1, p2, 0);

Description

Fetch key frame time values.

R3CHRYM_UNSELECTALL

Method

UNSELECTALL

Identifier

R3CHRYM_UNSELECTALL

Param 1:

R3INT, attribute id, or 0 for any

Param 3:

R3INT, index if indexed attribute, -1 if regular

JavaScript

obj.UNSELECTALL(p1, p3);

Description

Unselect all key frames

R3CHRYM_SELECTKNOT

Method

SELECTKNOT

Identifier

R3CHRYM_SELECTKNOT

Return

R3BOOL, TRUE if succeeded

Param 1:

R3INT, tag

Param 2:

R3INT, tag index

Param 3:

R3TAG*, R3CHRYA_Active, R3CHRYA_Separate, R3CHRYA_KnotIndex

JavaScript

rc = obj.SELECTKNOT(p1, p2, p3);

Description

Select given knot

R3CHRYM_MOVE

Method

MOVE

Identifier

R3CHRYM_MOVE

Return

R3BOOL, true if both indexes were valid and chors were swapped

Param 1:

R3INT, ordnum of the chor to be moved

Param 3:

R3INT, new ordnum for the chor

JavaScript

rc = obj.MOVE(p1, p3);

Description

Move the given choreography to another level in the constr. stack.

R3CHRYM_GETHIDDEN

Method

GETHIDDEN

Identifier

R3CHRYM_GETHIDDEN

Return

R3BOOL, true if hidden

Param 3:

R3INT, choreography index or -1 for the current choreography

JavaScript

rc = obj.GETHIDDEN(p3);

Description

Return TRUE if the given choreography is hidden

R3CHRYM_SETHIDDEN

Method

SETHIDDEN

Identifier

R3CHRYM_SETHIDDEN

Return

R3BOOL, true if succeeded

Param 1:

R3INT, choreography index or -1 for the current choreography

Param 3:

R3BOOL, true to hide, false to show

JavaScript

rc = obj.SETHIDDEN(p1, p3);

Description

Set choreograps hidden state.

R3CHRYM_UP

Method

UP

Identifier

R3CHRYM_UP

Return

R3BOOL, true if succeeded, false for no more chors.

JavaScript

rc = obj.UP();

Description

Make the next choreography the current choreography.

R3CHRYM_DOWN

Method

DOWN

Identifier

R3CHRYM_DOWN

Return

R3BOOL, true if succeeded, false for no more chors.

JavaScript

rc = obj.DOWN();

Description

Make the previous choreography the current choreography.

R3CHRYM_GETCHORNAME

Method

GETCHORNAME

Identifier

R3CHRYM_GETCHORNAME

Return

char*, name

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETCHORNAME(p3);

Description

Fetch the name of the given chor

R3CHRYM_BEGINANIM

Method

BEGINANIM

Identifier

R3CHRYM_BEGINANIM

JavaScript

obj.BEGINANIM();

Description

Called when animation playback is about to start. Choreographs * can allocate and prepare optimization data etc. here.

R3CHRYM_ENDANIM

Method

ENDANIM

Identifier

R3CHRYM_ENDANIM

JavaScript

obj.ENDANIM();

Description

Called when animation playback has stopped.

R3CHRYM_GETCHOROBJECT

Method

GETCHOROBJECT

Identifier

R3CHRYM_GETCHOROBJECT

Return

R3OBJ*, choreography object

Param 3:

R3INT, choreography index

JavaScript

rc = obj.GETCHOROBJECT(p3);

Description

Fetch the choreography object of the given choreography.

R3CHRYM_SETCHOROBJECT

Method

SETCHOROBJECT

Identifier

R3CHRYM_SETCHOROBJECT

Return

R3BOOL, TRUE if succeeded.

Param 3:

R3INT, choreography index

JavaScript

rc = obj.SETCHOROBJECT(p3);

Description

Assign choreography object with the given choreography inded. The old choreography object is disposed.

R3CHRYM_CHORBEGIN

Method

CHORBEGIN

Identifier

R3CHRYM_CHORBEGIN

Return

void*, data which will be passed to choreography objects.

Param 1:

R3INT, choreography index

Param 3:

R3OBJ*, target object

JavaScript

rc = obj.CHORBEGIN(p1, p3);

Description

Prepare choreography for execution. This generates R3ACOCM_CHORBEGIN * class method to the choreography. Class can allocate and initialize any choreography * specific data needed by the choreography objects.

R3CHRYM_CHOREND

Method

CHOREND

Identifier

R3CHRYM_CHOREND

Param 1:

R3INT, choreography index

Param 3:

void*, context allocated by the CHORBEGIN

JavaScript

obj.CHOREND(p1, p3);

Description

Free choreography data. Generates R3ACOCM_CHOREND class method to the choreography * class, in which chor specific data can be freed.

R3CHRYM_SETPARENTSENSITIVE

Method

SETPARENTSENSITIVE

Identifier

R3CHRYM_SETPARENTSENSITIVE

Return

R3BOOL, true if succeeded

Param 1:

R3INT, chor index

Param 3:

R3BOOL, true to make sensitive, false to reset sensitivity

JavaScript

rc = obj.SETPARENTSENSITIVE(p1, p3);

Description

Make the time line parent sensitive.

R3CHRYM_GETPARENTSENSITIVE

Method

GETPARENTSENSITIVE

Identifier

R3CHRYM_GETPARENTSENSITIVE

Return

R3BOOL, true if parent sensitive

Param 3:

R3INT, chor index

JavaScript

rc = obj.GETPARENTSENSITIVE(p3);

Description

See if the chor is parent sensitive

Active

Attribute

Active

Identifier

R3CHRYA_Active

JavaScript type

Integer

C type

R3INT

Description

ordnum of the active chor

Syntax


jsobj.SetActive(value);
value = jsobj.GetActive();


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

Names

Attribute

Names

Identifier

R3CHRYA_Names

JavaScript type

String

C type

char**

Description

array of choreography names

Syntax


value = jsobj.GetNames();


char** value;
R3GetAttrs(r3obj, R3CHRYA_Names, &value, R3TAG_END);

Count

Attribute

Count

Identifier

R3CHRYA_Count

JavaScript type

Integer

C type

R3INT

Description

number of choreographs

Syntax


value = jsobj.GetCount();


R3INT value;
R3GetAttrs(r3obj, R3CHRYA_Count, &value, R3TAG_END);

Parent

Attribute

Parent

Identifier

R3CHRYA_Parent

JavaScript type

Object

C type

R3OBJ*

Description

parent object

Syntax


jsobj.SetParent(value);


R3OBJ* value = ...;
R3SetAttrs(r3obj, R3CHRYA_Parent, value, R3TAG_END);

IFF chunk id for choreographs

it is up to the sub class to implement key frames

size of the structure

time

Tags

Tags

R3CHRYA_SeparateKeys
R3CHRYA_Keys
R3CHRYA_KeyIndex