VController

consoledoc.h

More...

Controller

int

Current position of the Controller (in milliseconds).

int

Total length of the sequence (in milliseconds).

float

Speed of playback. A value > 0.0 will enable the Controller to play forwards, while a value < 0.0 will play backwards. If |TimeScale| > 1.0, then playback will be faster than normal, while |TimeScale| < 1.0 will be slower.

bool

Instead of stopping once playback is complete, the Controller will reset and resume play.

bool

When the sequence loops, reverse the direction of play.

int

The number of times the sequence loops before stopping. -1 will cause the sequence to loop indefinitely.

int

When the sequence loops, delay playback by this value (in milliseconds).

bool

When the sequence is completed, reset the state of the Controller.

Public Functions

void
addDataField(String fieldType, String fieldName)

Add a new data entry to the Data Table.

void

Add a child object to this node.

void

Detaches and deletes all of the child objects.

int

Get the number of child objects.

int

Get the number of data elements in the Data Table.

string
getDataFieldName(int index)

Get the name of the field given by the passed index.

string
getDataFieldType(String fieldName)

Get the type of data for the given field.

string
getDataFieldValue(String fieldName)

Get the evaluated data from the data field.

int
getObject(int index)

Get the object corresponding to the given index.

float

Get the playback speed. A value > 0.0 will enable the Controller to play forwards, while a value < 0.0 will play backwards.

bool
isDataField(String fieldName)

Is the field a member of the Data Table?

bool

Is the sequence currently paused?

bool

Is the sequence currently playing?

bool

Is the sequence currently stopped?

void

Pause the sequence. Playback can resume by calling VController::play().

void
play(int time)

Play the sequence. If a value for pTime is specified, the Controller is reset and played from that time.

bool
readFile(String fileName)

Clears the object and loads the new data from the given filename.

bool
readTemplate(String fileName)

Load data from given filename.

void
removeDataField(String fieldName)

Remove a data entry from the Data Table.

void

Remove the target object from this node.

void
reset(int time)

Reset the Controller's and child object's state.

void
setTimeScale(float timeScale)

Set the playback speed. A value > 0.0 will enable the Controller to play forwards, while a value < 0.0 will play backwards. If |pTimeScale| > 1.0, then playback will be faster than normal, while |pTimeScale| < 1.0 will be slower.

void

Sort Groups by their Labels.

void

Sort Tracks by their Labels.

void
step()

Step forward one frame.

void
stop(bool reset)

Stop the sequence and optionally reset it.

bool
writeFile(String fileName)

Save to a given filename.

Detailed Description

UNDOCUMENTED!

Controller

int Time 

Current position of the Controller (in milliseconds).

int Duration 

Total length of the sequence (in milliseconds).

float TimeScale 

Speed of playback. A value > 0.0 will enable the Controller to play forwards, while a value < 0.0 will play backwards. If |TimeScale| > 1.0, then playback will be faster than normal, while |TimeScale| < 1.0 will be slower.

bool Loop 

Instead of stopping once playback is complete, the Controller will reset and resume play.

bool LoopBackwards 

When the sequence loops, reverse the direction of play.

int LoopCount 

The number of times the sequence loops before stopping. -1 will cause the sequence to loop indefinitely.

int LoopDelay 

When the sequence loops, delay playback by this value (in milliseconds).

bool ResetOnCompletion 

When the sequence is completed, reset the state of the Controller.

Public Functions

addDataField(String fieldType, String fieldName)

Add a new data entry to the Data Table.

Parameters:

pFieldType

The method of evaluating the field's data.

pFieldName

The name of the field to be added to the Data Table.

return:

No return value.

addObject(SimObject simObj)

Add a child object to this node.

Parameters:

pObject

The SimObjectID of the object to be added to this node.

return:

No return value.

clear()

Detaches and deletes all of the child objects.

return:

No return value.

getCount()

Get the number of child objects.

return:

Returns the number of child objects.

getDataFieldCount()

Get the number of data elements in the Data Table.

return:

Returns the size of the Data Table.

getDataFieldName(int index)

Get the name of the field given by the passed index.

Parameters:

pIndex

The index of the data field you wish to check.

return:

Returns the name of the field corresponding to the given index.

getDataFieldType(String fieldName)

Get the type of data for the given field.

Parameters:

pFieldName

The name of the field you wish to check.

return:

Returns the data type.

getDataFieldValue(String fieldName)

Get the evaluated data from the data field.

Parameters:

pFieldName

The name of the field you wish to evaluate.

return:

Returns the evaluated data from the field.

getObject(int index)

Get the object corresponding to the given index.

Parameters:

pIndex

The index of the object you wish to retrieve.

return:

Returns the SimObjectID for the object.

getTimeScale()

Get the playback speed. A value > 0.0 will enable the Controller to play forwards, while a value < 0.0 will play backwards.

return:

Playback Speed.

isDataField(String fieldName)

Is the field a member of the Data Table?

Parameters:

pFieldName

The name of the dynamic field you wish to check.

return:

Returns true if the field is a member of the Data Table.

isPaused()

Is the sequence currently paused?

return:

Returns true if the Controller is paused.

isPlaying()

Is the sequence currently playing?

return:

Returns true if the Controller is playing.

isStopped()

Is the sequence currently stopped?

return:

Returns true if the Controller is stopped.

pause()

Pause the sequence. Playback can resume by calling VController::play().

return:

No return value.

play(int time)

Play the sequence. If a value for pTime is specified, the Controller is reset and played from that time.

Parameters:

pTime

The time to start playing the sequence from.

return:

No return value.

readFile(String fileName)

Clears the object and loads the new data from the given filename.

Parameters:

pFileName

The target file to read from.

return:

Returns true if the read was successful.

readTemplate(String fileName)

Load data from given filename.

Parameters:

pFileName

The target file to read from.

return:

Returns true if the read was successful.

removeDataField(String fieldName)

Remove a data entry from the Data Table.

Parameters:

pFieldName

The name of the field to be removed from the Data Table.

return:

No return value.

removeObject(SimObject simObj)

Remove the target object from this node.

Parameters:

pObject

The SimObjectID of the object to be removed from this node.

return:

No return value.

reset(int time)

Reset the Controller's and child object's state.

Parameters:

pTime

The target time to reset to.

return:

No return value.

setTimeScale(float timeScale)

Set the playback speed. A value > 0.0 will enable the Controller to play forwards, while a value < 0.0 will play backwards. If |pTimeScale| > 1.0, then playback will be faster than normal, while |pTimeScale| < 1.0 will be slower.

Parameters:

pTimeScale

Playback speed.

return:

No return value.

sortGroups()

Sort Groups by their Labels.

return:

No return value.

sortTracks()

Sort Tracks by their Labels.

return:

No return value.

step()

Step forward one frame.

return:

No return value.

stop(bool reset)

Stop the sequence and optionally reset it.

Parameters:

pReset

Reset the Controller after stopping.

return:

No return value.

writeFile(String fileName)

Save to a given filename.

Parameters:

pFileName

The target file to write to.

return:

Returns true if the write was successful.