CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
OdTrVisCamera Class Reference

#include <TrVisCamera.h>

Public Types

enum  OrbitType { kOrbitPerp = 0, kOrbitHorizontal, kOrbitVertical, kOrbitEye }
 

Public Member Functions

 OdTrVisCamera ()
 
 ~OdTrVisCamera ()
 
const OdTrVisViewParamsDefviewParams (bool bUpdated=true) const
 
void setViewParams (const OdTrVisViewParamsDef &viewParams, bool bSetModified=false)
 
bool isModified () const
 
void markModified ()
 
void setParentCamera (OdTrVisCamera *)
 
OdTrVisCameraparentCamera () const
 
void setOverlayOwnerCamera (OdTrVisCamera *)
 
OdTrVisCameraoverlayOwnerCamera () const
 
void removeOverlayCamera (OdTrVisCamera *)
 
void setSiblingOwnerCamera (OdTrVisCamera *)
 
OdTrVisCamerasiblingOwnerCamera () const
 
void removeSiblingCamera (OdTrVisCamera *)
 
void setContext (OdTrVisSurfaceDef *pSurface, OdTrVisViewportDef *pViewport, OdTrVisExtentsDef *pExtents)
 
virtual void pan (int nX, int nY)
 
virtual void zoom (float fDelta)
 
virtual void zoom (int nX, int nY, float fDelta)
 
virtual void orbit (int nX, int nY, OrbitType type=kOrbitPerp, float angle=0.0f)
 
virtual void zoomExtents (float coef=1.03f)
 
virtual void translate (const OdGeVector3d &offset)
 
virtual void rotate (double xAngle, double yAngle, double zAngle, bool bLocalCS=true)
 
virtual void update () const
 
virtual void copyViewParams (const OdTrVisCamera *)
 
const OdGePoint3dviewPosition () const
 
void setViewPosition (const OdGePoint3d &pt)
 
const OdGeVector3dviewBasisX () const
 
void setViewBasisX (const OdGeVector3d &xBasis)
 
const OdGeVector3dviewBasisY () const
 
void setViewBasisY (const OdGeVector3d &yBasis)
 
const OdGeVector3dviewBasisZ () const
 
void setViewBasisZ (const OdGeVector3d &zBasis)
 
bool isPerspectiveProjection () const
 
void setPerspectiveProjection (bool p)
 
double fieldWidth () const
 
void setFieldWidth (double w)
 
double fieldHeight () const
 
void setFieldHeight (double h)
 
double lensLength () const
 
void setLensLength (double l)
 
const OdGePoint3dviewTarget () const
 
void setViewTarget (const OdGePoint3d &pt)
 
const OdTrVisViewClippedfrontClip () const
 
void setFrontClip (const OdTrVisViewClipped &cl)
 
const OdTrVisViewClippedbackClip () const
 
void setBackClip (const OdTrVisViewClipped &cl)
 
const OdGeMatrix3dUnXForm () const
 
const OdGeMatrix3dmetafileMatrix () const
 
void setMetafileMatrix (const OdGeMatrix3d &m)
 
const OdGeMatrix3dscreenMatrix () const
 
const OdGeMatrix3dviewingMatrix () const
 
const OdGeMatrix3dprojectionMatrix () const
 
const OdGeMatrix3dcorrectionMatrix () const
 
const OdGeMatrix3doutputMatrix () const
 
double projectionScreenDepth () const
 
double projectionFocalLengthReciprocal () const
 
double projectionFocalLength () const
 
bool projectionPerspective () const
 
long screenWidht () const
 
long screenHeight () const
 
bool viewportRect (OdGsDCRect &vpRect, bool bClipped=false) const
 
void applyMetafileXform (bool bSetModified=false) const
 
bool cameraCumulative () const
 
void setCameraCumulative (bool bSet)
 

Protected Types

enum  CameraFlags { kCameraModified = 1, kCameraCumulative = 2 }
 

Protected Member Functions

double computeFieldWidth (double aspectRatio) const
 
double computeFieldHeight (double aspectRatio) const
 
void projectedExtents (OdGePoint2d &extMin, OdGePoint2d &extMax, const OdGeExtents3d &extents) const
 
