OpenCMISS-Zinc 3.0.0 Release C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Sceneviewer Class Reference

The Zinc sceneviewer is responsible for rendering the graphical Scene. More...

#include <sceneviewer.hpp>

Public Types

enum  BufferingMode {
  BUFFERING_MODE_INVALID = CMZN_SCENEVIEWER_BUFFERING_MODE_INVALID, BUFFERING_MODE_DEFAULT = CMZN_SCENEVIEWER_BUFFERING_MODE_DEFAULT, BUFFERING_MODE_SINGLE = CMZN_SCENEVIEWER_BUFFERING_MODE_SINGLE, BUFFERING_MODE_DOUBLE = CMZN_SCENEVIEWER_BUFFERING_MODE_DOUBLE,
  BUFFERING_MODE_RENDER_OFFSCREEN_AND_COPY = CMZN_SCENEVIEWER_BUFFERING_MODE_RENDER_OFFSCREEN_AND_COPY, BUFFERING_MODE_RENDER_OFFSCREEN_AND_BLEND = CMZN_SCENEVIEWER_BUFFERING_MODE_RENDER_OFFSCREEN_AND_BLEND
}
 
enum  InteractMode { INTERACT_MODE_INVALID = CMZN_SCENEVIEWER_INTERACT_MODE_INVALID, INTERACT_MODE_STANDARD = CMZN_SCENEVIEWER_INTERACT_MODE_STANDARD, INTERACT_MODE_2D = CMZN_SCENEVIEWER_INTERACT_MODE_2D }
 
enum  ProjectionMode { PROJECTION_MODE_INVALID = CMZN_SCENEVIEWER_PROJECTION_MODE_INVALID, PROJECTION_MODE_PARALLEL = CMZN_SCENEVIEWER_PROJECTION_MODE_PARALLEL, PROJECTION_MODE_PERSPECTIVE = CMZN_SCENEVIEWER_PROJECTION_MODE_PERSPECTIVE }
 
enum  StereoMode { STEREO_MODE_INVALID = CMZN_SCENEVIEWER_STEREO_MODE_INVALID, STEREO_MODE_DEFAULT = CMZN_SCENEVIEWER_STEREO_MODE_DEFAULT, STEREO_MODE_MONO = CMZN_SCENEVIEWER_STEREO_MODE_MONO, STEREO_MODE_STEREO = CMZN_SCENEVIEWER_STEREO_MODE_STEREO }
 
enum  TransparencyMode { TRANSPARENCY_MODE_INVALID = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_INVALID, TRANSPARENCY_MODE_FAST = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_FAST, TRANSPARENCY_MODE_SLOW = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_SLOW, TRANSPARENCY_MODE_ORDER_INDEPENDENT = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_ORDER_INDEPENDENT }
 
enum  ViewportMode { VIEWPORT_MODE_INVALID = CMZN_SCENEVIEWER_VIEWPORT_MODE_INVALID, VIEWPORT_MODE_ABSOLUTE = CMZN_SCENEVIEWER_VIEWPORT_MODE_ABSOLUTE, VIEWPORT_MODE_RELATIVE = CMZN_SCENEVIEWER_VIEWPORT_MODE_RELATIVE, VIEWPORT_MODE_DISTORTING_RELATIVE = CMZN_SCENEVIEWER_VIEWPORT_MODE_DISTORTING_RELATIVE }
 

Public Member Functions

 Sceneviewer (cmzn_sceneviewer_id in_sceneviewer_id)
 
 Sceneviewer (const Sceneviewer &sceneviewermodule)
 
Scenevieweroperator= (const Sceneviewer &sceneviewer)
 
bool isValid () const
 
cmzn_sceneviewer_id getId () const
 
int beginChange ()
 
int endChange ()
 
int renderScene ()
 
int setScene (const Scene &scene)
 
Scene getScene ()
 
int setScenefilter (const Scenefilter &scenefilter)
 
Scenefilter getScenefilter ()
 
