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

Follower(oscar) LYMB Follower(oscar)

NAME

follower - an actor that always faces the camera

DESCRIPTION

A follower is an actor that always looks at the camera. It adjusts its orientation so it is always facing parallel to the view plane normal defined by a specified camera. It is primarily used for models whose appearance depends on them being square to the camera, such as text modellers (see hershey_text).

SUPERCLASS

person

INSTANCE VARIABLES

camera The name of the camera to compute its orientation from. This should be the same camera that the current renderer is using.

MESSAGES

camera[=?] Set/get the name of the camera object.

matrix? Overriden from superclass. This is necessary because the follower's transformation must be adjusted before its model is rendered. The follower asks its camera for its position and focal point and adjusts its orientation to be parallel to this vector.

EXAMPLES

The following LYMB script creates a camera, hershey_text modeller and a follower. The follower is given the name of the camera and it will compute its orientation when rendered to face the camera. From the renderer's point of view, the follower is just like an actor.

camera new: cam1 position=(10,10,10) focal_point=(0,0,0) on! ;

hershey_text new: text_mod text="Can you read this?" center! ;

follower new: message camera=cam1 modeller=text_mod ;

vogle_x11 new: aren actors=message cameras=cam1 ;

SEE ALSO

actor, person, modeller, hershey_text, renderer


Please send comments and suggestions to
consult@rpi.edu