OdGeMatrix3d computeProjectionMatrix (const OdGsDCRectDouble &dcRect, const OdTrVisViewportDef *sets, const OdGeExtents3d &sceneExtents) const
 
void preComputeViewportDefMatrices () const
 
void setChildCamera (OdTrVisCamera *)
 
void removeChildCamera (OdTrVisCamera *)
 
void setOverlayCamera (OdTrVisCamera *)
 
void setSiblingCamera (OdTrVisCamera *)
 
OdTrVisCamerasibling ()
 
void setModified (bool modified=true) const
 
const OdGeExtents3dextents () const
 

Static Protected Member Functions

static double computeAspectRatio (const OdGsDCRectDouble &dcRect)
 
static double computeFocalLength (double lensLength, double fieldWidth, double fieldHeight)
 
static void computeSceneDepth (const OdGeMatrix3d &ecsToWcs, const OdGeExtents3d &sceneExtents, double &dNear, double &dFar)
 
static OdGeMatrix3d computeCorrectionMatrix (const OdGsDCRectDouble &dcRect, double screenWidth, double screenHeight)
 

Protected Attributes

OdTrVisViewParamsDef m_viewParams
 
OdGeMatrix3d m_UnXForm
 
OdUInt8 m_flags
 
OdTrVisCameram_pParentCamera
 
std::set< OdTrVisCamera * > m_childCameras
 
OdTrVisSurfaceDefm_pSurfaceDef
 
OdTrVisViewportDefm_pViewportDef
 
OdTrVisExtentsDefm_pExtentsDef
 
OdTrVisCameram_pOverlayOwnerCamera
 
std::set< OdTrVisCamera * > m_overlayCameras
 
OdTrVisCameram_pSiblingOwnerCamera
 
std::set< OdTrVisCamera * > m_siblingCameras
 

Detailed Description

Definition at line 36 of file TrVisCamera.h.

Member Enumeration Documentation

◆ CameraFlags

Enumerator
kCameraModified 
kCameraCumulative 

Definition at line 247 of file TrVisCamera.h.

◆ OrbitType

Enumerator
kOrbitPerp 
kOrbitHorizontal 
kOrbitVertical 
kOrbitEye 

Definition at line 70 of file TrVisCamera.h.

Constructor & Destructor Documentation

◆ OdTrVisCamera()

OdTrVisCamera::OdTrVisCamera ( )

◆ ~OdTrVisCamera()

OdTrVisCamera::~OdTrVisCamera ( )

Member Function Documentation

◆ applyMetafileXform()

void OdTrVisCamera::applyMetafileXform ( bool  bSetModified = false) const

◆ backClip()

const OdTrVisViewClipped& OdTrVisCamera::backClip ( ) const
inline

Definition at line 161 of file TrVisCamera.h.

◆ cameraCumulative()

bool OdTrVisCamera::cameraCumulative ( ) const
inline

Definition at line 243 of file TrVisCamera.h.

◆ computeAspectRatio()

static double OdTrVisCamera::computeAspectRatio ( const OdGsDCRectDouble dcRect)
staticprotected

◆ computeCorrectionMatrix()

static OdGeMatrix3d OdTrVisCamera::computeCorrectionMatrix ( const OdGsDCRectDouble dcRect,
double  screenWidth,
double  screenHeight 
)
staticprotected

◆ computeFieldHeight()

double OdTrVisCamera::computeFieldHeight ( double  aspectRatio) const
protected

◆ computeFieldWidth()

double OdTrVisCamera::computeFieldWidth ( double  aspectRatio) const
protected

◆ computeFocalLength()

static double OdTrVisCamera::computeFocalLength ( double  lensLength,
double  fieldWidth,
double  fieldHeight 
)
staticprotected

◆ computeProjectionMatrix()

OdGeMatrix3d OdTrVisCamera::computeProjectionMatrix ( const OdGsDCRectDouble dcRect,
const OdTrVisViewportDef sets,
const OdGeExtents3d sceneExtents 
) const
protected

◆ computeSceneDepth()

static void OdTrVisCamera::computeSceneDepth ( const OdGeMatrix3d ecsToWcs,
const OdGeExtents3d sceneExtents,
double &  dNear,
double &  dFar 
)
staticprotected