int setViewportSize (int width, int height)
 
Sceneviewerinput createSceneviewerinput ()
 
int processSceneviewerinput (const Sceneviewerinput &input)
 
int getAntialiasSampling ()
 
int setAntialiasSampling (int numberOfSamples)
 
int getEyePosition (double *eyeValuesOut3)
 
int setEyePosition (double const *eyeValuesIn3)
 
InteractMode getInteractMode ()
 
int setInteractMode (InteractMode interactMode)
 
int getLookatPosition (double *lookatValuesOut3)
 
int setLookatPosition (double const *lookatValuesIn3)
 
bool getPerturbLinesFlag ()
 
int setPerturbLinesFlag (bool value)
 
ProjectionMode getProjectionMode ()
 
int setProjectionMode (ProjectionMode projectionMode)
 
double getTranslationRate ()
 
int setTranslationRate (double translationRate)
 
double getTumbleRate ()
 
int setTumbleRate (double tumbleRate)
 
double getZoomRate ()
 
int setZoomRate (double zoomRate)
 
int getUpVector (double *upVectorValuesOut3)
 
int setUpVector (double const *upVectorValuesIn3)
 
int getLookatParameters (double *eyeValuesOut3, double *lookatValuesOut3, double *upVectorValuesOut3)
 
int setLookatParametersNonSkew (double const *eyeValuesIn3, double const *lookatValuesIn3, double const *upVectorValuesIn3)
 
int getViewingVolume (double *left, double *right, double *bottom, double *top, double *near_plane, double *far_plane)
 
int setViewingVolume (double left, double right, double bottom, double top, double near_plane, double far_plane)
 
int setBackgroundColourComponentRGB (double red, double green, double blue)
 
int setBackgroundColourRGB (const double *valuesIn3)
 
int getBackgroundColourRGB (double *valuesOut3)
 
int viewAll ()
 
TransparencyMode getTransparencyMode ()
 
int setTransparencyMode (TransparencyMode transparencyMode)
 
int getTransparencyLayers ()
 
int setTransparencyLayers (int layers)
 
double getViewAngle ()
 
int setViewAngle (double viewAngle)
 
ViewportMode getViewportMode ()
 
int setViewportMode (ViewportMode viewportMode)
 
double getFarClippingPlane ()
 
double getNearClippingPlane ()
 
int setFarClippingPlane (double farClippingPlane)
 
int setNearClippingPlane (double nearClippingPlane)
 
Sceneviewernotifier createSceneviewernotifier ()
 

Protected Attributes

cmzn_sceneviewer_id id
 

Detailed Description

The Zinc sceneviewer is responsible for rendering the graphical Scene.

The Zinc sceneviewer is responsible for rendering the graphical Scene using OpenGL. It has methods to set its top scene and scene filter, and to get and set attributes controlling the view orientation, field of view, clipping planes and more. The client is responsible for creating the OpenGL-capable canvas with a sceneviewer, informing the sceneviewer of its size including on resize events, making the OpenGL context current and invoking the render scene method of the sceneviewer.

Member Enumeration Documentation

Describes the buffering mode of the scene viewer. The special modes RENDER_OFFSCREEN_AND_COPY and RENDER_OFFSCREEN_AND_BLEND are used when an OpenGL context cannot be activated directly on the supplied window, such as when the graphics are to be composited by an external program. These are currently only implemeneted for winapi. The graphics will be drawn offscreen and only rendered on screen when requested. The COPY version will overwrite any existing pixels when drawing and the BLEND version will use the alpha channel of the rendered scene to blend itself with the existing pixels.

Enumerator
BUFFERING_MODE_INVALID 

Invalid scene viewer buffering mode.

BUFFERING_MODE_DEFAULT 

BUFFERING_MODE_DEFAULT will mean that with SINGLE_BUFFER or DOUBLE_BUFFER mode may be selected depending on the other requirements of the scene viewer.

BUFFERING_MODE_SINGLE 

