cee::ug::DataPartVisibility Class Reference

Per element visibility result for a part. More...

Public Member Functions

 DataPartVisibility ()
 Constructs an empty object. More...
 
size_t count () const
 Returns the number of values in this data part visibility. More...
 
bool value (size_t index) const
 Returns true if the element at the specified index is visible. False if not. More...
 
const bool * rawValuePointer () const
 Returns a raw pointer to the visibility boolean value array. More...
 
bool * rawValuePointer ()
 Returns a modifiable raw pointer to the visibility boolean value array. More...
 
void resize (size_t count)
 Sets the number of values in the object. More...
 
void setValue (size_t index, bool visible)
 Sets the value at the given index. More...
 
void setValues (const std::vector< bool > &values)
 Sets the visibility values from a std::vector of bool values. More...
 
void setValues (const bool values[], size_t elementCount)
 Sets the visibility values from an array of bool values. More...
 
- Public Member Functions inherited from cee::RefCountedObject
void addRef () const
 Increments the reference count for this object. More...
 
void release () const
 Decrements the reference count for this object. More...
 
int refCount () const
 Returns the reference count for this object. More...
 
void setRefCountZero () const
 Sets the ref count to zero, but DOES NOT delete the object. More...
 
Inheritance diagram for cee::ug::DataPartVisibility:
cee::RefCountedObject

Detailed Description

Per element visibility result for a part.

The result has one bool value for each element in the part. If the model spec is specified to use the visibility result, only the elements with visibility set to true will be shown.

DataPartVisibility object contains the visibility result values corresponding to a DataPart. This means that the number of result values in each visibility part must match the number of elements in the corresponding part.

A DataPartVisibility is a child of a DataResultVisibility in the same way as a DataPart is a child of a DataGeometry. The DataResultVisibility must have the same number of child parts as the DataGeometry.

The visibility of each element is specified using setValue() or setValues(). Get the number of values with count() and query a specific value using value() with an index.

Note
The class is reference counted and can be shared between multiple results. Remember that since this object is reference counted it should never be created on the stack.

For example code, see DataPartScalar as it behaves in the same way.

Constructor & Destructor Documentation

cee::ug::DataPartVisibility::DataPartVisibility ( )

Constructs an empty object.

Member Function Documentation

size_t cee::ug::DataPartVisibility::count ( ) const

Returns the number of values in this data part visibility.

const bool * cee::ug::DataPartVisibility::rawValuePointer ( ) const

Returns a raw pointer to the visibility boolean value array.

bool * cee::ug::DataPartVisibility::rawValuePointer ( )

Returns a modifiable raw pointer to the visibility boolean value array.

void cee::ug::DataPartVisibility::resize ( size_t  count)

Sets the number of values in the object.

The current values in the object will be kept up to the given count (if shrinking).

void cee::ug::DataPartVisibility::setValue ( size_t  index,
bool  visible 
)

Sets the value at the given index.

Warning
The specified index must be a valid index. Either call one of the setValues() methods or call resize() prior to calling this method.
See also
resize()
void cee::ug::DataPartVisibility::setValues ( const std::vector< bool > &  values)

Sets the visibility values from a std::vector of bool values.

void cee::ug::DataPartVisibility::setValues ( const bool  values[],
size_t  elementCount 
)

Sets the visibility values from an array of bool values.

bool cee::ug::DataPartVisibility::value ( size_t  index) const

Returns true if the element at the specified index is visible. False if not.