CFx SDK Documentation  2020SP3
Public Member Functions | List of all members
OdPdfPublish::OdCamera Class Reference

#include <PdfPublishCamera.h>

Inheritance diagram for OdPdfPublish::OdCamera:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdCamera)
 
 ODRX_HEAP_OPERATORS ()
 
 OdCamera ()
 
virtual ~OdCamera ()
 
void dolly (double x_dir, double up, double forward)
 
void orbit (double theta, double phi)
 
void pan (double theta, double phi)
 
void roll (double theta)
 
void zoom (double zoom)
 
void setField (double width, double height)
 
void setNearLimit (double const limit)
 
void setPosition (const OdGePoint3d &position)
 
void setProjection (Camera::Projection type, double oblique_y_skew=0., double oblique_x_skew=0.)
 
void setTarget (const OdGePoint3d &target)
 
void setUpVector (const OdGeVector3d &vector)
 
void getField (double &width, double &height) const
 
void getNearLimit (double &limit) const
 
void getPosition (OdGePoint3d &position) const
 
void getProjection (Camera::Projection &type, double &oblique_y_skew, double &oblique_x_skew) const
 
void getTarget (OdGePoint3d &target) const
 
void getUpVector (OdGeVector3d &vector) const
 
- Public Member Functions inherited from OdPdfPublish::OdObject
 ODRX_DECLARE_MEMBERS (OdObject)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdObject ()
 
virtual bool isEmpty () const
 
virtual bool isValid () const
 
virtual void clear ()
 
- 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 ()
 
- Protected Member Functions inherited from OdPdfPublish::OdObject
 OdObject (OdPublishObjectImpl *pImpl)
 

Detailed Description

This class implements a camera entity for .pdf documents created with Teigha Publish.

Definition at line 49 of file PdfPublishCamera.h.

Constructor & Destructor Documentation

◆ OdCamera()

OdPdfPublish::OdCamera::OdCamera ( )

Creates a camera object.

◆ ~OdCamera()

virtual OdPdfPublish::OdCamera::~OdCamera ( )
virtual

Destroys a camera object.

Member Function Documentation

◆ dolly()

void OdPdfPublish::OdCamera::dolly ( double  x_dir,
double  up,
double  forward 
)

Changes the camera position and its target by moving it in a specified direction. Moving direction is defined through move step sizes aling x, y and z coordinate acises. Move amounts are represented as world-space measurement units.

Parameters
x_dir[in] A movement step in the X-direction. The value is a result of crossing up and forward verctors.
up[in] A movement step in up (if positive) or down (if negative) direction.
forward[in] A movement step to (if positive) or from (if negative) to the target.

◆ getField()

void OdPdfPublish::OdCamera::getField ( double &  width,
double &  height 
) const

Returns current camera field information. The method fills passed double values with width and height of the camera field and returns them to a calling subroutine.

Parameters
width[out] A placeholder for the width value of the camera field.
height[out] A placeholder for the height value of the camera field.
Remarks
Camera field width and height are measured in in object units.

◆ getNearLimit()

void OdPdfPublish::OdCamera::getNearLimit ( double &  limit) const

Returns current camera near limit. The method fills a passed double value with current near limit and returns it to a calling subroutine.

Parameters
limit[out] A placeholder for the near limit value.
Remarks
The near limit determines how close to the target the camera is. Its value should be between 0 and 1. The values 0 and 1 mean that near limit is as close to the camera position (if 0) or to the camera target (if 1) as it possible according the precision of z-buffer.

◆ getPosition()

void OdPdfPublish::OdCamera::getPosition ( OdGePoint3d position) const

Returns current camera position. The method fills a passed three-dimensional point object and returns it to a calling subroutine.

Parameters
position[out] A placeholder for the camera position point.
See also
<exref target="https://docsdev.opendesign.com/td/OdGePoint3d.html">OdGePoint3d class</exref>.

◆ getProjection()

void OdPdfPublish::OdCamera::getProjection ( Camera::Projection type,
double &  oblique_y_skew,
double &  oblique_x_skew 
) const

Returns current camera projection. Camera projection is defined with projection type and oblique skews in horizontal and vertical directions. The method fills passed values with current type of projection and obligue skew values and returns them to a calling subroutine.

Parameters
type[out] A placeholder for the camera projection type.
oblique_y_skew[out] A placeholder for the vertical oblique skew value.
oblique_x_skew[out] A placeholder for the horizontal skew.
See also
<link OdPdfPublish::Camera::Projection, Camera::Projection enumeration>.

◆ getTarget()

void OdPdfPublish::OdCamera::getTarget ( OdGePoint3d target) const

Returns current camera target. The method fills a passed three-dimensional point object and returns it to a calling subroutine.

Parameters
target[out] A placeholder for the camera target point.
See also
<exref target="https://docsdev.opendesign.com/td/OdGePoint3d.html">OdGePoint3d class</exref>.

◆ getUpVector()

void OdPdfPublish::OdCamera::getUpVector ( OdGeVector3d vector) const

Returns current camera up-vector. The method fills a passed three-dimensional vector object and returns it to a calling subroutine.

Parameters
vector[out] A placeholder for the camera up-vector.
See also
<exref target="https://docsdev.opendesign.com/td/OdGeVector3d.html">OdGeVector3d class</exref>.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdCamera::ODRX_DECLARE_MEMBERS ( OdCamera  )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdCamera::ODRX_HEAP_OPERATORS ( )

◆ orbit()

void OdPdfPublish::OdCamera::orbit ( double  theta,
double  phi 
)

Orbits the camera about its target with a specified angle to the right and to the up.

Parameters
theta[in] An angle to orbit camera to the right (in degrees).
phi[in] An angle to orbit the camera to the up (in degrees).
Remarks
The camera moves on a sphere with the center at the camera target and radius that is equal to the distance from the camera to target. In other words, the distance between camera and its target remain unchanged. The camera is firstly rotated about its target on theta angle, then rotated on phi angle.

◆ pan()

void OdPdfPublish::OdCamera::pan ( double  theta,
double  phi 
)

Changes the camera position and its target by moving it in the XY-plane with a specified degrees. The camera position and distance between camera and its target remain unchanged.

Parameters
theta[in] The number of degrees to move the the camera target to the right.
phi[in] The number of degrees to move the the camera target up.

◆ roll()

void OdPdfPublish::OdCamera::roll ( double  theta)

Rotates the camera around its target with a specified angle (in degrees). The camera position, target and fild remain unchanged. If the rotation angle is positive, camera rotation is clock-wise, otherwise camera rotation is counterclock-wise.

Parameters
theta[in] A rotation angle (in degrees).

◆ setField()

void OdPdfPublish::OdCamera::setField ( double  width,
double  height 
)

Sets the camera field.

Parameters
width[in] A width value of the camera field (in object measuring units).
height[in] A height value of the camera field (in object measuring units).

◆ setNearLimit()

void OdPdfPublish::OdCamera::setNearLimit ( double const  limit)

Sets the camera near limit.

Parameters
limit[in] A new near limit value. Should be between 0.0 and 1.0.
Remarks
The near limit determines how close to the target the camera is. Its value should be between 0 and 1. The values 0 and 1 mean that near limit is as close to the camera position (if 0) or to the camera target (if 1) as it possible according the precision of z-buffer.

◆ setPosition()

void OdPdfPublish::OdCamera::setPosition ( const OdGePoint3d position)

Sets the camera position.

Parameters
position[in] A new camera position represented with a three-dimensional point.
See also
<exref target="https://docsdev.opendesign.com/td/OdGePoint3d.html">OdGePoint3d class</exref>.

◆ setProjection()

void OdPdfPublish::OdCamera::setProjection ( Camera::Projection  type,
double  oblique_y_skew = 0.,
double  oblique_x_skew = 0. 
)

Sets the camera projection. Camera projection is defined with projection type and oblique skews in horizontal and vertical directions.

Parameters
type[in] A new camera projection type.
oblique_y_skew[in] A new vertical oblique skew value.
oblique_x_skew[in] A new horizontal skew.
See also
<link OdPdfPublish::Camera::Projection, Camera::Projection enumeration>.

◆ setTarget()

void OdPdfPublish::OdCamera::setTarget ( const OdGePoint3d target)

Sets the camera target.

Parameters
target[in] A new camera target represented with a three-dimensional point.
See also
<exref target="https://docsdev.opendesign.com/td/OdGePoint3d.html">OdGePoint3d class</exref>.

◆ setUpVector()

void OdPdfPublish::OdCamera::setUpVector ( const OdGeVector3d vector)

Sets the camera up-vector.

Parameters
vector[in] A new camera up-vector.
See also
<exref target="https://docsdev.opendesign.com/td/OdGeVector3d.html">OdGeVector3d class</exref>.

◆ zoom()

void OdPdfPublish::OdCamera::zoom ( double  zoom)

Zooms the camera view field with a specified scale factor.

Parameters
zoom[in] A zoom scale value.
Remarks
Zoom operation means that the sizes of the related view field will be recalculated using the proportion specified in zoom parameter. If zoom parameter value is greater than 1.0, objects on screen becomes larger. If zoom parameter is less than 1.0 and greater than 0.0, objects on screen view becomes smaller.

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