allow you a greater colour depth or other features unavailable on a single buffer scene viewer.

BUFFERING_MODE_DOUBLE 

allows the graphics to be drawn offscreen before being displayed all at once, reducing the apparent flicker.

BUFFERING_MODE_RENDER_OFFSCREEN_AND_COPY 

A special modes, used when an OpenGL context cannot be activated directly on the supplied window, such as when the graphics are to be composited by an external program. These are currently only implemeneted for winapi. The graphics will be drawn offscreen and only rendered on screen when requested. This mode will overwrite any existing pixels when drawing.

BUFFERING_MODE_RENDER_OFFSCREEN_AND_BLEND 

Similar to RENDER_OFFSCREEN_AND_COPY, however instead of overwriting existing pixels, this mode will use the alpha channel of the rendered scene to blend itself with the existing pixels.

Controls the way the mouse and keyboard are used to interact with the scene viewer.

Enumerator
INTERACT_MODE_INVALID 

Unspecified scene viewer interaction mode.

INTERACT_MODE_STANDARD 

CMZN_SCENEVIEWER_INTERACT_MODE_STANDARD is the traditional cmgui mode. Rotate: Left mouse button Translate: Middle mouse button Zoom: Right mouse button

INTERACT_MODE_2D 

CMZN_SCENEVIEWER_INTERACT_MODE_2D is a mode more suitable for 2D use Translate: Left mouse button Rotate: Middle mouse button Zoom: Right mouse button

Specifies the sort of projection matrix used to render the 3D scene.

Enumerator
PROJECTION_MODE_INVALID 

Unspecified scene viewer projection mode.

PROJECTION_MODE_PARALLEL 

Parallel (orthographic) projection transformations will be used when drawing.

PROJECTION_MODE_PERSPECTIVE 

Perspective projection transformations will be used when drawing.

Specifies whether a STEREO capable scene viewer is required. This will have to work in cooperation with your window manager and hardware.

Enumerator
STEREO_MODE_INVALID 

Unspecified scene viewer stereo mode.

STEREO_MODE_DEFAULT 

either STEREO or MONO depending on other scene viewer requirements

STEREO_MODE_MONO 

Normal 2-D Monoscopic display

STEREO_MODE_STEREO 

Stereoscopic display

Controls the way partially transparent objects are rendered in scene viewer.

Enumerator
TRANSPARENCY_MODE_INVALID 

Unspecified scene viewer transparency mode.

TRANSPARENCY_MODE_FAST 

CMZN_CMZN_SCENEVIEWER_TRANSPARENCY_MODE_FAST just includes transparent objects in the normal render, this causes them to obscure other objects behind if they are drawn first.

TRANSPARENCY_MODE_SLOW 

CMZN_CMZN_SCENEVIEWER_TRANSPARENCY_MODE_SLOW puts out all the opaque geometry first and then ignores the depth test while drawing all partially transparent objects, this ensures everything is drawn but multiple layers of transparency will always draw on top of each other which means a surface that is behind another may be drawn over the top of one that is supposed to be in front.

TRANSPARENCY_MODE_ORDER_INDEPENDENT 

CMZN_CMZN_SCENEVIEWER_TRANSPARENCY_MODE_ORDER_INDEPENDENT uses some Nvidia extensions to implement a full back to front perl pixel fragment sort correctly rendering transparency with a small number of passes, specified by "transparency layers". This uses all the texturing resources of the current Nvidia hardware and so no materials used in the scene can contain textures.

Specifies the behaviour of the NDC coordinates with respect to the size of the viewport.

Enumerator
VIEWPORT_MODE_INVALID 

Unspecified scene viewer viewport mode.

VIEWPORT_MODE_ABSOLUTE 

viewport_pixels_per_unit values are used to give and exact mapping from user coordinates to pixels.

VIEWPORT_MODE_RELATIVE 

the intended viewing volume is made as large as possible in the physical viewport while maintaining the aspect ratio from NDC_width and NDC_height.

