# cee::vis::Model

class `Model` : public RefCountedObject

  Model holds information which is to be gathered to constitute a view.

  HOOPS Envision offers several types of models. Model is the base class of all model types. UnstructGridModel is a subclass of Model which adds specific model structure and functionality for representing scientific and engineering models, e.g. finite element data. Other model types are MarkupModel and GeometryModel.

  Each view can contain one or more models. See the Model for more information.

  Tutorials

  Subclassed by GeometryModel, ParticleModel, UnstructGridModel, MarkupModel

  Public Functions

  `Model`()

    Constructs an empty model.

  Str `name`() const

    Returns the name of the model.

    See also

    setName

  void `setName`(const Str &name)

    Sets the name of the model.

    The name of the model is not used by HOOPS Envision, but can be used by the user to track and debug applications with lots of models.

  bool `use2dPixelProjection`() const

    Returns true if the model is using a 2D pixel exact projection to render its content.

    See also

    setUse2dPixelProjection

  void `setUse2dPixelProjection`(bool use2dMode)

    Specifies if this model should use an override camera to render 2D screen aligned data.

    Use this method to enable 2D rendering of items from the MarkupModel and the Geometry model. The items will be fixed in the specified coordinates on the screen and will not change if the user modifies the camera by panning, rotating or zooming.

    If enabled, all items in the model will be rendered in an Orthographic projection with the viewport setup to match the screen (OpenGL based) coordinates of the host window. The items in the model will be rendered on top of all other contents of the view, but it is still possible to use the z buffer for ordering within the models with this option enabled.

    The x and y coordinate of the cee::Vec3d will be screen coordinates (OpenGL based window coordinates with lower left as origin) and the z coordinate will be used to determine which object to be visible if they overlap. The one with the largest z coordinate will win and be shown.

  virtual BoundingBox `boundingBox`() = 0

    Returns the model’s bounding box.

  virtual Str `modelInfo`() const

    Returns model info.

  Protected Types

  enum `NotifyAction`

    Notification sent to the view.

    Values:

    enumerator `NO_ACTION`

      No update needed.

      The viewer are not update.

    enumerator `MODEL_CHANGED`

      The Model was changed.

      The view(s) showing this model will be updated accordingly

  Protected Functions

  void `notifyObservingViews`(NotifyAction notifyAction, const View *exceptView)

    Sends a notification to all observing views.

  bool `hasAnyObservingViewsWithClipping`(bool *outExplicitViewClippingIsActive = NULL, bool *outDropShadowClippingIsActive = NULL) const

    Returns true if the model is a being viewed in any views where clipping is enabled (either view clipping or shadow clipping)

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, 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...