Callisto function reference  5.2
Retrieve objects/groups

Data Structures

struct  SCALBox
 Structure to retrieve a box. More...
 
struct  SCALCone
 Structure to retrieve a cone. More...
 
struct  SCALCylinder
 Structure to retrieve a cylinder. More...
 
struct  SCALElevationGrid
 Structure to retrieve a triangle mesh. More...
 
struct  SCALGroup
 Structure to retrieve a group. More...
 
struct  SCALPlane
 Structure to retrieve a plane. More...
 
struct  SCALPolyline
 Structure to retrieve a polyline. More...
 
struct  SCALSphere
 Structure to retrieve a sphere. More...
 
struct  SCALTetrahedron
 Structure to retrieve a tetrahedron. More...
 
struct  SCALTriangles
 Structure to retrieve a triangle mesh. More...
 

Macros

#define CAL_BOX   1
 
#define CAL_CONE   4
 
#define CAL_CYLINDER   3
 
#define CAL_ELEVATIONGRID   9
 
#define CAL_PLANE   5
 
#define CAL_POINTCLOUD   10
 
#define CAL_POLYLINE   7
 
#define CAL_SPHERE   2
 
#define CAL_TETRAHEDRON   8
 
#define CAL_TRIANGLES   6
 
#define CAL_USERDRAWN   11
 

Functions

int CAL_GetGroup (int groupID, void *CALGroup)
 
int CAL_GetGroupChildID (int groupID, int nr, int *childGroupID)
 
int CAL_GetGroupObjectID (int groupID, int nr, int *objectID)
 
int CAL_GetID (int *ID, char *name)
 
int CAL_GetObject (int objID, void *SCALObj)
 
int CAL_GetObjectType (int objID, int *objType)
 
int CAL_GetObjectWorldMatrix (int objID, CAL_matrix4 *matrix)
 

Detailed Description

Macro Definition Documentation

#define CAL_BOX   1

The result of CAL_GetObjectType if the object is a box.

#define CAL_CONE   4

The result of CAL_GetObjectType if the object is a cone.

#define CAL_CYLINDER   3

The result of CAL_GetObjectType if the object is a cylinder.

#define CAL_ELEVATIONGRID   9

The result of CAL_GetObjectType if the object is an elevation grid.

#define CAL_PLANE   5

The result of CAL_GetObjectType if the object is a plane.

#define CAL_POINTCLOUD   10

The result of CAL_GetObjectType if the object is a point cloud.

#define CAL_POLYLINE   7

The result of CAL_GetObjectType if the object is a polyline.

#define CAL_SPHERE   2

The result of CAL_GetObjectType if the object is a sphere.

#define CAL_TETRAHEDRON   8

The result of CAL_GetObjectType if the object is a tetrahedron.

#define CAL_TRIANGLES   6

The result of CAL_GetObjectType if the object is a triangle group.

#define CAL_USERDRAWN   11

The result of CAL_GetObjectType if the object is a user drawn object.

Function Documentation

int CAL_GetGroup ( int  groupID,
void *  CALGroup 
)

Get the properties of a group.

Parameters
groupIDThe ID of the group.
CALGroupPointer to an SCALGroup-structure.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_GetGroupChildID ( int  groupID,
int  nr,
int *  childGroupID 
)

Returnes the ID of the nr'th childgroup.

Parameters
groupIDThe ID of the group.
nrThe nr of the childgroup.
childGroupIDThis value is set to the nr'th childgroup.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_GetGroupObjectID ( int  groupID,
int  nr,
int *  objectID 
)

Returnes the ID of the nr'th object.

Parameters
groupIDThe ID of the group.
nrThe nr of the object.
objectIDThis value is set to the nr'th object.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_GetID ( int *  ID,
char *  name 
)

Returnes the ID of a group or object with a certain name.

Parameters
IDThis is set to the ID.
nameThe name of the group/object.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_GetObject ( int  objID,
void *  SCALObj 
)

Get the properties of an object.

Parameters
objIDThe ID of the object.
SCALObjPointer to an SCAL-object (SCALBox, SCALSphere etc.). This has to be of the right type (the type can be retrieved by using CAL_GetObjectType). Note that to retrieve a CAL_ELEVATIONGRID object, SCALPolygonGroup needs to be used.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_GetObjectType ( int  objID,
int *  objType 
)

Get the type of an object (CAL_BOX, CAL_CYLINDER etc.).

Parameters
objIDThe ID of the object.
objTypeThis will be set to the object type according to the values in callistoTypes.h.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_GetObjectWorldMatrix ( int  objID,
CAL_matrix4 matrix 
)

Get the WORLD matrix of an object.

Parameters
objIDThe ID of the object.
matrixShould be of type CAL_matrix;
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.