Callisto function reference
5.2
|
Macros | |
#define | CAL_BOTTOMLEFT 3 |
#define | CAL_BOTTOMRIGHT 2 |
#define | CAL_TOPLEFT 0 |
#define | CAL_TOPRIGHT 1 |
Functions | |
int | CAL_ClearCameraStates (int viewID) |
int | CAL_CreateOverlay (int *overlayID, int viewID, int xPos, int yPos, int xDim, int yDim, int referencePos=CAL_TOPLEFT, int nrLines=1, bool background=true) |
int | CAL_DestroyOverlay (int overlayID) |
int | CAL_GetCameraLookAt (int viewID, CAL_scalar *x, CAL_scalar *y, CAL_scalar *z) |
int | CAL_GetCameraPosition (int viewID, CAL_scalar *x, CAL_scalar *y, CAL_scalar *z) |
int | CAL_GetCameraRoll (int viewID, CAL_scalar *roll) |
int | CAL_HideView (int viewID) |
int | CAL_ResumeVisualisation () |
int | CAL_ScreenCapture (int viewID, char *fileName) |
int | CAL_SetBackgroundColor (int viewID, CAL_scalar red, CAL_scalar green, CAL_scalar blue) |
int | CAL_SetCameraLookAt (int viewID, CAL_scalar x, CAL_scalar y, CAL_scalar z, CAL_scalar time=-1) |
int | CAL_SetCameraOptions (int viewID, long options) |
int | CAL_SetCameraPosition (int viewID, CAL_scalar x, CAL_scalar y, CAL_scalar z, CAL_scalar time=-1) |
int | CAL_SetCameraRoll (int viewID, CAL_scalar roll, CAL_scalar time=-1) |
int | CAL_SetCameraState (int viewID, CAL_scalar pos[3], CAL_scalar lookAt[3], CAL_scalar up[3], CAL_scalar time=-1) |
int | CAL_SetLightOptions (long options) |
int | CAL_SetOverlayTextLine (int overlayID, int lineNr, char *text, float charHeight=10.f, float red=1.0f, float green=1.0f, float blue=1.0f, float alpha=1.0f) |
int | CAL_SetOverlayVisibility (int overlayID, bool visibility) |
int | CAL_SetViewFogDistance (CAL_scalar dist) |
int | CAL_SetViewGridSize (int viewID, CAL_scalar size) |
int | CAL_SetViewNavigationSpeed (int viewID, CAL_scalar dist) |
int | CAL_SetViewNearClippingDistance (int viewID, CAL_scalar dist) |
int | CAL_SetViewOptions (int viewID, long options) |
int | CAL_ShowView (int viewID, char *caption="", bool maximized=false) |
int | CAL_SuspendVisualisation () |
int | CAL_TileViews () |
#define CAL_BOTTOMLEFT 3 |
Used for overlays: glue overlay to bottom left of visualisation window.
#define CAL_BOTTOMRIGHT 2 |
Used for overlays: glue overlay to bottom right of visualisation window.
#define CAL_TOPLEFT 0 |
Used for overlays: glue overlay to top left of visualisation window.
#define CAL_TOPRIGHT 1 |
Used for overlays: glue overlay to top right of visualisation window.
int CAL_ClearCameraStates | ( | int | viewID | ) |
Deletes all defined camera animations and set camera to default position.
viewID | The ID of the view. |
int CAL_CreateOverlay | ( | int * | overlayID, |
int | viewID, | ||
int | xPos, | ||
int | yPos, | ||
int | xDim, | ||
int | yDim, | ||
int | referencePos = CAL_TOPLEFT , |
||
int | nrLines = 1 , |
||
bool | background = true |
||
) |
Create an overlay. An overlay is a box that appears at at a static position in the visualisation window. It can be used to display user defined information. An example of an overlay is the status overlay.
overlayID | The ID of the overlay. |
viewID | The ID of the view the overlay should appear in. |
xPos | The x coordinate of the screen position the overlay should appear. |
yPos | The y coordinate of the screen position the overlay should appear. |
xDim | The width of the overlay. |
yDim | The height of the overlay. |
referencePos | The reference from which xPos and yPos are calculated. The value can be CAL_TOPLEFT, CAL_TOPRIGHT, CAL_BOTTOMRIGHT or CAL_BOTTOMLEFT. |
nrLines | The number of lines the overlay consists of. |
background | Shows a partially transparent background behind the text. |
int CAL_DestroyOverlay | ( | int | overlayID | ) |
Destroy an overlay.
overlayID | The ID of the overlay that needs to be destroyed. |
int CAL_GetCameraLookAt | ( | int | viewID, |
CAL_scalar * | x, | ||
CAL_scalar * | y, | ||
CAL_scalar * | z | ||
) |
Gets the position the camera looks at. The look at position is also the navigation center.
viewID | The ID of the view. |
x | The x position of the look at point. |
y | The y position of the look at point. |
z | The z position of the look at point. |
int CAL_GetCameraPosition | ( | int | viewID, |
CAL_scalar * | x, | ||
CAL_scalar * | y, | ||
CAL_scalar * | z | ||
) |
Gets the position of the camera.
viewID | The ID of the view. |
x | The x position of the camera. |
y | The y position of the camera. |
z | The z position of the camera. |
int CAL_GetCameraRoll | ( | int | viewID, |
CAL_scalar * | roll | ||
) |
Gets the rotation of the camera around the axis defined by position and look at point.
viewID | The ID of the view. |
roll | The roll of the camera around the axis. A value of 0 means the up-vector is parallel with the y-axis. |
int CAL_HideView | ( | int | viewID | ) |
Hides a view. Every view has its own unique ID. There are at most 4 views (0..3). 0 being the main view. This view cannot be switched on/off.
viewID | The ID of the view. |
int CAL_ResumeVisualisation | ( | ) |
This function resumes the visualisation after CAL_SuspendVisualisation.
int CAL_ScreenCapture | ( | int | viewID, |
char * | fileName | ||
) |
Saves the content of a view in .bmp format to disk.
viewID | The ID of the view to save, set to 0 if you don't know what this is. |
fileName | The file name of the .bmp. |
int CAL_SetBackgroundColor | ( | int | viewID, |
CAL_scalar | red, | ||
CAL_scalar | green, | ||
CAL_scalar | blue | ||
) |
Sets the background color of the visualisation window.
viewID | The ID of the view get the view parameters from, set to 0 if you don't know what this is. |
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). |
int CAL_SetCameraLookAt | ( | int | viewID, |
CAL_scalar | x, | ||
CAL_scalar | y, | ||
CAL_scalar | z, | ||
CAL_scalar | time = -1 |
||
) |
Sets the position the camera looks at. The look at position is also the center of navigation for the mouse.
viewID | The ID of the view. |
x | The x position of the look at point. |
y | The y position of the look at point. |
z | The z position of the look at point. |
time | The time the camera should look at the position. This is used to define camera motions, do not use if you want a fixed camera. |
int CAL_SetCameraOptions | ( | int | viewID, |
long | options | ||
) |
Set options for the camera of a specific view.
viewID | The ID of the view. |
options | The option you want to change. Multiple parameters can be changed at once by using the | operator. Legal values can be found here. |
int CAL_SetCameraPosition | ( | int | viewID, |
CAL_scalar | x, | ||
CAL_scalar | y, | ||
CAL_scalar | z, | ||
CAL_scalar | time = -1 |
||
) |
Sets the position of the camera.
viewID | The ID of the view. |
x | The x position of the camera. |
y | The y position of the camera. |
z | The z position of the camera. |
time | The time the camera should be at the position. This is used to define camera motions, do not use if you want a fixed camera. |
int CAL_SetCameraRoll | ( | int | viewID, |
CAL_scalar | roll, | ||
CAL_scalar | time = -1 |
||
) |
Sets the rotation of the camera around the axis defined by position and look at point. When using the CAL_SetCamera functions, the camera orientation is always parallel to the XZ plane, except when you define a roll (in that case, the camera rotates about its directional axis). When looking straight down (e.g. parallel with the y-axis) there are infinitely many camera orientations that are parallel to the XZ plane. In that case, the camera right vector is equal to the x-axis (and the up vector equal to the –z-axis).
viewID | The ID of the view. |
roll | The roll of the camera around the axis. A value of 0 means the up-vector is parallel with the y-axis. |
time | The time the camera should be at the specified roll. This is used to define camera motions, do not use if you want a fixed camera. |
int CAL_SetCameraState | ( | int | viewID, |
CAL_scalar | pos[3], | ||
CAL_scalar | lookAt[3], | ||
CAL_scalar | up[3], | ||
CAL_scalar | time = -1 |
||
) |
Alternative method to set camera state by providing position lookAt point and up vector. The angle between the vector formed by pos-lookAt and up should be 90 degrees, if not an CAL_ILLEGALVALUE is thrown.
viewID | The ID of the view. |
pos | The position of the camera. |
lookAt | The point the camera looks at (is directed to). |
up | The camera up vector. |
time | The time the camera should be at the specified roll. This is used to define camera motions, do not use if you want a fixed camera. |
int CAL_SetLightOptions | ( | long | options | ) |
Change light related parameters. These are view independent.
options | The option you want to change. Multiple parameters can be changed at once by using the | operator. Legal values can be found here. |
int CAL_SetOverlayTextLine | ( | int | overlayID, |
int | lineNr, | ||
char * | text, | ||
float | charHeight = 10.f , |
||
float | red = 1.0f , |
||
float | green = 1.0f , |
||
float | blue = 1.0f , |
||
float | alpha = 1.0f |
||
) |
Change the overlay text.
overlayID | The ID of the overlay. |
lineNr | The number of the line to change, the first line has number 1. |
text | The line of text. |
charHeight | The character height of the text. |
red | The red component of the text color (0...1). |
green | The green component of the text color (0...1). |
blue | The blue component of the text color (0...1). |
alpha | The alpha value of the text color (0...1), 0 is fully transparant, 1 is fully opaque. Default is 1. |
text | An array of text lines. The length of the array should be equal as the number of lines used in CAL_CreateOverlay. |
int CAL_SetOverlayVisibility | ( | int | overlayID, |
bool | visibility | ||
) |
Change the visibility of an overlay.
overlayID | The ID of the overlay. |
visibility | Boolean indicating visibility. |
int CAL_SetViewFogDistance | ( | CAL_scalar | dist | ) |
Set the fog distance. This value is inpendent of the view.
dist | The new fog distance. |
int CAL_SetViewGridSize | ( | int | viewID, |
CAL_scalar | size | ||
) |
Set size of major grid lines.
viewID | The ID of the view. |
size | The distance between the major grid lines |
int CAL_SetViewNavigationSpeed | ( | int | viewID, |
CAL_scalar | dist | ||
) |
Set the navigation speed. This is the speed with the keyboard navigation and middle mouse button work. Be sure to use CAL_SetViewOptions to set the CAL_MANUALNAVSPEED first!
viewID | The ID of the view. |
dist | The new navigation speed. |
int CAL_SetViewNearClippingDistance | ( | int | viewID, |
CAL_scalar | dist | ||
) |
Set the near clipping distance.
viewID | The ID of the view. |
dist | The new near clipping distance, legal values are between 0 and 100. |
int CAL_SetViewOptions | ( | int | viewID, |
long | options | ||
) |
Change the current view parameters.
viewID | The ID of the view. |
options | The option you want to change. Multiple parameters can be changed at once by using the | operator. Legal values can be found here. |
int CAL_ShowView | ( | int | viewID, |
char * | caption = "" , |
||
bool | maximized = false |
||
) |
Shows a view. Every view has its own unique ID. There are at most 4 views (0..3). 0 being the main view. This view cannot be switched on/off.
viewID | The ID of the view. |
caption | The caption of the window of the view, default is no caption. |
maximized | Maximizes the view window. |
int CAL_SuspendVisualisation | ( | ) |
This function stops the visualisation until CAL_ResumeVisualisation is called. This function can be used to temporarily stop visualisation, for example when you need all processor power to do some calculations.
int CAL_TileViews | ( | ) |
Tiles the visible views.