TOC PREV NEXT INDEX

GDcamera_xxxx

Synopsis

routines to access the Graphics Display Kit camera

GDcamera_get_xxxx

GDcamera_get_xxxx

void GDcamera_get_type ( camera_id, int *type );
void GDcamera_get_render_mode ( camera_id, int *mode );
void _ GDcamera_get_from ( camera_id , _float _* from _);
void _ GDcamera_get_up ( camera_id , _float _* up _);
void _ GDcamera_get_at ( camera_id , _float _* at _);
void _ GDcamera_get_scale ( camera_id , _float _* scale _);
void _ GDcamera_get_perspec ( camera_id , _int _* perspec _);
void _ GDcamera_get_hither ( camera_id , _int _* hither _);
void _ GDcamera_get_front ( camera_id , _float _* front _);
void _ GDcamera_get_back ( camera_id , _float _* back _);
void _ GDcamera_get_fov ( camera_id , _float _* fov _);
void _ GDcamera_get_wsize ( camera_id , _float _* wsize _);
void _ GDcamera_get_depth_cue ( camera_id , _int _* depth_cue _);
void _ GDcamera_get_depth_front ( camera_id , _float _* depth_front _);
void _ GDcamera_get_depth_back ( camera_id , _float _* depth_back _);
void _ GDcamera_get_depth_scale ( camera_id , _float _* depth_scale _);
void _ GDcamera_get_auto_norm ( camera_id , _int _* auto_norm _);
void _ GDcamera_get_extents ( camera_id , _int _* extents _);
void _ GDcamera_get_mapping ( camera_id , _int _* mapping _);
void _ GDcamera_get_image_pass ( camera_id , _int _* image_pass _);
void _ GDcamera_get_pickable ( camera_id , _int _* pickable _);

OMobj_id _ camera_id

GDcamera_set_xxxx

void GDcamera_set_type ( camera_id, int type );
void GDcamera_set_render_mode ( camera_id, int mode );
void _ GDcamera_set_from ( camera_id , _float _* from _);
void _ GDcamera_set_up ( camera_id , _float _* up _);
void _ GDcamera_set_at ( camera_id , _float _* at _);
void _ GDcamera_set_scale ( camera_id , _float _ scale _);
void _ GDcamera_set_perspec ( camera_id , _int _ perspec _);
void _ GDcamera_set_hither ( camera_id , _int _ hither _);
void _ GDcamera_set_front ( camera_id , _float _ front _);
void _ GDcamera_set_back ( camera_id , _float _ back _);
void _ GDcamera_set_fov ( camera_id , _float _ fov _);
void _ GDcamera_set_wsize ( camera_id , _float _ wsize _);
void _ GDcamera_set_depth_cue ( camera_id , _int _ depth_cue _);
void _ GDcamera_set_depth_front ( camera_id , _float _ depth_front _);
void _ GDcamera_set_depth_back ( camera_id , _float _ depth_back _);
void _ GDcamera_set_depth_scale ( camera_id , _float _ depth_scale _);
void _ GDcamera_set_auto_norm ( camera_id , _int _ auto_norm _);
void _ GDcamera_set_extents ( camera_id , _int _ extents _);
void _ GDcamera_set_mapping ( camera_id , _int _ mapping _);
int _ GDcamera_set_image_pass ( camera_id , _int _ image_pass _);
int _ GDcamera_set_pickable ( camera_id , _int _ pickable _);

OMobj_id _ camera_id ;

GDcamera_xxxx_xform

void _ GDcamera_attach_object ( camera_id , _ object_id , int flag );
void _ GDcamera_detach_objects ( camera_id ) ;
void _ GDcamera_detach_object ( camera_id, object_id ) ;
void _ GDcamera_attach_xform ( camera_id , _ xform_id, int flag ) ;
void _ GDcamera_detach_xform ( camera_id , int flag );
void _ GDcamera_detach_views ( camera_id ) ;

OMobj_id _ camera_id , object_id, xform_id ;

GDcamera_delete

void _ GDcamera_delete ( _OMobj_id _ camera_id _);

GDcamera_reset

void _ GDcamera_reset (OMobj_id _ camera_id );

Description

These routines are used to access the Graphics Display Kit camera.

The GDcamera_get_xxxx routines get the subobject values of the camera. The GDcamera_set_xxxx routines set the subobject values of a camera. These routines are used by the Graphics Display Kit camera editor (i.e., GDcamera_edit).

GDcamera_attach_object attaches an object to the camera. The camera maintains an array of objects to be rendered. GDcamera_detach_object detaches the specified object from the array of objects in the camera. GDcamera_detach_objects detachs all the objects at once.

GDcamera_attach_xform attaches a transform to the camera. If the camera is already attached to a transform, the routine returns without changing the transform. GDcamera_detach_xform detaches the transform from a camera.

GDcamera_detach_views detaches the camera from any views to which it may be connected. This routine is called by GDcamera_delete.

GDcamera_delete deletes the camera. This method is called directly by the Object Manager when a camera is deleted.

GDcamera_reset resets the camera's subobjects to their default values. The default values are those specified in DefaultCamera3D.

To create an instance of a camera, call the utility routine GDcreate_instance.

Parameters

camera_id

The id of a camera.

Other get/set parameters

The other parameters in the get/set routines correspond to subobjects of the camera object.
For details, see DefaultCamera2D and DefaultCamera3D .
The parameters from , up , and at are three-element arrays.

object_id

(GDcamera_attach/detach_object only) The id of an object.

xform_id

(GDcamera_attach_xform only) The id of a transformation.

flag

(attach/detach routines only).This argument controls whether the routine actually attaches the object or transform to the camera: 0 means no; 1 means yes. In normal usage within the Graphics Display Kit, the flag is set to 0. If you are using the routines programatically, set the flag to 1.

Example

/* Get and set a camera object's scale subobject. */
OMobj_id camera_id; /* Assume this has been set. */
float scale;
...
GDcamera_get_scale(camera_id, &scale);
scale *= 1.1;
GDcamera_set_scale(camera_id, scale);


TOC PREV NEXT INDEX