◆ copyViewParams()

virtual void OdTrVisCamera::copyViewParams ( const OdTrVisCamera )
virtual

◆ correctionMatrix()

const OdGeMatrix3d& OdTrVisCamera::correctionMatrix ( ) const
inline

Definition at line 202 of file TrVisCamera.h.

◆ extents()

const OdGeExtents3d& OdTrVisCamera::extents ( ) const
inlineprotected

Definition at line 296 of file TrVisCamera.h.

◆ fieldHeight()

double OdTrVisCamera::fieldHeight ( ) const
inline

Definition at line 133 of file TrVisCamera.h.

◆ fieldWidth()

double OdTrVisCamera::fieldWidth ( ) const
inline

Definition at line 126 of file TrVisCamera.h.

◆ frontClip()

const OdTrVisViewClipped& OdTrVisCamera::frontClip ( ) const
inline

Definition at line 154 of file TrVisCamera.h.

◆ isModified()

bool OdTrVisCamera::isModified ( ) const
inline

Definition at line 45 of file TrVisCamera.h.

◆ isPerspectiveProjection()

bool OdTrVisCamera::isPerspectiveProjection ( ) const
inline

Definition at line 119 of file TrVisCamera.h.

◆ lensLength()

double OdTrVisCamera::lensLength ( ) const
inline

Definition at line 140 of file TrVisCamera.h.

◆ markModified()

void OdTrVisCamera::markModified ( )
inline

Definition at line 47 of file TrVisCamera.h.

◆ metafileMatrix()

const OdGeMatrix3d& OdTrVisCamera::metafileMatrix ( ) const
inline

Definition at line 172 of file TrVisCamera.h.

◆ orbit()

virtual void OdTrVisCamera::orbit ( int  nX,
int  nY,
OrbitType  type = kOrbitPerp,
float  angle = 0.0f 
)
virtual

◆ outputMatrix()

const OdGeMatrix3d& OdTrVisCamera::outputMatrix ( ) const
inline

Definition at line 208 of file TrVisCamera.h.

◆ overlayOwnerCamera()

OdTrVisCamera* OdTrVisCamera::overlayOwnerCamera ( ) const
inline

Definition at line 53 of file TrVisCamera.h.

◆ pan()

virtual void OdTrVisCamera::pan ( int  nX,
int  nY 
)
virtual

◆ parentCamera()

OdTrVisCamera* OdTrVisCamera::parentCamera ( ) const
inline

Definition at line 50 of file TrVisCamera.h.

◆ preComputeViewportDefMatrices()

void OdTrVisCamera::preComputeViewportDefMatrices ( ) const
protected

◆ projectedExtents()

void OdTrVisCamera::projectedExtents ( OdGePoint2d extMin,
OdGePoint2d extMax,
const OdGeExtents3d extents 
) const
protected

◆ projectionFocalLength()

double OdTrVisCamera::projectionFocalLength ( ) const
inline

Definition at line 224 of file TrVisCamera.h.

◆ projectionFocalLengthReciprocal()

double OdTrVisCamera::projectionFocalLengthReciprocal ( ) const
inline

Definition at line 220 of file TrVisCamera.h.

◆ projectionMatrix()

const OdGeMatrix3d& OdTrVisCamera::projectionMatrix ( ) const
inline

Definition at line 196 of file TrVisCamera.h.

◆ projectionPerspective()

bool OdTrVisCamera::projectionPerspective ( ) const
inline

Definition at line 228 of file TrVisCamera.h.

◆ projectionScreenDepth()

double OdTrVisCamera::projectionScreenDepth ( ) const
inline

Definition at line 216 of file TrVisCamera.h.

◆ removeChildCamera()

void OdTrVisCamera::removeChildCamera ( OdTrVisCamera )
protected

◆ removeOverlayCamera()

void OdTrVisCamera::removeOverlayCamera ( OdTrVisCamera )

◆ removeSiblingCamera()

void OdTrVisCamera::removeSiblingCamera ( OdTrVisCamera )

◆ rotate()

virtual void OdTrVisCamera::rotate ( double  xAngle,
double  yAngle,
double  zAngle,
bool  bLocalCS = true 
)
virtual

