# cee::ug::DataPartVisibility

class `DataPartVisibility` : public RefCountedObject

  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.

  Public Functions

  `DataPartVisibility`()

    Constructs an empty object.

  size_t `count`() const

    Returns the number of values in this data part visibility.

  bool `value`(size_t index) const

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

  const bool *`rawValuePointer`() const

    Returns a raw pointer to the visibility boolean value array.

  bool *`rawValuePointer`()

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

  void `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 `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.

  void `setValues`(const std::vector<bool> &values)

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

  void `setValues`(const bool values[], size_t elementCount)

    Sets the visibility values from an array of bool values.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Desktop or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...