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

Scene filters determines which graphics are drawn. More...

#include <scenefilter.hpp>

Inheritance diagram for OpenCMISS::Zinc::Scenefilter:
OpenCMISS::Zinc::ScenefilterOperator

Public Member Functions

 Scenefilter (cmzn_scenefilter_id in_filter_id)
 
 Scenefilter (const Scenefilter &scenefilter)
 
Scenefilteroperator= (const Scenefilter &scenefilter)
 
bool isValid () const
 
cmzn_scenefilter_id getId () const
 
bool isManaged ()
 
int setManaged (bool value)
 
bool evaluateGraphics (const Graphics &graphics)
 
bool isInverse ()
 
int setInverse (bool value)
 
char * getName ()
 
int setName (const char *name)
 
ScenefilterOperator castOperator ()
 

Protected Attributes

cmzn_scenefilter_id id
 

Detailed Description

Scene filters determines which graphics are drawn.

Scene filters are Boolean functions determining which graphics are drawn on a sceneviewer, or processed by a scenepicker or other tool. Derived types implement operators including filtering by scene and graphics visibility flags, region/scene, graphics name, graphics type, field domain type, and logical and/or operators allowing expressions combining filters.

Member Function Documentation

ScenefilterOperator OpenCMISS::Zinc::Scenefilter::castOperator ( )
inline

If the filter is of operator and or or type, then this function returns the operator derived scenefilter handle.

Returns
Handle to derived scene filter operator, or NULL/invalid handle if wrong type or failed.
bool OpenCMISS::Zinc::Scenefilter::evaluateGraphics ( const Graphics graphics)
inline

Query whether graphics is shown (or processed) with a scene filter.

Parameters
graphicsThe graphics to query.
Returns
Boolean true if this filter shows (includes) this graphics, otherwise false (hides).
cmzn_scenefilter_id OpenCMISS::Zinc::Scenefilter::getId ( ) const
inline

Return the C handle of the Scenefilter object.

Returns
C handle of Scenefilter if this objects is valid, 0 otherwise.
char* OpenCMISS::Zinc::Scenefilter::getName ( )
inline

Return an allocated string containing scene filter name.

Returns
allocated string containing scene filter name, or NULL on failure. Up to caller to free using cmzn_deallocate().
bool OpenCMISS::Zinc::Scenefilter::isInverse ( )
inline

Get state of inverse flag which if set reverses filter match condition.

Returns
true if scene filter matches inverse, otherwise false.
bool OpenCMISS::Zinc::Scenefilter::isManaged ( )
inline

Get managed status of scene filter in its owning scene filter module.

See Also
Scenefilter::setManaged
Returns
true if scene filter is managed, otherwise false.
bool OpenCMISS::Zinc::Scenefilter::isValid ( ) const
inline

Check if this is a valid Scenefilter object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Scenefilter::setInverse ( bool  value)
inline

Set state of inverse flag which if set reverses filter match condition. Default is false i.e. normal condition.

Parameters
valueBoolean true to set inverse, false for non-inverse.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Scenefilter::setManaged ( bool  value)
inline

Set managed status of scene filter in its owning scene filter module. If set (managed) the scene filter will remain indefinitely in the scene filter module even if no external references are held. If not set (unmanaged) the scene filter will be automatically removed from the module when no longer referenced externally, effectively marking it as pending destruction. All new objects are unmanaged unless stated otherwise.

Parameters
valueThe new value for the managed flag: true or false.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Scenefilter::setName ( const char *  name)
inline

Set name of the scene filter. Must be unique in the scene filter module.

Parameters
namename to be set to the scene filter
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.

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