Model holds information which is to be gathered to constitute a view. More...
Public Member Functions | |
Model () | |
Constructs an empty model. More... | |
Str | name () const |
Returns the name of the model. More... | |
void | setName (const Str &name) |
Sets the name of the model. More... | |
bool | use2dPixelProjection () const |
Returns true if the model is using a 2D pixel exact projection to render its content. More... | |
void | setUse2dPixelProjection (bool use2dMode) |
Specify if this model should use an override camera to render 2D sceen aligned data. More... | |
virtual BoundingBox | boundingBox ()=0 |
Returns the model's bounding box. More... | |
virtual Str | modelInfo () const |
Returns model info. More... | |
![]() | |
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... | |
Protected Types | |
enum | NotifyAction { NO_ACTION, MODEL_CHANGED } |
Notification sent to the view. More... | |
Protected Member Functions | |
void | notifyObservingViews (NotifyAction notifyAction, const View *exceptView) |
Sends a notification to all observing views. More... | |
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) More... | |
Model holds information which is to be gathered to constitute a view.
Ceetron Desktop Components 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 topic for more information.
|
protected |
cee::vis::Model::Model | ( | ) |
Constructs an empty model.
|
pure virtual |
Returns the model's bounding box.
Implemented in cee::ug::UnstructGridModel, cee::vis::MarkupModel, and cee::geo::GeometryModel.
|
protected |
Returns true if the model is a being viewed in any views where clipping is enabled (either view clipping or shadow clipping)
|
virtual |
Returns model info.
Reimplemented in cee::ug::UnstructGridModel, cee::vis::MarkupModel, and cee::geo::GeometryModel.
|
protected |
Sends a notification to all observing views.
void cee::vis::Model::setName | ( | const Str & | name | ) |
Sets the name of the model.
The name of the model is not used by Ceetron Desktop Components, but can be used by the user to track and debug applications with lots of models.
void cee::vis::Model::setUse2dPixelProjection | ( | bool | use2dMode | ) |
Specify if this model should use an override camera to render 2D sceen 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.
bool cee::vis::Model::use2dPixelProjection | ( | ) | const |
Returns true if the model is using a 2D pixel exact projection to render its content.