CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdGiViewport Class Referenceabstract

#include <GiViewport.h>

Inheritance diagram for OdGiViewport:
OdRxObject OdStaticRxObject< OdGiViewport > OdGiBaseVectorizerImpl OdGiLayerTraitsTakerView OdGiDummyViewport< OdStaticRxObject< OdGiViewport > > OdGsBaseVectorizer OdGsBaseVectorizeViewJoin< OdGsBaseVectorizer > OdGsBaseMaterialVectorizer OdGsBaseVectorizeViewDef OdGsBaseMaterialViewPC OdGsBaseVectorizeViewJoin< OdGsBaseMaterialViewPC > OdGsBaseMaterialView

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGiViewport)
 
virtual OdGeMatrix3d getModelToEyeTransform () const =0
 
virtual OdGeMatrix3d getEyeToModelTransform () const =0
 
virtual OdGeMatrix3d getWorldToEyeTransform () const =0
 
virtual OdGeMatrix3d getEyeToWorldTransform () const =0
 
virtual bool isPerspective () const =0
 
virtual bool doPerspective (OdGePoint3d &point) const =0
 
virtual bool doInversePerspective (OdGePoint3d &point) const =0
 
virtual void getNumPixelsInUnitSquare (const OdGePoint3d &point, OdGePoint2d &pixelDensity, bool bUsePerspective=true) const =0
 
virtual OdGePoint3d getCameraLocation () const =0
 
virtual OdGePoint3d getCameraTarget () const =0
 
virtual OdGeVector3d getCameraUpVector () const =0
 
virtual OdGeVector3d viewDir () const =0
 
virtual OdUInt32 viewportId () const =0
 
virtual OdInt16 acadWindowId () const =0
 
virtual void getViewportDcCorners (OdGePoint2d &lowerLeft, OdGePoint2d &upperRight) const =0
 
virtual bool getFrontAndBackClipValues (bool &clipFront, bool &clipBack, double &front, double &back) const =0
 
virtual double linetypeScaleMultiplier () const =0
 
virtual double linetypeGenerationCriteria () const =0
 
virtual bool layerVisible (OdDbStub *layerId) const =0
 
virtual const OdGiContextualColorscontextualColors () const
 
virtual OdDbStub * annotationScaleId () const
 
- 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

This class represents the view characteristics of current Viewport within the ODA Platform vectorization framework.

Remarks
Client code can query this information to generate the correct viewport -dependent geometric representation for an object.
See also
TD_Gi:

<group OdGi_Classes>

Definition at line 50 of file GiViewport.h.

Member Function Documentation

◆ acadWindowId()

virtual OdInt16 OdGiViewport::acadWindowId ( ) const
pure virtual

Returns the ID for this Viewport object.

Remarks
The value returned corresponds to the CVPORT system variable.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ annotationScaleId()

virtual OdDbStub * OdGiViewport::annotationScaleId ( ) const
inlinevirtual

Returns current annotation scale for this viewport.

Remarks
This pointer could be null if database does not support annotation scales.

Reimplemented in OdGiBaseVectorizerImpl.

Definition at line 259 of file GiViewport.h.

◆ contextualColors()

virtual const OdGiContextualColors * OdGiViewport::contextualColors ( ) const
inlinevirtual

Returns pointer to context-dependent colors storage.

Remarks
This pointer could be null if contextual colors doesn't specified by context.

Reimplemented in OdGiBaseVectorizerImpl.

Definition at line 251 of file GiViewport.h.

◆ doInversePerspective()

virtual bool OdGiViewport::doInversePerspective ( OdGePoint3d point) const
pure virtual

Applies the inverse of the current perspective transformation to the specified point.

Parameters
point[in/out] Any 3D point.
Remarks
The point is transformed from normalized device coordinates to EyeSpace coordinates
Returns
true the point was transformed; i.e., a perspective transform is active, and the point was neither too close or behind the camera.
See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ doPerspective()

virtual bool OdGiViewport::doPerspective ( OdGePoint3d point) const
pure virtual

Applies the current perspective transformation to the specified point.

Parameters
point[in/out] Any 3D point.
Remarks
The point is transformed from EyeSpace coordinates to normalized device coordinates.
Returns
true if the point was transformed; i.e., a perspective transform is active, and the point was neither too close or behind the camera.
See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getCameraLocation()

virtual OdGePoint3d OdGiViewport::getCameraLocation ( ) const
pure virtual

Returns the WCS camera (eye) location for this Viewport object.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getCameraTarget()

virtual OdGePoint3d OdGiViewport::getCameraTarget ( ) const
pure virtual

Returns the WCS camera target for this Viewport object.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getCameraUpVector()