◆ screenHeight()

long OdTrVisCamera::screenHeight ( ) const

◆ screenMatrix()

const OdGeMatrix3d& OdTrVisCamera::screenMatrix ( ) const
inline

Definition at line 184 of file TrVisCamera.h.

◆ screenWidht()

long OdTrVisCamera::screenWidht ( ) const

◆ setBackClip()

void OdTrVisCamera::setBackClip ( const OdTrVisViewClipped cl)
inline

Definition at line 162 of file TrVisCamera.h.

◆ setCameraCumulative()

void OdTrVisCamera::setCameraCumulative ( bool  bSet)
inline

Definition at line 244 of file TrVisCamera.h.

◆ setChildCamera()

void OdTrVisCamera::setChildCamera ( OdTrVisCamera )
protected

◆ setContext()

void OdTrVisCamera::setContext ( OdTrVisSurfaceDef pSurface,
OdTrVisViewportDef pViewport,
OdTrVisExtentsDef pExtents 
)
inline

Definition at line 60 of file TrVisCamera.h.

◆ setFieldHeight()

void OdTrVisCamera::setFieldHeight ( double  h)
inline

Definition at line 134 of file TrVisCamera.h.

◆ setFieldWidth()

void OdTrVisCamera::setFieldWidth ( double  w)
inline

Definition at line 127 of file TrVisCamera.h.

◆ setFrontClip()

void OdTrVisCamera::setFrontClip ( const OdTrVisViewClipped cl)
inline

Definition at line 155 of file TrVisCamera.h.

◆ setLensLength()

void OdTrVisCamera::setLensLength ( double  l)
inline

Definition at line 141 of file TrVisCamera.h.

◆ setMetafileMatrix()

void OdTrVisCamera::setMetafileMatrix ( const OdGeMatrix3d m)
inline

Definition at line 176 of file TrVisCamera.h.

◆ setModified()

void OdTrVisCamera::setModified ( bool  modified = true) const
protected

◆ setOverlayCamera()

void OdTrVisCamera::setOverlayCamera ( OdTrVisCamera )
protected

◆ setOverlayOwnerCamera()

void OdTrVisCamera::setOverlayOwnerCamera ( OdTrVisCamera )

◆ setParentCamera()

void OdTrVisCamera::setParentCamera ( OdTrVisCamera )

◆ setPerspectiveProjection()

void OdTrVisCamera::setPerspectiveProjection ( bool  p)
inline

Definition at line 120 of file TrVisCamera.h.

◆ setSiblingCamera()

void OdTrVisCamera::setSiblingCamera ( OdTrVisCamera )
protected

◆ setSiblingOwnerCamera()

void OdTrVisCamera::setSiblingOwnerCamera ( OdTrVisCamera )

◆ setViewBasisX()

void OdTrVisCamera::setViewBasisX ( const OdGeVector3d xBasis)
inline

Definition at line 101 of file TrVisCamera.h.

◆ setViewBasisY()

void OdTrVisCamera::setViewBasisY ( const OdGeVector3d yBasis)
inline

Definition at line 107 of file TrVisCamera.h.

◆ setViewBasisZ()

void OdTrVisCamera::setViewBasisZ ( const OdGeVector3d zBasis)
inline

Definition at line 113 of file TrVisCamera.h.

◆ setViewParams()

void OdTrVisCamera::setViewParams ( const OdTrVisViewParamsDef viewParams,
bool  bSetModified = false 
)

◆ setViewPosition()

void OdTrVisCamera::setViewPosition ( const OdGePoint3d pt)
inline

Definition at line 94 of file TrVisCamera.h.

◆ setViewTarget()

void OdTrVisCamera::setViewTarget ( const OdGePoint3d pt)
inline

Definition at line 148 of file TrVisCamera.h.

◆ sibling()

OdTrVisCamera* OdTrVisCamera::sibling ( )
inlineprotected

Definition at line 288 of file TrVisCamera.h.

◆ siblingOwnerCamera()

OdTrVisCamera* OdTrVisCamera::siblingOwnerCamera ( ) const
inline

Definition at line 57 of file TrVisCamera.h.

◆ translate()

