Callisto function reference  5.2
Functions to create primitives

Functions

int CAL_CreateBox (int groupID, CAL_scalar xw, CAL_scalar yw, CAL_scalar zw, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateCone (int groupID, CAL_scalar radius, CAL_scalar height, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateConeFromTo (int groupID, CAL_scalar *from, CAL_scalar *to, CAL_scalar radius, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateCylinder (int groupID, CAL_scalar radius, CAL_scalar height, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateCylinderFromTo (int groupID, CAL_scalar *from, CAL_scalar *to, CAL_scalar radius, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateElevationGrid (int groupID, int xDim, int zDim, CAL_scalar xStep, CAL_scalar zStep, CAL_scalar *heights, int *objID=CAL_NULL, char *name="")
 
int CAL_CreatePointCloud (int groupID, int nrPoints, CAL_scalar *points, CAL_scalar *colors=CAL_NULL, int *objID=CAL_NULL, char *name="")
 
int CAL_CreatePolyline (int groupID, int nl, int *np, CAL_scalar *p, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateSphere (int groupID, CAL_scalar radius, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateTetrahedron (int groupID, CAL_scalar *p, int *objID=CAL_NULL, char *name="")
 
int CAL_CreateTriangles (int groupID, int nrTriangles, CAL_scalar *p, CAL_scalar *texCoords=CAL_NULL, int *objID=CAL_NULL, char *name="")
 

Detailed Description

Function Documentation

int CAL_CreateBox ( int  groupID,
CAL_scalar  xw,
CAL_scalar  yw,
CAL_scalar  zw,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a box.

Parameters
groupIDThe group ID to put the object in.
xwThe width of the object.
ywThe height of the object.
zwThe depth of the object.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateCone ( int  groupID,
CAL_scalar  radius,
CAL_scalar  height,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a cone.

Parameters
groupIDThe group ID to put the object in.
radiusThe radius of the bottom of the object.
heightThe height of the object.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateConeFromTo ( int  groupID,
CAL_scalar from,
CAL_scalar to,
CAL_scalar  radius,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a cone.

Parameters
groupIDThe group ID to put the object in.
fromThe position of the top of the cone.
toThe position of the center of the bottom of the cone.
radiusThe radius of the bottom of the object.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateCylinder ( int  groupID,
CAL_scalar  radius,
CAL_scalar  height,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a cylinder.

Parameters
groupIDThe group ID to put the object in.
radiusThe radius of the object.
heightThe height of the object.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateCylinderFromTo ( int  groupID,
CAL_scalar from,
CAL_scalar to,
CAL_scalar  radius,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a cylinder.

Parameters
groupIDThe group ID to put the object in.
fromThe position of the center of the top of the cylinder.
toThe position of the center of the bottom of the cylinder.
radiusThe radius of the object.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateElevationGrid ( int  groupID,
int  xDim,
int  zDim,
CAL_scalar  xStep,
CAL_scalar  zStep,
CAL_scalar heights,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create an elevation grid on the XZ plane.

Parameters
groupIDThe group ID to put the object in.
xDimThe number of x coordinates.
zDimThe number of z coordinates.
xStepThe stepsize along the x-axis.
zStepThe stepsize along the z-axis.
heightsThe height parameters. The number of elements should be (xDim+1)*(zDim+1).
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreatePointCloud ( int  groupID,
int  nrPoints,
CAL_scalar points,
CAL_scalar colors = CAL_NULL,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a point cloud.

Parameters
groupIDThe group ID to put the object in.
nrPointsThe number of points.
pointsThe points with x, y and z coordinates. Its size should be 3 * nrPoints.
colorsColor parameters per point with red, green and blue values. Its size should be 3 * nrPoints.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreatePolyline ( int  groupID,
int  nl,
int *  np,
CAL_scalar p,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a polyline. This is for the visualisation only.

Parameters
groupIDThe group ID to put the object in.
nlThe number of lines.
*npThe number of points each line consists of.
*pList of coordinates of the lines. Its size should be is 3 * np * nl.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateSphere ( int  groupID,
CAL_scalar  radius,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a sphere.

Parameters
groupIDThe group ID to put the object in.
radiusThe radius of the object.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateTetrahedron ( int  groupID,
CAL_scalar p,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a tetrahedron.

Parameters
groupIDThe group ID to put the object in.
*pList of coordinates of the object. The size of the list must be 3*4 since a tetrahydron consists of 4 points. The first 3 points define the ground plane, the fourth is the top. The ground plane should be defined in a counter-clockwise order.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.
int CAL_CreateTriangles ( int  groupID,
int  nrTriangles,
CAL_scalar p,
CAL_scalar texCoords = CAL_NULL,
int *  objID = CAL_NULL,
char *  name = "" 
)

Create a triangle mesh.

Parameters
groupIDThe group ID to put the object in.
nrTrianglesThe number of triangles the object consists of.
*pList of coordinates of the object. The size of the list must be 9*nrTriangles.
*texCoordsList of texture coordinates. Each texture coordinate consists of two values betwee 0 and1. There should be 2 coordinates for each point in the list. Thus its size should be 6*nrTriangles.
objIDSet to the object ID.
nameName of the object. Default is no name.
Returns
The function returns CAL_SUCCESS on success, and an errorcode on failure.