CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | List of all members
OdGsModel Class Referenceabstract

#include <GsModel.h>

Inheritance diagram for OdGsModel:
OdRxObject OdGsBaseModel

Public Types

enum  InvalidationHint {
  kInvalidateIsolines = 0 , kInvalidateViewportCache = 1 , kInvalidateAll = 2 , kInvalidateMaterials = 3 ,
  kInvalidateLinetypes = 4
}
 
enum  RenderType {
  kMinRenderType = -3 , kUserBg1 = -3 , kUserBg2 = -2 , kUserBg3 = -1 ,
  kMain = 0 , kSprite , kDirect , kHighlight ,
  kHighlightSelection , kDirectTopmost , kContrast , kCount ,
  kUserFg1 = kCount , kUserFg2 , kUserFg3 , kMaxRenderType ,
  kNumRenderTypes = kMaxRenderType - kMinRenderType
}
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGsModel)
 
virtual void setOpenDrawableFn (OdGiOpenDrawableFn openDrawableFn)=0
 
virtual void onAdded (OdGiDrawable *pAdded, OdGiDrawable *pParent)=0
 
virtual void onAdded (OdGiDrawable *pAdded, OdDbStub *parentID)=0
 
virtual void onModified (OdGiDrawable *pModified, OdGiDrawable *pParent)=0
 
virtual void onModified (OdGiDrawable *pModified, OdDbStub *parentID)=0
 
virtual void onErased (OdGiDrawable *pErased, OdGiDrawable *pParent)=0
 
virtual void onErased (OdGiDrawable *pErased, OdDbStub *parentID)=0
 
virtual void onUnerased (OdGiDrawable *pUnerased, OdGiDrawable *pParent)
 
virtual void onUnerased (OdGiDrawable *pUnerased, OdDbStub *parentID)
 
virtual void invalidate (InvalidationHint hint)=0
 
virtual void invalidate (OdGsView *pView)=0
 
virtual void invalidateVisible (OdGsDevice *pDevice)=0
 
virtual void setTransform (const OdGeMatrix3d &)=0
 
virtual OdGeMatrix3d transform () const =0
 
virtual void highlight (const OdGiPathNode &path, bool bDoIt=true, const OdGsView *pView=0)=0
 
virtual void setRenderType (RenderType renderType)=0
 
virtual RenderType renderType () const =0
 
virtual void setRenderModeOverride (OdGsView::RenderMode mode=OdGsView::kNone)=0
 
virtual void setViewClippingOverride (bool bEnable)=0
 
virtual void setBackground (OdDbStub *backgroundId)=0
 
virtual OdDbStub * background () const =0
 
virtual void setVisualStyle (OdDbStub *visualStyleId)=0
 
virtual OdDbStub * visualStyle () const =0
 
virtual void setVisualStyle (const OdGiVisualStyle &visualStyle)=0
 
virtual bool visualStyle (OdGiVisualStyle &visualStyle) const =0
 
virtual void addModelReactor (OdGsModelReactor *pReactor)=0
 
virtual void removeModelReactor (OdGsModelReactor *pReactor)=0
 
virtual void setEnableSectioning (bool bEnable)=0
 
virtual bool isSectioningEnabled () const =0
 
virtual bool setSectioning (const OdGePoint3dArray &points, const OdGeVector3d &upVector)=0
 
virtual bool setSectioning (const OdGePoint3dArray &points, const OdGeVector3d &upVector, double dTop, double dBottom)=0
 
virtual void setSectioningVisualStyle (OdDbStub *visualStyleId)=0
 
virtual void setEnableLinetypes (bool bEnable)=0
 
virtual bool isLinetypesEnabled () const =0
 
virtual void setSelectable (bool bEnable)=0
 
virtual bool isSelectable () const =0
 
virtual void setEnableLightsInBlocks (bool bEnable)=0
 
virtual bool isLightsInBlocksEnabled () const =0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

The class represents collections of drawable objects in the Teigha framework.

Corresponding C++ library: TD_Gs

<group OdGs_Classes>

Definition at line 76 of file GsModel.h.

Member Enumeration Documentation

◆ InvalidationHint

The InvalidationHint enumeration specifies how the Graphic System should process the invalidate() method.

Enumerator
kInvalidateIsolines 
kInvalidateViewportCache 
kInvalidateAll 
kInvalidateMaterials 
kInvalidateLinetypes 

Definition at line 158 of file GsModel.h.

◆ RenderType

Specifies how the model's geometry should be rendered by the Graphic System.

