DynaPDF Manual - Page 234

Previous Page 233   Index   Next Page 235

Function Reference
Page 234 of 839
Create3DProjection
Syntax:
LBOOL pdfCreate3DProjection(
const PPDF* IPDF,
// Instance pointer
const void* IView,
// 3D View handle (required)
T3DProjType ProjType,
// Projection type
T3DScaleType ScaleType, // Scaling type
double Diameter,
// Scale factor, see below
double FOV)
// Field of View, see below
typedef enum
{
pt3DOrthographic, // Orthographic projection
pt3DPerspective
// Perspective projection
}T3DProjType;
typedef enum
{
st3DValue,
// Default for orthographic projection, see description
st3DWidth,
// Default for perspective projection
st3DHeight,
st3DMin,
st3DMax
}T3DScaleType;
The function creates a projection dictionary for a 3D annotation. A projection dictionary defines the
mapping of 3D camera coordinates onto the target coordinate system. A projection dictionary can
only be added to a 3D view of a 3D annotation. The 3D view must be created beforehand with
Create3DView().
The parameter ProjType defines the kind of projection that should be used, e.g. orthographic or
perspective projection. Depending on the projection type the parameters ScaleType, Diameter, and
FOV have different meanings:
Perspective projection
The parameter ScaleType specifies the scaling used when projecting the 3D artwork onto the
annotation’s target coordinate system. If ScaleType is set to st3DValue the parameter Diameter
defines the diameter of the circle formed by the intersection of the near plane and the cone specified
by FOV. Diameter must be a positive number in this case. If ScaleType is set to another value than
st3DValue the parameter Diameter is ignored.
The parameter FOV must be a number between 0.0 and 180.0, inclusive, specifying the field of view
of the virtual camera in degrees. It defines a cone in 3D space centered on the z axis and a circle
where the cone intersects the near clipping plane. The circle, along with the value of Diameter and
ScaleType, specify the scaling of the projected artwork when rendered in the 2D plane of the
annotation. See also PDF Reference 1.7.
 

Previous topic: Create3DBackground, Create3DGotoViewAction

Next topic: Orthographic projection, Create3DView