Functions

Vanda Engine 1.3.3

TODO: To change the header's content go to Dr.Explain menu Options : Project Settings : HTML (CHM) Export : Setup HTML Template and Layout
TODO: To change the footer's content go to Dr.Explain menu Options : Project Settings : HTML (CHM) Export : Setup HTML Template and Layout
Functions
  

Animating 3D characters and animated instanced geometries
Vanda Engine provides all mechanisms needed to load, render and animate 3D  models. Loading the 3D models is done with the interface, and rendering the models is done by Vanda Engine automatically. Vanda Engine lets you manipulate the animations of the scenes via the script.
 
There are two different approaches for animation:
·    Looping animation (handled by BlendCycle and ClearCycle)
·    One time animation (handled by ExecuteAction and ReverseExecuteAction)
 
As the names suggested it is possible to both repeat the animation as long as needed, and to play the animation just once.
 
All of the functions that manipulate animations deal with animation clips. Animation clips can be used to separate different pieces of a set of animations. For example, an animation might have a character walk, then run. The walking and running animations can be separated as two different clips. Clips can also be used to separate the animations of different characters in the same scene, or even different parts of the same character (such as upper and lower body).
If you don'e specify animation clips for your animated geometries, Vanda Engine creates a default animation clip called defaultClip.
 
Animation is a per scene feature. It means that when you activate an animation clip of a scene, all of the geometries affected by that animation clip are animated and all of the nodes and hierarchies (including static nodes of static geometries ) are recalculated as well. Due to that, it's strongly recommended that you export the static geometries separately.
 
BlendCycle
bool     BlendCycle (char* sceneName, char* clipName, float weight, float delay)
 
Interpolates the weight of an animation cycle.
This function interpolates the weight of an animation cycle to a new value in a given amount of time. If the specified animation cycle is not active yet, it is activated.
 
Parameters
·    sceneName: The external scene name that its animation clip should be blended.
·    clipName: The clip name of the animation cycle that should be blended. If your scene does not contain animation clip, set this parameter to "defaultClip".
·    weight:The weight to interpolate the animation cycle to.
·    delay:The time in seconds until the new weight should be reached.
 
Returns
One of the following values:
·    true if successful
·    false if an error happened
 
example
BlendCycle( "hand amb.dae", "byebye", 1.0, 0.5 )
 
ClearCycle
bool     ClearCycle (char* sceneName, char* clipName, float delay)
 
 Fades an animation cycle out.
This function fades an animation cycle out in a given amount of time.
 
Parameters
·    sceneName: The external scene name that its animation clip should be cleared.
·    clipName: The clip name of the animation cycle that should be cleared. If your scene does not contain animation clip, set this parameter to "defaultClip".
·    delay: The time in seconds until the the animation cycle is completely removed.
 
Returns
One of the following values:
·    true if successful
·    false if an error happened
 
example
ClearCycle( "hand amb.dae", "byebye", 0.5 );
 
ExecuteAction
bool     ExecuteAction( char* sceneName, char* clipName, float delayIn, float delayOut, float weightTarget = 1.0f, bool lockToLastKeyframe = false)
 
Executes an animation action.
This function executes an animation action.
 
Parameters
·    sceneName: The external scene name that its animation clip should be executed.
·    clipName: The clip name of the animation cycle that should be executed. If your scene does not contain animation clip, set this parameter to "defaultClip".
·    delayIn: The time in seconds until the animation action reaches the full weight ( specified by weightTarget ) from the beginning of its execution.
·    delayOut: The time in seconds in which the animation action reaches zero weight at the end of its execution.
·    lockToLastKeyframe: Lets you lock the clip name to its last keyframe at the end of its execution. For example, if you want to open a door, you should tell Vanda Engine to lock the animation to the last keyframe at the end of its execution. Otherwise, the door returns back to it status specified by first keyframe.
 
Returns
One of the following values:
·    true if successful
·    false if an error happened
 
example
ExecuteAction( "SampleInstancedGeometries.dae", "defaultclip", 0.5, 0.5, 1, true )
 
ReverseExecuteAction
bool     ReverseExecuteAction( char* sceneName, char* clipName )
 
Executes an animation action in reverse order. If the specified action is not in 'action' status this function returns false. If the specified action is in action status, but its current keyframe is 0, this function returns false as well.
 
Parameters
·    sceneName: The external scene name that its animation clip should be executed.
·    clipName: The clip name of the animation cycle that should be executed. If your scene does not contain animation clip, set this parameter to "defaultClip".
 
Returns
One of the following values:
·    true if successful
·    false if an error happened
 
example
ReverseExecuteAction( "SampleInstancedGeometries.dae", "defaultclip" )
 
Loading another VScene
It's possible to load another VScene while entering or leaving a trigger. Simply use the LoadScene function and assign the script to the trigger event.
 
LoadVScene
bool     LoadVScene(char* sceneName)
 
Loads the VScene specified by sceneName argument.
 
Parameters
sceneName: The VScene name that should be loaded.
 
Returns
One of the following values:
·    true if successful
·    false if an error happened
 
example
LoadVScene( "Second Scene" )
 
This opens a saved VScene name called Second Scene.vin.
 
Sounds
 
PlaySound
int PlaySound( char* SoundName1, char* soundName2, ..., char* loopStatus)
 
Plays the sounds specified by SoundName arguments.
 
Parameters
SoundName[1...n]: The sound names to be played.
loopStatus: Optional. Valid string is "VANDA_LOOP". If "VANDA_LOOP" is specified, VE loops the sounds, otherwise it plays the specified sounds once.
 
example
PlaySound( "static1", "static2", "VANDA_LOOP" )
 
StopSound
int StopSound( char* SoundName1, char* soundName2, ...)
 
Stops the sounds specified by SoundName arguments.
 
Parameters
SoundName[1...n]: The sound names to be stopped.
 
 
example
StopSound( "static1", "static2" )
 
PauseSound
int PauseSound( char* SoundName1, char* soundName2, ...)
 
Pauses the sounds specified by SoundName arguments.
 
Parameters
SoundName[1...n]: The sound names to be paused.
 
 
example
PauseSound( "static1", "static2" )
 
 
  
Made with help of Dr.Explain