<<<<<<<<<<<<<<<<<

real_time_scene(oscar) OSCAR real_time_scene(oscar)

NAME

real_time_scene - a scene object that uses wall clock time to run scenes

DESCRIPTION

The real_time_scene object is very similar to a scene but has a different philosophy. The real_time_scene object sends time= and update! messages to its cues. The scene object just sends tick!'s. The current time is determined by the start time of the real_time_scene plus the elapsed wall clock time. There is also a message for recording using a real_time_scene object. When using this message the current time is determined by the start time plus the number of frames that have elapsed divided by the frame rate.

To use the real_time_scene object cues should be absolute, not relative. A tick_action of `acamera yaw: 5;' doesn't really make sense. See the example below.

All times are in seconds.

SUPERCLASS

scene

INSTANCE VARIABLES

rate When playing back a scene this determines how fast to play it. A rate of 2.0 means play it twice as fast a normal. A rate of 0.5 means play it at half it's normal speed. A rate of 0.1 should be used to simulate ABC's super slow mo.

start At what time does the scene start.

end At what time does the scene end.

last_time What was the last time, used for calculating the delta time.

MESSAGES

delta_time? How much time has elapsed between the current tick and the previous one.

start! Starts runnning the real_time_scene.

start_record! Starts runnning the real_time_scene but uses the recorders frame_rate for timing, not the wall_clock.

update_real_time! Updates the current time based on the wall clock time elapsed. Normally you wouldn't need to use this.

EXAMPLE

cube_modeller new: cube_model resolution= 3 ;

actor new: cube modeller= cube_model color=(1,0.7,1.0) position=(3,0,0) origin=(-3,0,0) ;

camera new: c1 view_angle= 50 position= (7,0,0) focal_point=(0,0,0) on! ;

light new: l1 position=(5,3,1) focal_point=(0,0,0) on! ;

environment new: `_env' variable="LYMB_RENDERER" ; object# [_env value?] new: `aren' background= (0.3,0.4,0.5) actors= cube cameras= `c1' lights= `l1' ;

aren render!;

cue new: rotate_cube tick_actions=` cube rotate_y: [scalar new! = [ascene delta_time?] * 90 ? free!]; ' start= 0.0 end= 10.0

;

! rotate the cube for ten seconds at 90 degrees per second real_time_scene new: ascene cues= `rotate_cube' renderer= `aren' start= 0.0 end= 10.0 start! ;

SEE ALSO

scene cue loop


Please send comments and suggestions to
consult@rpi.edu