VIEWPORT_MODE_DISTORTING_RELATIVE 

the intended viewing volume is made as large as possible in the physical viewport, and the aspect ratio may be changed.

Member Function Documentation

int OpenCMISS::Zinc::Sceneviewer::beginChange ( )
inline

Call this function before making multiple changes on the sceneviewer, this will stop sceneviewer from notifying clients of every change. After multiple changes have been made, call the sceneviewer end change method to restart notifications and notify clients of changes that have happened. Can be nested.

See Also
Sceneviewer::endChange
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
Sceneviewerinput OpenCMISS::Zinc::Sceneviewer::createSceneviewerinput ( )
inline

Create a scene viewer input object for manually setting mouse or other input event data.

Returns
Handle to new sceneviewerinput, or NULL/invalid handle on failure.
Sceneviewernotifier OpenCMISS::Zinc::Sceneviewer::createSceneviewernotifier ( )
inline

Create a notifier for getting callbacks for changes to the scene viewer..

Returns
Handle to new sceneviewer notifier, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Sceneviewer::endChange ( )
inline

Call sceneviewer begin change method before making multiple changes on the sceneviewer, to stop sceneviewer from notifying clients of every change. After multiple changes have been made, call this method to restart notifications and notify clients of changes that have happened.

See Also
Sceneviewer::beginChange
Parameters
sceneThe handle to the sceneviewer.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::getAntialiasSampling ( )
inline

Gets the number of jitter samples used to antialias the scene viewer.

Returns
The number of jitter samples used to antialias the graphics, or 0 if antialiasing is off or bad argument.
int OpenCMISS::Zinc::Sceneviewer::getBackgroundColourRGB ( double *  valuesOut3)
inline

Returns the background_colour of the scene viewer. The component order in the array is [red, green, blue]

Parameters
valuesOut3The rgb components of the colour with values between [0, 1.0]
Returns
OpenCMISS::Zinc::OK if successful, any other value otherwise
int OpenCMISS::Zinc::Sceneviewer::getEyePosition ( double *  eyeValuesOut3)
inline

Get the eye position of the scene viewer.

Parameters
eyeValuesOut3Array of size 3 to hold the values of the eye position.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
double OpenCMISS::Zinc::Sceneviewer::getFarClippingPlane ( )
inline

Gets the distance from the eye_point to the far clipping plane in the scene viewer.

Returns
distance from the eye_point to the far clipping plane on success, any other value on failure.
cmzn_sceneviewer_id OpenCMISS::Zinc::Sceneviewer::getId ( ) const
inline

Return the C handle of the Sceneviewer object.

Returns
C handle of Sceneviewer if this objects is valid, 0 otherwise.
InteractMode OpenCMISS::Zinc::Sceneviewer::getInteractMode ( )
inline

Gets the mouse and keyboard interaction mode of the scene viewer.

See Also
Sceneviewer::InteractMode
Returns
The interact mode or CMZN_SCENEVIEWER_INTERACT_MODE_INVALID on error.
int OpenCMISS::Zinc::Sceneviewer::getLookatParameters ( double *  eyeValuesOut3,
double *  lookatValuesOut3,
double *  upVectorValuesOut3 
)
inline

Gets the 3 main viewing parameters of the scene viewer: eye point, lookat point and up vector in a single call.

Parameters
eyeValuesOut3Array of size 3 to receive the coordinates of the point you are looking from.
lookatValuesOut3Array of size 3 to receive the coordinates of the point you are looking at, often also called the interest point.
upVectorValuesOut3Array of size 3 to receive the vector giving the up orientation in the scene viewer.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::getLookatPosition ( double *  lookatValuesOut3)
inline

Get the lookat position of the scene viewer.

Parameters
lookatValuesOut3Array of size 3 to hold the values of the lookat position.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
double OpenCMISS::Zinc::Sceneviewer::getNearClippingPlane ( )
inline

