![]() |
![]() ![]() |
access a Graphics Display Kit object
void GDobject_get_pickable ( object_id , int * pickable );
void GDobject_get_cache ( object_id , float * cache );
void GDobject_get_type ( object_id , int * type );
void GDobject_get_dith_tech ( object_id , int * dith_tech );
void GDobject_get_interp_type ( object_id , int * interp_type );
void GDobject_get_missing_val ( object_id , float * missing_val );
void GDobject_get_missing_rgb ( object_id , float * missing_rgb );
void GDobject_get_xform_mode ( object_id , int * xform_mode );
void GDobject_get_window ( object_id , float * window );
void GDobject_get_surf_conv ( object_id , int * surf_conv );
void GDobject_get_surf_chunk ( object_id , int * surf_chunk );
void GDobject_get_surf_chunk_size ( object_id , int * surf_chunk_size );
void GDobject_get_line_chunk_size ( object_id , int * line_chunk_size );
void GDobject_get_tmap_method ( object_id , int * tmap_method );
void GDobject_get_tri_subdiv_type ( object_id , int * tri_subdiv_type );
void GDobject_get_tri_subdiv_aval ( object_id , int * tri_subdiv_aval );
void GDobject_get_tri_subdiv_fval ( object_id , int * tri_subdiv_fval );
OMobj_id object_id ;
int GDobject_set_pickable ( object_id , int pickable );
int GDobject_set_cache ( object_id , float cache );
int GDobject_set_type ( object_id , int type );
int GDobject_set_dith_tech ( object_id , int dith_tech );
int GDobject_set_interp_type ( object_id , int interp_type );
int GDobject_set_missing_val ( object_id , float missing_val );
int GDobject_set_missing_rgb ( object_id , float * missing_rgb );
int GDobject_set_xform_mode ( object_id , int xform_mode );
int GDobject_set_window ( object_id , float * window );
int GDobject_set_surf_conv ( object_id , int surf_conv );
int GDobject_set_surf_chunk ( object_id , int surf_chunk );
int GDobject_set_surf_chunk_size ( object_id , int surf_chunk_size );
int GDobject_set_line_chunk_size ( object_id , int line_chunk_size );
int GDobject_set_tmap_method ( object_id , int tmap_method );
int GDobject_set_tri_subdiv_type ( object_id , int tri_subdiv_type );
int GDobject_set_tri_subdiv_aval ( object_id , int tri_subdiv_aval );
int GDobject_set_tri_subdiv_fval ( object_id , int tri_subdiv_fval );
OMobj_id object_id ;
void GDobject_detach_altobj ( object_id, int flag );
void GDobject_detach_cameras ( object_id );
void GDobject_attach_dmap ( object_id , dmap_id, int flag );
void GDobject_detach_dmap ( object_id, int flag );
void GDobject_attach_modes ( object_id , modes_id, int flag );
void GDobject_detach_modes ( object_id, int flag );
void GDobject_attach_object ( object_id, child_id, int flag );
void GDobject_detach_children ( object_id );
void GDobject_detach_parents ( object_id );
void GDobject_detach_object ( object_id, child_id );
void GDobject_attach_pick_info ( object_id , pick_info_id, int flag );
void GDobject_detach_pick_info ( object_id, int flag );
void GDobject_attach_props ( object_id , props_id, int flag );
void GDobject_detach_props ( object_id, int flag );
void GDobject_attach_texture ( object_id , texture_id, int flag );
void GDobject_detach_texture ( object_id, int flag );
void GDobject_attach_xform ( object_id , xform_id , int flag );
void GDobject_detach_xform ( object_id, int flag );
OMobj_id object_id , texture_id;
OMobj_id xform_id , modes_id , props_id , pick_info_id , altobj_id , dmap_id ;
void GDobject_ext_center ( object_id );
void GDobject_ext_norm ( camera_id , object_id , mode );
void GDobject_ext_compute ( camera_id , object_id , extents );
void GDobject_ext_compute_world ( camera_id , object_id , extents );
void GDobject_get_transform ( object_id , float * matrix );
void GDobject_get_rotation ( object_id , float * matrix );
OMobj_id object_id , camera_id ;
int mode ;
float extents [6];
float matrix[4][4];
These routines are used to access a Graphics Display Kit object.
The GDobject_get_xxxx routines get the subobject values of the object. The GDpbject_set_xxxx routines set the subobject values of the object. These routines are used by the Graphics Display Kit object editor (i.e., GDobj_edit).
The GDobject_attach_xxxx routines attach a Graphics Display Kit base type (properties, modes, etc.) to a Graphics Display Kit object. The GDobject_detach_xxxx routines detach a Graphics Display Kit base type from a Graphics Display Kit object.
The GDobject_ext_xxxx routines perform a variety of operations on a graphics-display object.
GDobject_ext_reset resets the transformation matrix associated with the object.
GDobject_ext_center sets the center used for rotation/scaling to the center of the extents of the object.
GDobject_ext_norm sets the transformation matrix associated with the object such that the object fits in the view.
GDobject_ext_compute computes an object's extents. The returned extenst have been transformed by the full transform that is applied to the object to render it.
GDobject_ext_compute_world computes an object's extents. The returned extents are not transformed.
GDobject_get_transform gets the transformation matrix from the object back to the top object.
GDobject_get_rotation is like GDobject_get_transform, but the matrix it returns includes only rotations and scale.
GDobject_delete deletes the object. This method is called directly by the Object Manager when the object is deleted.
To create an instance of an object, call the utility routine GDcreate_instance.
The other parameters in the get/set routines correspond to subobjects of the graphics-display object.
For details, including a listing of symbolic constants, see DefaultObject .
The matrix parameter is a 4-by-4 floating-point array.
A six-element array containing the object's extents (X 1 , X 2 , Y 1 , Y 2 , Z 1 , Z 2 ).
The id of a child object to attach or detach to the object.
xform_id
modes_id
props_id
pick_info_id
altobj_id
dmap_id
texture_id
(GDobject_attach_xxxx only) The id of the base type to attach to the object.
/* Get and set a GD object's cache subobject. */
OMobj_id object_id; /* Assume this has been set. */
int cache;
...
GDobject_get_cache(object_id, &cache);
GDobject_set_cache(object_id, 1);
![]() |
![]() ![]() |