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

#include <GiViewport.h>

Inheritance diagram for OdGiViewport:
OdRxObject OdGiBaseVectorizerImpl OdGiLayerTraitsTakerView OdGsBaseVectorizer OdGsBaseVectorizeViewJoin< OdGsBaseVectorizer > OdGsBaseMaterialVectorizer OdGsBaseVectorizeViewJoinMT< OdGsBaseVectorizer > OdGsBaseVectorizeViewDef OdGsBaseMaterialViewPC OdGsBaseVectorizeViewMT OdGsBaseVectorizeViewJoin< OdGsBaseMaterialViewPC > OdGsBaseVectorizeViewJoinMT< OdGsBaseMaterialViewPC > OdGsBaseMaterialView OdGsBaseMaterialViewMT

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
 
- 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 Teigha 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 if and only 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 and only 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ getCameraLocation()

virtual OdGePoint3d OdGiViewport::getCameraLocation ( ) const
pure virtual

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

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ getCameraTarget()

virtual OdGePoint3d OdGiViewport::getCameraTarget ( ) const
pure virtual

Returns the WCS camera target for this Viewport object.

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ getCameraUpVector()

virtual OdGeVector3d OdGiViewport::getCameraUpVector ( ) const
pure virtual

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

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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.
Remarks
Returns clipFront || clipBack.

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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ isPerspective()

virtual bool OdGiViewport::isPerspective ( ) const
pure virtual

Returns true if and only if perspective mode is on for this Viewport.

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ layerVisible()

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

Returns true if and only if the specified layer is not frozen either globally or in this Viewport object.

Parameters
layerId[in] Object ID of OdLayerTableRecord.

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ linetypeScaleMultiplier()

virtual double OdGiViewport::linetypeScaleMultiplier ( ) const
pure virtual

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

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ 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 OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.

◆ viewportId()

virtual OdUInt32 OdGiViewport::viewportId ( ) const
pure virtual

Returns the OdGi Viewport ID for this Viewport object.

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

Implemented in OdGiLayerTraitsTakerView, and OdGiBaseVectorizerImpl.


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