Gets the distance from the eye_point to the near clipping plane in the scene viewer.

Returns
distance from the eye_point to the near clipping plane on success, any other value on failure.
bool OpenCMISS::Zinc::Sceneviewer::getPerturbLinesFlag ( )
inline

Query whether lines are perturbed to appear in front of surfaces at the same depth to avoid visual stitching artefacts.

Returns
Boolean true if perturbing lines, otherwise false.
ProjectionMode OpenCMISS::Zinc::Sceneviewer::getProjectionMode ( )
inline

Gets the projection mode - parallel/perspective - of the scene viewer.

Returns
The viewport mode or CMZN_SCENEVIEWER_PROJECTION_MODE_INVALID on error.
Scene OpenCMISS::Zinc::Sceneviewer::getScene ( )
inline

Get the top scene for the scene viewer.

Returns
Handle to scene, or NULL/invalid handle if none or failed.
Scenefilter OpenCMISS::Zinc::Sceneviewer::getScenefilter ( )
inline

Get the filter currently used in scene viewer.

Returns
Handle to scene filter, or NULL/invalid handle if none or failed.
double OpenCMISS::Zinc::Sceneviewer::getTranslationRate ( )
inline

Gets the rate at which translation occurs in relation to mouse movement using standard sceneviewerinput transformation processing.

Returns
The translation rate, or 0 if invalid arguments.
int OpenCMISS::Zinc::Sceneviewer::getTransparencyLayers ( )
inline

Get the number of layers used in the TRANSPARENCY_MODE_ORDER_INDEPENDENT transparency mode.

See Also
Sceneviewer::TransparencyMode
Returns
number of layers for this scene viewer. Any otehr value if failed or it is not set correctly.
TransparencyMode OpenCMISS::Zinc::Sceneviewer::getTransparencyMode ( )
inline

Get the transparency_mode of the scene viewer. In fast transparency mode, the scene is drawn as it is, with depth buffer writing even for semi-transparent objects. In slow transparency mode, opaque objects are rendered first, then semi-transparent objects are rendered without writing the depth buffer. Hence, you can even see through the first semi-transparent surface drawn.

See Also
Sceneviewer::TransparencyMode
Sceneviewer::setTransparencyMode
Returns
transparency_mode set for this sceneviewer. CMZN_SCENEVIEWER_TRANSPARENCY_MODE_ORDER_INDEPENDENT if failed or mode is not set correctly
double OpenCMISS::Zinc::Sceneviewer::getTumbleRate ( )
inline

Gets the rate at which tumble occurs in relation to mouse movement using standard sceneviewerinput transformation processing.

Returns
The tumble rate, or 0 if invalid arguments.
int OpenCMISS::Zinc::Sceneviewer::getUpVector ( double *  upVectorValuesOut3)
inline

Get the up vector of the scene viewer.

Parameters
upVectorValuesOut3Array of size 3 to hold the values of the up vector.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
double OpenCMISS::Zinc::Sceneviewer::getViewAngle ( )
inline

Gets the diagonal view angle, in radians, of the scene viewer. View angle is measured across the largest square which fits inside the viewing window.

Returns
The view angle in radians, or 0 if invalid arguments.
int OpenCMISS::Zinc::Sceneviewer::getViewingVolume ( double *  left,
double *  right,
double *  bottom,
double *  top,
double *  near_plane,
double *  far_plane 
)
inline

Gets the viewing volume of the scene viewer.

ViewportMode OpenCMISS::Zinc::Sceneviewer::getViewportMode ( )
inline

Gets the viewport mode (absolute/relative/distorting relative) for the scene viewer.

Returns
The viewport mode or CMZN_SCENEVIEWER_VIEWPORT_MODE_INVALID on error.
double OpenCMISS::Zinc::Sceneviewer::getZoomRate ( )
inline

Gets the rate at which zoom occurs in relation to mouse movement using standard sceneviewerinput transformation processing.

