The SceneGraph3D Description Language

Home About EaZD Deferred renderer API SceneGraph3D API SceneGraph3D scene description language

Index

| Scene file structure | camera | character | directory | eventmessage | group | input | light | linearmotion | material | node | object | proximitytrigger | skylight | spinner | surface | transformation | user | world |

transformation

Derived from: TransformNode3D
Class name: LinearMotion3D
Placement: Anywhere
Description: This special transformation node implements a translation of all sub-nodes along a predefined direction over time.
Special notes: -
Inherited attributes: name, active, visible
New attributes:
attribute type description
begin VEC3 The starting position of the linear translation
end VEC3 The end location of the linear translation
repeats FLOAT The number of repetitions of the movement. All positive values are accepted. Can be zero for infinite loops.
duration FLOAT The period of each movement
mode OPTION
oneway
pingpong
When in oneway mode, the translation wraps around the end position. When in pingpong mode, the motion direction is reversed upon reaching the end location.
Events:
event name condition
- -
Inherited events: -
New messages:
attribute type description
start - Starts the animation
stop - Stops and resets the animation
pause - Pauses the animation (and does not reset it)
begin VEC3 The starting position of the linear translation
end VEC3 The end location of the linear translation
repeats FLOAT The number of repetitions of the movement. All positive values are accepted. Can be zero for infinite loops.
duration FLOAT The period of each movement
mode OPTION
oneway
pingpong
When in oneway mode, the translation wraps around the end position. When in pingpong mode, the motion direction is reversed upon reaching the end location.
Inherited messages: active, visible, hide, show, deactivate, enable, activate, disable
Redefined messages: -
Obsolete messages: transation, scale, rotation


Example

<world ambient_occlusion="ssao" bloom="yes" shadows="disk" 
       ao_radius="6" ambient="0.3 0.3 0.3" defocus="yes">
   
    <camera name="first_person" apperture="50.0" 
            focal_distance ="30.0" focal_range="30.0"
            near="2.0" far="1000" follow="Myself" primary="true">
    </camera> 

    <linearmotion name="car1_motion" 
                 begin="68,0,0" end="-68,0,0" 
                 repeats="0" duration="6.0" mode="oneway">
<transformation rotation="0,1,0,0" scale="1,1,1" translation="0,0.6,-20.5">
<object file="car.obj"></object>
</transformation>
</linearmotion>

<user name="Myself" control="navigate" speed="2.0" turn="0.5 freeroll="false" position="0,50,50" lookat="0,0,-10" input="Console"> </user> <input name="Console" type="mousekeyboard"> <eventmessage event="button1pressed" recipient="car1_motion" message="start"></eventmessage>
</input> </world>

Last update: 23 Feb. 2010