virtual OdGeVector3d OdGiViewport::getCameraUpVector ( ) const
pure virtual

Returns the WCS camera "up" vector for this Viewport object.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getEyeToModelTransform()

virtual OdGeMatrix3d OdGiViewport::getEyeToModelTransform ( ) const
pure virtual

Returns the transformation matrix from EyeSpace to ModelSpace for this Viewport object.

See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getEyeToWorldTransform()

virtual OdGeMatrix3d OdGiViewport::getEyeToWorldTransform ( ) const
pure virtual

Returns the transformation matrix from EyeSpace to WCS for this Viewport object.

See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getFrontAndBackClipValues()

virtual bool OdGiViewport::getFrontAndBackClipValues ( bool &  clipFront,
bool &  clipBack,
double &  front,
double &  back 
) const
pure virtual

Returns the front and back clipping parameters for this Viewport object.

Parameters
clipFront[out] Receives true if and only if front clipping is enabled.
clipBack[out] Receives true if and only if back clipping is enabled.
front[out] Receives the front clipping distance.
back[out] Receives the back clipping distance.
Returns
true only if both front clipping and back clipping is enabled, false otherwise.
Remarks
front and back are the eye coordinate Z values. Clipping planes are perpendicular to the view direction. If the front clipping plane is enabled, geometry in front of it is not displayed. If the back clipping plane is enabled, geometry in back of it is not displayed.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getModelToEyeTransform()

virtual OdGeMatrix3d OdGiViewport::getModelToEyeTransform ( ) const
pure virtual

Returns the transformation matrix from ModelSpace to EyeSpace for this Viewport object.

See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getNumPixelsInUnitSquare()

virtual void OdGiViewport::getNumPixelsInUnitSquare ( const OdGePoint3d point,
OdGePoint2d pixelDensity,
bool  bUsePerspective = true 
) const
pure virtual

Returns the display pixel density at the specified point for this Viewport object.

Parameters
point[in] WCS center of the unit square.
pixelDensity[out] Receives the pixel density.
bUsePerspective[in] Enable perspective inclusion into pixel density calculation.
Remarks
Pixel density is measured in pixels per WCS unit.

This function can be used to determine if the geometry generated for an object will be smaller than the size of a pixel.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getViewportDcCorners()

virtual void OdGiViewport::getViewportDcCorners ( OdGePoint2d lowerLeft,
OdGePoint2d upperRight 
) const
pure virtual

Returns lower-left and upper-right corners of this Viewport object in normalized device Coordinates.

Parameters
lowerLeft[out] Receives the lower-left corner.
upperRight[out] Receives the upper-right.
Remarks
This information lets position items that are fixed in size and/or position with respect to a Viewport.
See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ getWorldToEyeTransform()

virtual OdGeMatrix3d OdGiViewport::getWorldToEyeTransform ( ) const
pure virtual

Returns the transformation matrix from WCS to EyeSpace for this Viewport object.

See also
Coordinate Systems

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ isPerspective()

virtual bool OdGiViewport::isPerspective ( ) const
pure virtual

Checks whether perspective mode is turned on for this viewport.

Returns
true if perspective mode is on for this Viewport, false otherwise.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ layerVisible()

virtual bool OdGiViewport::layerVisible ( OdDbStub *  layerId) const
pure virtual

Checks whether the specified layer is not frozen either globally or in this Viewport object.

Parameters
layerId[in] Object ID of OdLayerTableRecord.
Returns
true the specified layer is not frozen either globally or in this Viewport object, false otherwise.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ linetypeGenerationCriteria()

virtual double OdGiViewport::linetypeGenerationCriteria ( ) const
pure virtual

Returns the WCS value below which linetype generation is not used.

Remarks
If the WCS length an entire linetype pattern is less than the returned value, then the linetype will be rendered as continuous.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ linetypeScaleMultiplier()

virtual double OdGiViewport::linetypeScaleMultiplier ( ) const
pure virtual

Returns a multiplier that is used to scale all linetypes in this Viewport object.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ ODRX_DECLARE_MEMBERS()

OdGiViewport::ODRX_DECLARE_MEMBERS ( OdGiViewport  )

◆ viewDir()

virtual OdGeVector3d OdGiViewport::viewDir ( ) const
pure virtual

Returns the vector from the camera target to the camera location.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.

◆ viewportId()

virtual OdUInt32 OdGiViewport::viewportId ( ) const
pure virtual

Returns the OdGi Viewport ID for this Viewport object.

Remarks
The value returned has no relationship to the CVPORT system variable.

Implemented in OdGiDummyViewport< OdStaticRxObject< OdGiViewport > >, OdGiBaseVectorizerImpl, and OdGiLayerTraitsTakerView.


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