Enumerator
kMinRenderType 
kUserBg1 
kUserBg2 
kUserBg3 
kMain 
kSprite 
kDirect 
kHighlight 
kHighlightSelection 
kDirectTopmost 
kContrast 
kCount 
kUserFg1 
kUserFg2 
kUserFg3 
kMaxRenderType 
kNumRenderTypes 

Definition at line 224 of file GsModel.h.

Member Function Documentation

◆ addModelReactor()

virtual void OdGsModel::addModelReactor ( OdGsModelReactor pReactor)
pure virtual

Adds a model reactor for this Model object.

Parameters
pReactor[in] Model reactor

Implemented in OdGsBaseModel.

◆ background()

virtual OdDbStub* OdGsModel::background ( ) const
pure virtual

Returns the OdDbBackground object ID if the background was set to this Model object.

Implemented in OdGsBaseModel.

◆ highlight()

virtual void OdGsModel::highlight ( const OdGiPathNode path,
bool  bDoIt = true,
const OdGsView pView = 0 
)
pure virtual

Highlights the specified entity in this Model object.

Parameters
path[in] Path to the entity for highlighting.
bDoIt[in] Flag that indicates whether highlighting is enabled (true value) or disabled (false value).
pView[in] Pointer to the view where the specified entity should be highlighted.

Implemented in OdGsBaseModel.

◆ invalidate() [1/2]

virtual void OdGsModel::invalidate ( InvalidationHint  hint)
pure virtual

Invalidates the specified cached data contained in this Model object.

Parameters
hint[in] Invalidation hint.
Remarks
Hint must be one of the following:

Value kInvalidateIsolines 0 kInvalidateViewportCache 1 kInvalidateAll 2 kInvalidateMaterials 3 kInvalidateLinetypes 4

Implemented in OdGsBaseModel.

◆ invalidate() [2/2]

virtual void OdGsModel::invalidate ( OdGsView pView)
pure virtual

Invalidates cached data associated with the specified View object.

Parameters
pView[in] Pointer to the OdGsView object for which data is to be invalidated.

Implemented in OdGsBaseModel.

◆ invalidateVisible()

virtual void OdGsModel::invalidateVisible ( OdGsDevice pDevice)
pure virtual

Invalidates cached data that visible on the device.

Parameters
pView[in] Pointer to the OdGsDevice object for which data is to be invalidated.

Implemented in OdGsBaseModel.

◆ isLightsInBlocksEnabled()

virtual bool OdGsModel::isLightsInBlocksEnabled ( ) const
pure virtual

Returns true if lights in blocks are enabled or returns false in the other case.

Implemented in OdGsBaseModel.

◆ isLinetypesEnabled()

virtual bool OdGsModel::isLinetypesEnabled ( ) const
pure virtual

Returns true if the linetype display is enabled or returns false in the other case.

Implemented in OdGsBaseModel.

◆ isSectioningEnabled()

virtual bool OdGsModel::isSectioningEnabled ( ) const
pure virtual

Returns true if the sectioning is active in the views displaying this Model object. Returns false in the other case.

Implemented in OdGsBaseModel.

◆ isSelectable()

virtual bool OdGsModel::isSelectable ( ) const
pure virtual

Checks whether this Model object is selected. If the returning value is true, the Model object is selectable. If the returning value is false, the Model object is not selectable.

Implemented in OdGsBaseModel.

◆ ODRX_DECLARE_MEMBERS()

OdGsModel::ODRX_DECLARE_MEMBERS ( OdGsModel  )

◆ onAdded() [1/2]

virtual void OdGsModel::onAdded ( OdGiDrawable pAdded,
OdDbStub *  parentID 
)
pure virtual

Notification function called whenever a drawable object is added to this Model object.

Parameters
pAdded[in] Pointer to the added Drawable object.
parentID[in] Object ID of the parent of the added Drawable object.

Implemented in OdGsBaseModel.

◆ onAdded() [2/2]

virtual void OdGsModel::onAdded ( OdGiDrawable pAdded,
OdGiDrawable pParent 
)
pure virtual

Notification function called whenever a drawable object is added to this Model object.

Parameters
pAdded[in] Pointer to the added Drawable object.
pParent[in] Pointer to the parent of the added Drawable object.

Implemented in OdGsBaseModel.

◆ onErased() [1/2]

virtual void OdGsModel::onErased ( OdGiDrawable pErased,
OdDbStub *  parentID 
)
pure virtual

Notification function called whenever a drawable object is erased from this Model object.

Parameters
pErased[in] Pointer to the erased Drawable object.
parentID[in] Object ID of the parent of the erased Drawable object.

Implemented in OdGsBaseModel.

◆ onErased() [2/2]

virtual void OdGsModel::onErased ( OdGiDrawable pErased,
OdGiDrawable pParent 
)
pure virtual