Returns
The zoom rate, or 0 if invalid arguments.
bool OpenCMISS::Zinc::Sceneviewer::isValid ( ) const
inline

Check if this is a valid Sceneviewer object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Sceneviewer::processSceneviewerinput ( const Sceneviewerinput input)
inline

Manually calls the scene viewer's list of input callbacks with the supplied input data.

Parameters
inputDescription of the input event.
Returns
Status OpenCMISS::Zinc::OK on success, any other value if failed.
int OpenCMISS::Zinc::Sceneviewer::renderScene ( )
inline

Forces a redraw of the given scene viewer to take place immediately

int OpenCMISS::Zinc::Sceneviewer::setAntialiasSampling ( int  numberOfSamples)
inline

Sets the number of jitter samples used to antialias the scene viewer.

Parameters
numberOfSamplesThe number of jitter samples used to antialias the graphics. Only 2, 4 or 8 samples are supported. Zero disables antialiasing.
Returns
On success OpenCMISS::Zinc::OK, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setBackgroundColourComponentRGB ( double  red,
double  green,
double  blue 
)
inline

Sets the background_colour of the scene viewer by individual component. Each component should be in the range [0, 1.0].

Parameters
redThe red component value between [0, 1.0]
greenThe green component value between [0, 1.0]
blueThe blue component value between [0, 1.0]
Returns
OpenCMISS::Zinc::OK if successful, any other value otherwise
int OpenCMISS::Zinc::Sceneviewer::setBackgroundColourRGB ( const double *  valuesIn3)
inline

Sets the background_colour of the scene viewer. Each component should be in the range [0, 1.0]. The component order is [red, green, blue]

Parameters
valuesIn3The rgb components of the colour
Returns
OpenCMISS::Zinc::OK if successful, any other value otherwise
int OpenCMISS::Zinc::Sceneviewer::setEyePosition ( double const *  eyeValuesIn3)
inline

Set the eye position of the scene viewer.

Parameters
eyeValuesIn3Array of three values containing the new eye position.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::setFarClippingPlane ( double  farClippingPlane)
inline

Sets the distance from the eye_point to the far clipping plane in the scene viewer.

Parameters
farClippingPlanedistance from the eye_point to the far clipping plane
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::setInteractMode ( InteractMode  interactMode)
inline

Sets the mouse and keyboard interaction mode of the scene viewer.

See Also
Sceneviewer::InteractMode
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setLookatParametersNonSkew ( double const *  eyeValuesIn3,
double const *  lookatValuesIn3,
double const *  upVectorValuesIn3 
)
inline

Sets the 3 main viewing parameters of the scene viewer: eye point, lookat point and up vector in a single call. This function ensures the up vector is orthogonal to the view direction so the projection is not skew.

Parameters
eyeValuesIn3The 3 coordinates of the point you are looking from. It is an error if this is at the same as the lookat point.
lookatValuesIn3The 3 coordinates of the point you are looking at, often also called the interest point.
upVectorValuesIn3A vector which gives the up orientation in the scene viewer. It is an error if this vector is colinear with the view direction line from the eye to the lookat point. This vector is automatically converted to a unit vector orthogonal to the view direction.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setLookatPosition ( double const *  lookatValuesIn3)
inline

Set the lookat position of the scene viewer.

Parameters
lookatValuesIn3Array of three values containing the new lookat position.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::setNearClippingPlane ( double  nearClippingPlane)
inline

Sets the distance from the eye_point to the near clipping plane in the scene viewer.

Parameters
nearClippingPlanedistance from the eye_point to the near clipping plane
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::setPerturbLinesFlag ( bool  value)
inline

Set whether lines are perturbed to appear in front of surfaces at the same depth to avoid visual stitching artefacts. Uses GL_EXT_polygon_offset. Note that quality of surface-only graphics can be impacted with this mode.

Parameters
valueNew value of perturb lines flag.
Returns
On success OpenCMISS::Zinc::OK, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setProjectionMode ( ProjectionMode  projectionMode)
inline