virtual void OdTrVisCamera::translate ( const OdGeVector3d offset)
virtual

◆ UnXForm()

const OdGeMatrix3d& OdTrVisCamera::UnXForm ( ) const
inline

Definition at line 170 of file TrVisCamera.h.

◆ update()

virtual void OdTrVisCamera::update ( ) const
virtual

◆ viewBasisX()

const OdGeVector3d& OdTrVisCamera::viewBasisX ( ) const
inline

Definition at line 100 of file TrVisCamera.h.

◆ viewBasisY()

const OdGeVector3d& OdTrVisCamera::viewBasisY ( ) const
inline

Definition at line 106 of file TrVisCamera.h.

◆ viewBasisZ()

const OdGeVector3d& OdTrVisCamera::viewBasisZ ( ) const
inline

Definition at line 112 of file TrVisCamera.h.

◆ viewingMatrix()

const OdGeMatrix3d& OdTrVisCamera::viewingMatrix ( ) const
inline

Definition at line 190 of file TrVisCamera.h.

◆ viewParams()

const OdTrVisViewParamsDef& OdTrVisCamera::viewParams ( bool  bUpdated = true) const
inline

Definition at line 42 of file TrVisCamera.h.

◆ viewportRect()

bool OdTrVisCamera::viewportRect ( OdGsDCRect vpRect,
bool  bClipped = false 
) const

◆ viewPosition()

const OdGePoint3d& OdTrVisCamera::viewPosition ( ) const
inline

Definition at line 93 of file TrVisCamera.h.

◆ viewTarget()

const OdGePoint3d& OdTrVisCamera::viewTarget ( ) const
inline

Definition at line 147 of file TrVisCamera.h.

◆ zoom() [1/2]

virtual void OdTrVisCamera::zoom ( float  fDelta)
virtual

◆ zoom() [2/2]

virtual void OdTrVisCamera::zoom ( int  nX,
int  nY,
float  fDelta 
)
virtual

◆ zoomExtents()

virtual void OdTrVisCamera::zoomExtents ( float  coef = 1.03f)
virtual

Member Data Documentation

◆ m_childCameras

std::set< OdTrVisCamera* > OdTrVisCamera::m_childCameras
protected

Definition at line 257 of file TrVisCamera.h.

◆ m_flags

OdUInt8 OdTrVisCamera::m_flags
mutableprotected

Definition at line 254 of file TrVisCamera.h.

◆ m_overlayCameras

std::set< OdTrVisCamera* > OdTrVisCamera::m_overlayCameras
protected

Definition at line 264 of file TrVisCamera.h.

◆ m_pExtentsDef

OdTrVisExtentsDef* OdTrVisCamera::m_pExtentsDef
protected

Definition at line 261 of file TrVisCamera.h.

◆ m_pOverlayOwnerCamera

OdTrVisCamera* OdTrVisCamera::m_pOverlayOwnerCamera
protected

Definition at line 263 of file TrVisCamera.h.

◆ m_pParentCamera

OdTrVisCamera* OdTrVisCamera::m_pParentCamera
protected

Definition at line 256 of file TrVisCamera.h.

◆ m_pSiblingOwnerCamera

OdTrVisCamera* OdTrVisCamera::m_pSiblingOwnerCamera
protected

Definition at line 266 of file TrVisCamera.h.

◆ m_pSurfaceDef

OdTrVisSurfaceDef* OdTrVisCamera::m_pSurfaceDef
protected

Definition at line 259 of file TrVisCamera.h.

◆ m_pViewportDef

OdTrVisViewportDef* OdTrVisCamera::m_pViewportDef
protected

Definition at line 260 of file TrVisCamera.h.

◆ m_siblingCameras

std::set< OdTrVisCamera* > OdTrVisCamera::m_siblingCameras
protected

Definition at line 267 of file TrVisCamera.h.

◆ m_UnXForm

OdGeMatrix3d OdTrVisCamera::m_UnXForm
mutableprotected

Definition at line 253 of file TrVisCamera.h.

◆ m_viewParams

OdTrVisViewParamsDef OdTrVisCamera::m_viewParams
mutableprotected

Definition at line 252 of file TrVisCamera.h.


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