Callisto function reference
5.2
|
Modules | |
Animation functions | |
Functions to create primitives | |
Retrieve objects/groups | |
Functions | |
int | CAL_ClearGroupOrientations (int groupID, bool subGroups=false) |
int | CAL_ClearGroupPositions (int groupID, bool subGroups=false) |
int | CAL_ClearGroupScalings (int groupID, bool subGroups=false) |
int | CAL_ClearGroupVisibilities (int groupID, bool subGroups=false) |
int | CAL_ClearObjectOrientations (int objID) |
int | CAL_ClearObjectPositions (int objID) |
int | CAL_ClearObjectScalings (int objID) |
int | CAL_ClearObjectVisibilities (int objID) |
int | CAL_CloneGroup (int *groupIDNew, int groupID, int parentID, bool colCheck, char *name="", bool cloneObjs=true) |
int | CAL_CloneGroupRecursive (int *newgroupIDs, int groupID, int parentID, int nr, int *ids, char **names=CAL_NULL, bool cloneObjs=true, bool keepColCap=false) |
int | CAL_CreateGroup (int *groupID, int parentID, bool colCheck, char *name="", bool collapsed=false) |
int | CAL_DestroyGroup (int groupID) |
int | CAL_DestroyObject (int objID) |
int | CAL_EmptyGroup (int groupID, bool subGroups=false) |
int | CAL_MoveGroup (int groupID, int parentID) |
int | CAL_MoveObject (int objID, int groupID) |
int | CAL_SetGroupActiveMaterial (int groupID, bool subGroups, int sID) |
int | CAL_SetGroupCastShadows (int groupID, bool castShadows, bool subGroups=false) |
int | CAL_SetGroupClearance (int groupID, CAL_scalar c) |
int | CAL_SetGroupCollisionCheckCapability (int groupID, bool colCapable, bool subGroups=false) |
int | CAL_SetGroupColor (int groupID, CAL_scalar red, CAL_scalar green, CAL_scalar blue, CAL_scalar alpha=1, bool receiveShadows=true, bool subGroups=false, int sID=0) |
int | CAL_SetGroupName (int groupID, char *name) |
int | CAL_SetGroupOrientationMatrix (int groupID, CAL_matrix3 mat, CAL_scalar time=-1) |
int | CAL_SetGroupOrientationQuaternion (int groupID, CAL_scalar x, CAL_scalar y, CAL_scalar z, CAL_scalar w, CAL_scalar time=-1) |
int | CAL_SetGroupPosition (int groupID, CAL_scalar x, CAL_scalar y, CAL_scalar z, CAL_scalar time=-1) |
int | CAL_SetGroupScaling (int groupID, CAL_scalar xScale, CAL_scalar yScale, CAL_scalar zScale, CAL_scalar time=-1) |
int | CAL_SetGroupTexture (int groupID, int textureID, CAL_scalar xtile, CAL_scalar ytile, CAL_scalar alpha=1, bool receiveShadows=true, bool subGroups=false, int sID=0) |
int | CAL_SetGroupVisibility (int groupID, int viewID, bool visible, CAL_scalar time=-1) |
int | CAL_SetObjectActiveMaterial (int objID, int sID) |
int | CAL_SetObjectCastShadows (int objID, bool castShadows) |
int | CAL_SetObjectClearance (int objID, CAL_scalar clearance) |
int | CAL_SetObjectColor (int objID, CAL_scalar red, CAL_scalar green, CAL_scalar blue, CAL_scalar alpha=1, bool receiveShadows=true, int sID=0) |
int | CAL_SetObjectOrientationEuler (int objID, CAL_scalar xRot, CAL_scalar yRot, CAL_scalar zRot, CAL_scalar time=-1) |
int | CAL_SetObjectOrientationMatrix (int objID, CAL_matrix3 mat, CAL_scalar time=-1) |
int | CAL_SetObjectOrientationQuaternion (int objID, CAL_scalar x, CAL_scalar y, CAL_scalar z, CAL_scalar w, CAL_scalar time=-1) |
int | CAL_SetObjectPosition (int objID, CAL_scalar x, CAL_scalar y, CAL_scalar z, CAL_scalar time=-1) |
int | CAL_SetObjectScaling (int objID, CAL_scalar xScale, CAL_scalar yScale, CAL_scalar zScale, CAL_scalar time=-1) |
int | CAL_SetObjectTexture (int objID, int textureID, CAL_scalar xtile, CAL_scalar ytile, CAL_scalar alpha=1, bool receiveShadows=true, int sID=0) |
int | CAL_SetObjectVisibility (int objID, int viewID, bool visible, CAL_scalar time=-1) |
int | CAL_SetObjectWorldMatrix (int objID, CAL_matrix4 *matrix, CAL_scalar time) |
int CAL_ClearGroupOrientations | ( | int | groupID, |
bool | subGroups = false |
||
) |
Remove all orientations and keep group at current orientation.
groupID | The ID of the group. |
subGroups | Set to TRUE if orientations of subgroups of group should also be removed, default is FALSE. |
int CAL_ClearGroupPositions | ( | int | groupID, |
bool | subGroups = false |
||
) |
Remove all positions and keep group at current position.
groupID | The ID of the group. |
subGroups | Set to TRUE if positions of subgroups of group should also be removed, default is FALSE. |
int CAL_ClearGroupScalings | ( | int | groupID, |
bool | subGroups = false |
||
) |
Remove all scanlings and keep group at current scaling.
groupID | The ID of the group. |
subGroups | Set to TRUE if scalings of subgroups of group should also be removed, default is FALSE. |
int CAL_ClearGroupVisibilities | ( | int | groupID, |
bool | subGroups = false |
||
) |
Remove all visibilities and keep group at current visibility.
groupID | The ID of the group. |
subGroups | Set to TRUE if visibilities of subgroups of group should also be removed, default is FALSE. |
int CAL_ClearObjectOrientations | ( | int | objID | ) |
Remove all orientations and keep object at current orientation.
objID | The ID of the object. |
int CAL_ClearObjectPositions | ( | int | objID | ) |
Remove all positions and keep object at current position.
objID | The ID of the object. |
int CAL_ClearObjectScalings | ( | int | objID | ) |
Remove all scanlings and keep object at current scaling.
objID | The ID of the object. |
int CAL_ClearObjectVisibilities | ( | int | objID | ) |
Remove all visibilities and keep object at current visibility.
objID | The ID of the object. |
int CAL_CloneGroup | ( | int * | groupIDNew, |
int | groupID, | ||
int | parentID, | ||
bool | colCheck, | ||
char * | name = "" , |
||
bool | cloneObjs = true |
||
) |
Clones a group including all objects.
groupIDNew | Set to the group ID of the clone. |
groupID | The ID of the group to clone. |
parentID | The parent group of the clone (0 for no parent). |
colCheck | Set to false if clone group does not need collision checks. |
name | The name of the group, default is no name. |
cloneObjs | Optional flag that indicates whether to clone the objects in the group as well. |
int CAL_CloneGroupRecursive | ( | int * | newgroupIDs, |
int | groupID, | ||
int | parentID, | ||
int | nr, | ||
int * | ids, | ||
char ** | names = CAL_NULL , |
||
bool | cloneObjs = true , |
||
bool | keepColCap = false |
||
) |
Clones a group including all objects and child groups.
newgroupIDs | List of new group IDs, can be NULL. |
groupID | The ID of the group to clone. |
parentID | The parent group of the clone (0 for no parent). |
nr | The size of the ids and names lists, can be 0. |
ids | List of id's corresponding to the names list, can be NULL. |
names | Optional list of new names for the clone, defaults to NULL. |
cloneObjs | Optional flag that indicates whether to clone the objects in the group as well, defaults to true. |
keepColCap | Optional flag that indicates whether the collision capabilities should be preserved. Default clones do not have collision check capabilities. |
int CAL_CreateGroup | ( | int * | groupID, |
int | parentID, | ||
bool | colCheck, | ||
char * | name = "" , |
||
bool | collapsed = false |
||
) |
Creates an object group.
groupID | This is set to the group ID the group gets. |
parentID | The parent group of this group, use 0 if this group does not need a parent. |
colCheck | True if this group is used for collision checks, false if not. |
name | The name of the group as shown in the GUI, default is no name. |
collapsed | The item will initially not be collapsed in the interface. |
int CAL_DestroyGroup | ( | int | groupID | ) |
Delets a group, its child groups and all its objects.
groupID | The ID of the group to delete. |
int CAL_DestroyObject | ( | int | objID | ) |
Destroys an object.
objID | The ID of the object to destroy. |
int CAL_EmptyGroup | ( | int | groupID, |
bool | subGroups = false |
||
) |
Deletes a groups child groups and all its objects.
groupID | The ID of the group to empty. |
subGroups | Set to TRUE if subgroups of group should also be removed, default is FALSE. |
int CAL_MoveGroup | ( | int | groupID, |
int | parentID | ||
) |
Move a group to a new parent.
groupID | The ID of the group to move. |
parentID | The ID of the new parent. |
int CAL_MoveObject | ( | int | objID, |
int | groupID | ||
) |
Move an object to another group.
objID | The ID of the object to destroy. |
groupID | The ID of the new group. |
int CAL_SetGroupActiveMaterial | ( | int | groupID, |
bool | subGroups, | ||
int | sID | ||
) |
Sets the active material of the group.
groupID | The ID of the group |
subGroups | Set to true if subgroups also have to change the active material. |
sID | The ID of the new active material. |
int CAL_SetGroupCastShadows | ( | int | groupID, |
bool | castShadows, | ||
bool | subGroups = false |
||
) |
Set whether the objects of the group cast shadows. The default value is true. Casting is shadow is independent of the color/texture the object has.
groupID | The ID of the group. |
castShadows | Boolean the states whether the objects should cast shadows or not. |
subGroups | Set to TRUE if casting shadows of subgroups should also be set. Default is FALSE. |
int CAL_SetGroupClearance | ( | int | groupID, |
CAL_scalar | c | ||
) |
Spherically expand a group. Collision will occur with the set of points whose distance to the objects is at most the clearance. This function overrules individual group clearance.
groupID | The ID of the group to translate. |
c | The clearance. |
int CAL_SetGroupCollisionCheckCapability | ( | int | groupID, |
bool | colCapable, | ||
bool | subGroups = false |
||
) |
Sets the collision check capability of a group.
groupID | The ID of the group. |
colCapable | True if the group can be collision checked. |
subGroups | Set to true if subgroups also have to change their collision check capability recursively. |
int CAL_SetGroupColor | ( | int | groupID, |
CAL_scalar | red, | ||
CAL_scalar | green, | ||
CAL_scalar | blue, | ||
CAL_scalar | alpha = 1 , |
||
bool | receiveShadows = true , |
||
bool | subGroups = false , |
||
int | sID = 0 |
||
) |
Sets the color of a group.
groupID | The ID of the group. |
red | The red component of the color (0...1). |
green | The green component of the color (0...1). |
blue | The blue component of the color (0...1). |
alpha | The alpha value of the color (0...1), 0 is fully transparant, 1 is fully opaque. Default is 1. |
receiveShadows | Set when the objects need to receive shadows from other objects. |
subGroups | Set to TRUE if subgroups of group should also get new color, default is FALSE. |
sID | The ID of the material which gets this color, default is material 0. |
int CAL_SetGroupName | ( | int | groupID, |
char * | name | ||
) |
Change the name of a group.
groupID | The ID of the group. |
name | The new name |
int CAL_SetGroupOrientationMatrix | ( | int | groupID, |
CAL_matrix3 | mat, | ||
CAL_scalar | time = -1 |
||
) |
Set the group orientation using a rotation matrix for a specific time. If time is specified, the spherical linear interpolation (SLERP) algorithm is used for interpolation.
groupID | The ID of the group to rotate. |
mat | The 3x3 matrix to set the orientation. |
time | The time at which the group should have the orientation. If multiple orientations are defined (for different times), Callisto uses the SLERP algorithm to determine the orientation of the group given the current time. A single orientation at time 0 defines the group to be static regardless of the time. |
int CAL_SetGroupOrientationQuaternion | ( | int | groupID, |
CAL_scalar | x, | ||
CAL_scalar | y, | ||
CAL_scalar | z, | ||
CAL_scalar | w, | ||
CAL_scalar | time = -1 |
||
) |
Set the group orientation using a quaternion for a specific time. If time is specified, the spherical linear interpolation (SLERP) algorithm is used for interpolation.
groupID | The ID of the group to rotate. |
x | The x component of the quaternion. |
y | The y component of the quaternion. |
z | The z component of the quaternion. |
w | The w component of the quaternion. |
time | The time at which the group should have the orientation. If multiple orientations are defined (for different times), Callisto uses the SLERP algorithm to determine the orientation of the group given the current time. A single orientation at time 0 defines the group to be static regardless of the time. |
int CAL_SetGroupPosition | ( | int | groupID, |
CAL_scalar | x, | ||
CAL_scalar | y, | ||
CAL_scalar | z, | ||
CAL_scalar | time = -1 |
||
) |
Place a group and all its objects at a new position. The order in which Callisto processes is scale, orientation, position. Therefore position is influenced by scale and orientation (and also those of parent groups).
groupID | The ID of the group to translate. |
x | The x component of the new position. |
y | The y component of the new position. |
z | The z component of the new position. |
time | The time the group should be at the position. If multiple positions are defined (for different times), Callisto uses linear interpolation to determine the position of the group given the current time. A single position at time 0 defines the group to be static regardless of the time. |
int CAL_SetGroupScaling | ( | int | groupID, |
CAL_scalar | xScale, | ||
CAL_scalar | yScale, | ||
CAL_scalar | zScale, | ||
CAL_scalar | time = -1 |
||
) |
Scale a group and all its objects.
groupID | The ID of the group to scale. |
xScale | The scaling factor in the x direction. |
yScale | The scaling factor in the y direction. |
zScale | The scaling factor in the z direction. |
time | The time at which the group should have the scaling. If multiple scalings are defined (for different times), Callisto uses linear interpolation to determine the scaling of the group given the current time. A single scaling at time 0 defines the group to be static regardless of the time. |
int CAL_SetGroupTexture | ( | int | groupID, |
int | textureID, | ||
CAL_scalar | xtile, | ||
CAL_scalar | ytile, | ||
CAL_scalar | alpha = 1 , |
||
bool | receiveShadows = true , |
||
bool | subGroups = false , |
||
int | sID = 0 |
||
) |
Set the texture for a group.
groupID | The ID of the group. |
textureID | The ID of the texture. |
xtile | The number of times to repeat the texture in the x-direction. |
ytile | The number of times to repeat the texture in the y-direction. |
alpha | The alpha value of the color (0...1), 0 is fully transparant, 1 is fully opaque. Default is 1. |
receiveShadows | Set when the objects need to receive shadows from other objects. |
subGroups | Set to TRUE if subgroups of group should also get new color. Default is FALSE. |
sID | The ID of the material which gets this texture, default is material 0. |
int CAL_SetGroupVisibility | ( | int | groupID, |
int | viewID, | ||
bool | visible, | ||
CAL_scalar | time = -1 |
||
) |
Set the group visibility for a specific view and time. Whether the group is actually visible is also determined by the visibilty of the parent group. Parent visibility takes priority over group visibility.
groupID | The ID of the group. |
viewID | The ID of the view. |
visible | Boolean that states whether the group should be visibile or not. |
time | The time at which the group should be (in)visible. A single visibility at time 0 defines the group to be always visible or invisible regardless of the time. |
int CAL_SetObjectActiveMaterial | ( | int | objID, |
int | sID | ||
) |
Sets the active material of the group.
objID | The ID of the object. |
sID | The ID of the new active material. |
int CAL_SetObjectCastShadows | ( | int | objID, |
bool | castShadows | ||
) |
Set whether the object casts shadow. The default value is true. Casting is shadow is independent of the color/texture the object has.
objID | The ID of the object. |
castShadows | Boolean the states whether the object should cast shadows or not. |
int CAL_SetObjectClearance | ( | int | objID, |
CAL_scalar | clearance | ||
) |
Spherically expand an object. Collision will occur with the set of points whose distance to the object is at most the clearance. If CAL_SetGroupClearance is called later, individual object clearance will be overruled.
objID | The ID of the object to translate. |
clearance | The clearance. |
int CAL_SetObjectColor | ( | int | objID, |
CAL_scalar | red, | ||
CAL_scalar | green, | ||
CAL_scalar | blue, | ||
CAL_scalar | alpha = 1 , |
||
bool | receiveShadows = true , |
||
int | sID = 0 |
||
) |
Sets the color of an object.
objID | The ID of the object. |
red | The red component of the color (0...1). |
green | The green component of the color (0...1). |
blue | The blue component of the color (0...1). |
alpha | The alpha value of the color (0...1), 0 is fully transparant, 1 is fully opaque. Default is 1. |
receiveShadows | Set when the object needs to receive shadows from other objects. |
sID | The ID of the material which gets this color. Default value is material 0. |
int CAL_SetObjectOrientationEuler | ( | int | objID, |
CAL_scalar | xRot, | ||
CAL_scalar | yRot, | ||
CAL_scalar | zRot, | ||
CAL_scalar | time = -1 |
||
) |
Set the object orientation using Euler angles (in radians) for a specific time. If time is specified, the spherical linear interpolation (SLERP) algorithm is used for interpolation.
objID | The ID of the object to translate. |
xRot | The orientation with respect to the x-axis; |
yRot | The orientation with respect to the y-axis; |
zRot | The orientation with respect to the z-axis; |
time | The time at which the object should have the orientation. If multiple orientations are defined (for different times), Callisto uses the SLERP algorithm to determine the orientation of the object given the current time. A single orientation at time 0 defines the object to be static regardless of the time. |
int CAL_SetObjectOrientationMatrix | ( | int | objID, |
CAL_matrix3 | mat, | ||
CAL_scalar | time = -1 |
||
) |
Set the object orientation using a rotation matrix for a specific time. If time is specified, the spherical linear interpolation (SLERP) algorithm is used for interpolation.
objID | The ID of the object to rotate. |
mat | The 3x3 matrix to set the orientation. |
time | The time at which the object should have the orientation. If multiple orientations are defined (for different times), Callisto uses the SLERP algorithm to determine the orientation of the object given the current time. A single orientation at time 0 defines the object to be static regardless of the time. |
int CAL_SetObjectOrientationQuaternion | ( | int | objID, |
CAL_scalar | x, | ||
CAL_scalar | y, | ||
CAL_scalar | z, | ||
CAL_scalar | w, | ||
CAL_scalar | time = -1 |
||
) |
Set the object orientation using a quaternion for a specific time. If time is specified, the spherical linear interpolation (SLERP) algorithm is used for interpolation.
objID | The ID of the object to rotate. |
x | The x component of the quaternion. |
y | The y component of the quaternion. |
z | The z component of the quaternion. |
w | The w component of the quaternion. |
time | The time at which the object should have the orientation. If multiple orientations are defined (for different times), Callisto uses the SLERP algorithm to determine the orientation of the object given the current time. A single orientation at time 0 defines the object to be static regardless of the time. |
int CAL_SetObjectPosition | ( | int | objID, |
CAL_scalar | x, | ||
CAL_scalar | y, | ||
CAL_scalar | z, | ||
CAL_scalar | time = -1 |
||
) |
Set the object at a new position for a specific time.
objID | The ID of the object to translate. |
x | The x component of the new position. |
y | The y component of the new position. |
z | The z component of the new position. |
time | The time the object should be at the position. If multiple positions are defined (for different times), Callisto uses linear interpolation to determine the position of the object given the current time. A single position at time 0 defines the object to be static regardless of the time. |
int CAL_SetObjectScaling | ( | int | objID, |
CAL_scalar | xScale, | ||
CAL_scalar | yScale, | ||
CAL_scalar | zScale, | ||
CAL_scalar | time = -1 |
||
) |
Set the object scaling for a specific time.
objID | The ID of the object to scale. |
xScale | The scaling factor in the x direction. |
yScale | The scaling factor in the y direction. |
zScale | The scaling factor in the z direction. |
time | The time at which the object should have the scaling. If multiple scalings are defined (for different times), Callisto uses linear interpolation to determine the scaling of the object given the current time. A single scaling at time 0 defines the object to be static regardless of the time. |
int CAL_SetObjectTexture | ( | int | objID, |
int | textureID, | ||
CAL_scalar | xtile, | ||
CAL_scalar | ytile, | ||
CAL_scalar | alpha = 1 , |
||
bool | receiveShadows = true , |
||
int | sID = 0 |
||
) |
Set the texture for an object.
objID | The ID of the object. |
textureID | The ID of the texture. |
xtile | The number of times to repeat the texture in the x-direction. |
ytile | The number of times to repeat the texture in the y-direction. |
alpha | The alpha value of the color (0...1), 0 is fully transparant, 1 is fully opaque. Default is 1. |
receiveShadows | Set when the object needs to receive shadows from other objects. |
sID | The ID of the material which gets this texture, default is material 0. |
int CAL_SetObjectVisibility | ( | int | objID, |
int | viewID, | ||
bool | visible, | ||
CAL_scalar | time = -1 |
||
) |
Set the object visibility for a specific time. Whether the object is actually visible is also determined by the visibilty of its group. Group visibility takes priority over object visibility.
objID | The ID of the object to scale. |
viewID | The ID of the view. |
visible | Boolean that states whether the object should be visibile or not. |
time | The time at which the object should be (in)visible. A single visibility at time 0 defines the object to be always visible or invisible regardless of the time. |
int CAL_SetObjectWorldMatrix | ( | int | objID, |
CAL_matrix4 * | matrix, | ||
CAL_scalar | time | ||
) |
Set the WORLD matrix of an object. This works even when group matrix is set.
objID | The ID of the object. |
matrix | Should be of type CAL_matrix; |
time | The time at which the object should have the world matrix. |