Sets the projection mode - parallel/perspective - of the scene viewer.

Parameters
projectionModeThe new projection mode.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setScene ( const Scene scene)
inline

Set the top scene for the scene viewer. Only graphics for this scene and its descendents, filtered by the scene filter, are displayed.

See Also
Sceneviewer::setScenefilter
Parameters
sceneThe top scene to display.
Returns
Status OpenCMISS::Zinc::OK on success, any other value if failed.
int OpenCMISS::Zinc::Sceneviewer::setScenefilter ( const Scenefilter scenefilter)
inline

Set the filter to be used in scene viewer. All graphics will be shown if no filter is set.

Parameters
scenefilterScene filter to set for scene viewer, or NULL to show all graphics in scene.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::setTranslationRate ( double  translationRate)
inline

Sets the rate at which translation occurs in relation to mouse movement using standard sceneviewerinput transformation processing.

Parameters
translationRateThe translation rate;
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setTransparencyLayers ( int  layers)
inline

Set the number of layers used in the TRANSPARENCY_MODE_ORDER_INDEPENDENT transparency_mode.

See Also
Sceneviewer::TransparencyMode
Parameters
layersnumber of layers to be set for this scene viewer.
Returns
OpenCMISS::Zinc::OK if value is set successfully, any other value if failed.
int OpenCMISS::Zinc::Sceneviewer::setTransparencyMode ( TransparencyMode  transparencyMode)
inline

Set the transparency_mode of the scene viewer.

See Also
Sceneviewer::TransparencyMode
Sceneviewer::getTransparencyMode
Parameters
transparencyModeTransparency mode to be set for sceneviewer
Returns
OpenCMISS::Zinc::OK if value is set successfully, any other value if failed.
int OpenCMISS::Zinc::Sceneviewer::setTumbleRate ( double  tumbleRate)
inline

Sets the rate at which tumble occurs in relation to mouse movement using standard sceneviewerinput transformation processing.

Parameters
tumbleRateThe tumble rate;
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setUpVector ( double const *  upVectorValuesIn3)
inline

Set the up vector of the scene viewer. Internally this is always converted into a unit vector.

Parameters
upVectorValuesIn3Array of three values containing the new up vector.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Sceneviewer::setViewAngle ( double  viewAngle)
inline

Sets the diagonal view angle, in radians, of the scene viewer. View angle is measured across the largest square which fits inside the viewing window.

Parameters
viewAngleThe view angle in radians, > 0.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setViewingVolume ( double  left,
double  right,
double  bottom,
double  top,
double  near_plane,
double  far_plane 
)
inline

Sets the viewing volume of the scene viewer. Unless the viewing volume is the same shape as the window, taking into account the aspect, the scene viewer will enlarge it to maintain the desired aspect ratio. Hence, the values specified represent the minimum viewing volume. The left, right, bottom and top values are at the lookat point, not on the near plane as OpenGL assumes. This gives a similar sized viewing_volume for both parallel and perspective projections. The viewing volume can be made unsymmetric to create special effects such as rendering a higher resolution image in parts.

int OpenCMISS::Zinc::Sceneviewer::setViewportMode ( ViewportMode  viewportMode)
inline

Sets the viewport mode(absolute/relative/distorting relative) for the scene viewer.

Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::setViewportSize ( int  width,
int  height 
)
inline

Sets the width and height of the scene viewer's drawing area.

int OpenCMISS::Zinc::Sceneviewer::setZoomRate ( double  zoomRate)
inline

Sets the rate at which zoom occurs in relation to mouse movement using standard sceneviewerinput transformation processing.

Parameters
zoomRateThe zoom rate;
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Sceneviewer::viewAll ( )
inline

Finds the x, y and z ranges from the scene and sets the view parameters so that everything can be seen, and with window's std_view_angle. Also adjusts near and far clipping planes; if specific values are required, should follow with commands for setting these.


The documentation for this class was generated from the following files: