CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Protected 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 ()
 
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
 

Protected Member Functions

 OdCamera ()
 
- Protected Member Functions inherited from OdPdfPublish::OdObject
 OdObject (OdPublishObjectImpl *pImpl)
 

Additional Inherited Members

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

Detailed Description

This class implements handling of a camera position for a view in .pdf documents created with Publish SDK.

Definition at line 50 of file PdfPublishCamera.h.

Constructor & Destructor Documentation

◆ OdCamera()

OdPdfPublish::OdCamera::OdCamera ( )
protected

◆ ~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. The move direction is defined by moving step sizes along the x-, y-, and z-coordinate axes. 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 vectors.
up[in] A movement step in the up (if positive) or down (if negative) direction.
forward[in] A movement step to (if positive) or from (if negative) the target.

◆ getField()

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

Returns the current camera field information. The method fills the 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 object units.

◆ getNearLimit()

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

Returns the camera's current near limit. The method fills a passed double value with the 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 the near limit is as close to the camera position (if 0) or to the camera target (if 1) as possible according to the precision of the z-buffer.

◆ getPosition()

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

Returns the camera's current 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://docs.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 the camera's current projection. The camera projection is defined by the projection type and oblique skews in horizontal and vertical directions. The method fills the passed values with the 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 the 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://docs.opendesign.com/td/OdGePoint3d.html">OdGePoint3d class</exref>.

◆ getUpVector()

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

Returns the 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://docs.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 up.

Parameters
theta[in] An angle to orbit the camera to the right (in degrees).
phi[in] An angle to orbit the camera up (in degrees).
Remarks
The camera moves on a sphere with the center at the camera target and a radius that is equal to the distance from the camera to the target. In other words, the distance between the camera and its target remain unchanged. The camera is first rotated about its target on the theta angle, then rotated on the 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 by the specified degrees. The camera position and distance between the camera and its target remain unchanged.

Parameters
theta[in] The number of degrees to move the camera target to the right.
phi[in] The number of degrees to move 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 field remain unchanged. If the rotation angle is positive, the camera rotation is clockwise, otherwise the camera rotation is counter-clockwise.

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's 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 the near limit is as close to the camera position (if 0) or to the camera target (if 1) as possible according to the precision of the z-buffer.

◆ setPosition()

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

Sets the camera position.

Parameters
position[in] A new camera position represented as a three-dimensional point.
See also
<exref target="https://docs.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. The camera projection is defined with a 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, which is the location the camera is pointed at.

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

◆ setUpVector()

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

Sets the camera up-vector that defines the vertical up direction of the camera.

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

◆ zoom()

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

Zooms the camera view field by a specified scale factor.

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

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