Notification function called whenever a drawable object is erased from this Model object.

Parameters
pErased[in] Pointer to the erased Drawable object.
pParent[in] Pointer to the parent of the erased Drawable object.

Implemented in OdGsBaseModel.

◆ onModified() [1/2]

virtual void OdGsModel::onModified ( OdGiDrawable pModified,
OdDbStub *  parentID 
)
pure virtual

Notification function called whenever a drawable object is modified in this Model object.

Parameters
pModified[in] Pointer to the modified Drawable object.
parentID[in] Object ID of the parent of the modified Drawable object.

Implemented in OdGsBaseModel.

◆ onModified() [2/2]

virtual void OdGsModel::onModified ( OdGiDrawable pModified,
OdGiDrawable pParent 
)
pure virtual

Notification function called whenever a drawable object is modified in this Model object.

Parameters
pModified[in] Pointer to the modified Drawable object.
pParent[in] Pointer to the parent of the modified Drawable object.

Implemented in OdGsBaseModel.

◆ onUnerased() [1/2]

virtual void OdGsModel::onUnerased ( OdGiDrawable pUnerased,
OdDbStub *  parentID 
)
virtual

Notification function called whenever a drawable object is unerased in this Model object.

Parameters
pUnerased[in] Pointer to the unerased Drawable object.
parentID[in] Object ID of the parent of the unerased Drawable object.

Reimplemented in OdGsBaseModel.

◆ onUnerased() [2/2]

virtual void OdGsModel::onUnerased ( OdGiDrawable pUnerased,
OdGiDrawable pParent 
)
virtual

Notification function called whenever a drawable object is unerased in this Model object.

Parameters
pUnerased[in] Pointer to the unerased Drawable object.
pParent[in] Pointer to the parent of the unerased Drawable object.

Reimplemented in OdGsBaseModel.

◆ removeModelReactor()

virtual void OdGsModel::removeModelReactor ( OdGsModelReactor pReactor)
pure virtual

Removes the specified model reactor from this Model object.

Parameters
pReactor[in] Pointer to the model reactor that should be removed

Implemented in OdGsBaseModel.

◆ renderType()

virtual RenderType OdGsModel::renderType ( ) const
pure virtual

Returns the render type of this Model object.

Implemented in OdGsBaseModel.

◆ setBackground()

virtual void OdGsModel::setBackground ( OdDbStub *  backgroundId)
pure virtual

Sets the background of this Model object.

Parameters
backgroundId[in] OdDbBackground object ID.

Implemented in OdGsBaseModel.

◆ setEnableLightsInBlocks()

virtual void OdGsModel::setEnableLightsInBlocks ( bool  bEnable)
pure virtual

Enables or disables lights in blocks.

Parameters
bEnable[in] Boolean flag which enables (true value) or disables (false value) lights in blocks.

Implemented in OdGsBaseModel.

◆ setEnableLinetypes()

virtual void OdGsModel::setEnableLinetypes ( bool  bEnable)
pure virtual

Enables or disables linetype display in any OdGsView object that views this Model object.

Parameters
bEnable[in] Boolean flag which enables (true value) or disables (false value) linetype display.

Implemented in OdGsBaseModel.

◆ setEnableSectioning()

virtual void OdGsModel::setEnableSectioning ( bool  bEnable)
pure virtual

Enables the currently specified sectioning in the views displaying this Model object.

Parameters
bEnable[in] Boolean flag which indicates whether sectioning should be enabled

Implemented in OdGsBaseModel.

◆ setOpenDrawableFn()

virtual void OdGsModel::setOpenDrawableFn ( OdGiOpenDrawableFn  openDrawableFn)
pure virtual

Specifies the function called for drawable object open by this Model object.

Parameters
openDrawableFn[in] Function to be called.

Implemented in OdGsBaseModel.

◆ setRenderModeOverride()

virtual void OdGsModel::setRenderModeOverride ( OdGsView::RenderMode  mode = OdGsView::kNone)
pure virtual

Sets the specified rendering mode override for this Model object.

Parameters
mode[in] Render mode override.
Remarks
Rendering mode specified as OdGsView::kNone cancels currently set rendering mode override.

Implemented in OdGsBaseModel.

◆ setRenderType()

virtual void OdGsModel::setRenderType ( RenderType  renderType)
pure virtual

Sets the render type for this Model object.

Parameters
renderType[in] Render type.

Implemented in OdGsBaseModel.

◆ setSectioning() [1/2]

virtual bool OdGsModel::setSectioning ( const OdGePoint3dArray points,
const OdGeVector3d upVector 
)
pure virtual

Sets the active sectioning for this Model object. After specifying the sectioning, it should be enabled by the setEnableSectioning() method.

Parameters
points[in] Array of co-planar points specifying a sectioning region
upVector[in] Vector that specifies the orientation of the plane that contains points
Remarks
If the last point of the points array is equal to the first point of this array, the sectioning region is closed. The upVector is used to specify the clipped and unclipped sides of the sectioning. The unclipped side is determined by the direction of the cross product of the first line segment defined by the point array, and the upVector.

Implemented in OdGsBaseModel.

◆ setSectioning() [2/2]

virtual bool OdGsModel::setSectioning ( const OdGePoint3dArray points,
const OdGeVector3d upVector,
double  dTop,
double  dBottom 
)
pure virtual

Sets the active sectioning for this Model object. The sectioning is capped vertically using the specified top and bottom heights. After specifying the sectioning, it should be enabled by the setEnableSectioning() method.

Parameters
points[in] Array of co-planar points specifying a sectioning region
upVector[in] Vector that specifies the orientation of the plane that contains points
dTop[in] Specifies the top capping height of the sectioning
dBottom[in] Specifies the bottom capping height of the sectioning
Returns
Returns true if the specified sectioning is valid. Returns false if the specified sectioning is invalid or malformed.
Remarks
If the last point of the points array is equal to the first point of this array, the sectioning region is closed. The upVector is used to specify the clipped and unclipped sides of the sectioning. The unclipped side is determined by the direction of the cross product of the first line segment defined by the point array, and the upVector.

Implemented in OdGsBaseModel.

◆ setSectioningVisualStyle()

virtual void OdGsModel::setSectioningVisualStyle ( OdDbStub *  visualStyleId)
pure virtual

Sets the visual style for the objects on the clipped side of the sectioning.

Parameters
visualStyleId[in] Visual style object ID. Null by default.
Remarks
If the input parameter is a null object ID, the clipped side should not be drawn.

Implemented in OdGsBaseModel.

◆ setSelectable()

virtual void OdGsModel::setSelectable ( bool  bEnable)
pure virtual

Enables or disables the ability to select this Model object. If the input value is true, the Model object is selectable. If the input value is false, the Model object is unselectable.

Parameters
bEnable[in] Boolean flag which indicates whether this Model object is selectable

Implemented in OdGsBaseModel.

◆ setTransform()

virtual void OdGsModel::setTransform ( const OdGeMatrix3d )
pure virtual

Transforms this Model object by applying the specified transformation matrix to the model contents.

Parameters
OdGeMatrix3d[in] Transformation matrix.

Implemented in OdGsBaseModel.

◆ setViewClippingOverride()

virtual void OdGsModel::setViewClippingOverride ( bool  bEnable)
pure virtual

Enables this model's geometry to ignore the view's front and back clipping planes (if any) and viewport 3d clipping (if set). If the method's input value is false, the view's clipping planes and viewport 3d clipping are allowed by this Model object.

Parameters
bEnable[in] Boolean flag which indicates that the model ignores the view's clipping planes and viewport 3d clipping (true value).

Implemented in OdGsBaseModel.

◆ setVisualStyle() [1/2]

virtual void OdGsModel::setVisualStyle ( const OdGiVisualStyle visualStyle)
pure virtual

Sets the visual style for this Model object. This method is used to direct views to display the model in the specified visual style. By default, models are displayed in the visual style assigned to the view.

Parameters
visualStyle[in] Visual style object

Implemented in OdGsBaseModel.

◆ setVisualStyle() [2/2]

virtual void OdGsModel::setVisualStyle ( OdDbStub *  visualStyleId)
pure virtual

Sets the visual style for this Model object. This method is used to direct views to display the model in the specified visual style. By default, models are displayed in the visual style assigned to the view.

Parameters
visualStyleId[in] Visual style object ID used by objects in this model
Remarks
Specify the OdDbObjectId::kNull as an input value to clear the model's visual style and use the view visual style for displaying the model's objects.

Implemented in OdGsBaseModel.

◆ transform()

virtual OdGeMatrix3d OdGsModel::transform ( ) const
pure virtual

Obtains the current transformation matrix of this Model object.

Implemented in OdGsBaseModel.

◆ visualStyle() [1/2]

virtual OdDbStub* OdGsModel::visualStyle ( ) const
pure virtual

Returns the visual style of this Model object.

Implemented in OdGsBaseModel.

◆ visualStyle() [2/2]

virtual bool OdGsModel::visualStyle ( OdGiVisualStyle visualStyle) const
pure virtual

Returns the visual style of this Model object.

Parameters
visualStyle[out] Visual style
Returns
Returns true if the visual style is set for the model, false otherwise.

Implemented in OdGsBaseModel.


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