This is the Camera class.
This class lets you define elements to create frustum.
Please use the Dtk_CameraPtr class to handle it...
More...
Public Types | |
enum | ProjectionTypeEnum { ProjectionTypeUnknown = 0, ProjectionTypeParallel, ProjectionTypePerspective } |
enum | ZoomFitModeEnum { NoZoomFit = 0, ZoomFitAllScene } |
Public Member Functions | |
virtual Dtk_ErrorStatus | _Store (void *) |
Dtk_Double64 | Angle () const |
Dtk_Int32 | DtkDynamicType (const Dtk_Int32 &inId) |
Retrieves the dynamic entity type. More... | |
int | DtkDynamicType (const int &inId) |
virtual void | dump (FILE *file=stdout) |
Dtk_Double64 | Focus () const |
Dtk_InfoPtr | get_info () const |
type_detk | get_type_detk () const |
void | GetClippingDistance (Dtk_Double64 &outFrontDistance, Dtk_Double64 &outBackDistance) const |
get the Front Clipping Distance et Back Clipping Distance More... | |
Dtk_Double64 | GetFocusDistance () const |
Processes the Focus Distance ie the Distance between the Origin and the Target points - read only -. More... | |
const Dtk_ID & | GetID () const |
Get Internal UniqueID. More... | |
Dtk_Double64 | GetSemiHeight () const |
Retrieves the Camera Base Semi Height - read only -. More... | |
Dtk_Double64 | GetSemiWidth () const |
Retrieves the Camera Base Semi Width - read only -. More... | |
virtual Dtk_Size_t | GetSize () const |
const Dtk_Camera::ZoomFitModeEnum & | GetZoomFitMode () const |
Retrieves the zoom fit mode - read only -. More... | |
Dtk_InfoPtr & | info () |
Dtk_bool | IsValid () const |
Checks if the Dtk_Camera is valid. For this: More... | |
const Dtk_pnt & | OriginPoint () const |
Retrieves the origin point - read only -. More... | |
virtual void | PrepareTransfo () |
Dtk_Double64 | ProcessXSemiAngle () const |
Processes the X - along width - Semi Angle - read only -. More... | |
Dtk_Double64 | ProcessXZoomFactor () const |
Processes the X - along width - zoom factor - read only -. More... | |
Dtk_Double64 | ProcessYSemiAngle () const |
Processes the Y - along height - Semi Angle - read only -. More... | |
Dtk_Double64 | ProcessYZoomFactor () const |
Processes the Y - along height - zoom factor - read only -. More... | |
const Dtk_Camera::ProjectionTypeEnum & | ProjectionType () const |
Retrieves the projection type - read only -. More... | |
void | SetClippingDistance (const Dtk_Double64 &inFrontDistance, const Dtk_Double64 &inBackDistance) const |
set the Front Clipping Distance et Back Clipping Distance More... | |
const Dtk_pnt & | TargetPoint () const |
Retrieves the target point - read only -. More... | |
Dtk_dir | TargetVector () const |
Retrieves the target vector - read only -. More... | |
Dtk_ErrorStatus | Transform (const Dtk_transfo &inTransfo) |
Applies a transformation matrix to the entity. //! More... | |
const Dtk_dir & | UpVector () const |
Retrieves the up vector - read only -. More... | |
Dtk_Double64 | ZoomFactor () const |
Processes the X - width - zoom factor - read only -. More... | |
Static Public Member Functions | |
static Dtk_CameraPtr | Create () |
Base constructor. More... | |
static Dtk_CameraPtr | Create (const Dtk_pnt &inOriginPoint, const Dtk_pnt &inTarget, const Dtk_dir &inUpVector, const double &inAngle, const double &inFocus, const double &inZoomFactor=1.0, const ProjectionTypeEnum inProjectionType=ProjectionTypeParallel, const ZoomFitModeEnum inZoomFitMode=NoZoomFit) |
Full featured constructor. More... | |
static Dtk_CameraPtr | Create (const Dtk_pnt &inOriginPoint, const Dtk_pnt &inTarget, const Dtk_Double64 inSemiWidth, const Dtk_Double64 inSemiHeight, const Dtk_dir &inUpVector, const ProjectionTypeEnum inProjectionType=ProjectionTypeParallel, const ZoomFitModeEnum inZoomFitMode=NoZoomFit) |
Full featured constructor. More... | |
static Dtk_Camera * | DtkDynamicCast (Dtk_Object *s) |
Performs a dynamic cast - doesn't need RTTI -. More... | |
Protected Types | |
enum | { _typeID = DTK_TYPE_OBJECT } |
enum | { _typeID = DTK_TYPE_ENTITY } |
enum | { _typeID = DTK_TYPE_CAMERA } |
Protected Member Functions | |
void | _copy (const Dtk_Entity &s) |
void | _copy (const Dtk_Object &s) |
void | _init () |
void | _reset () |
virtual Dtk_Object * | Clone () |
Dtk_Camera () | |
Dtk_Camera (const Dtk_Camera &s) | |
~Dtk_Camera () | |
Destructor. More... | |
Protected Attributes | |
Dtk_Handle * | _Private |
unsigned long | count_ |
Friends | |
class | Dtk_SmartPtr< Dtk_Camera > |
This is the Camera class.
This class lets you define elements to create frustum.
Please use the Dtk_CameraPtr class to handle it...
The camera can be parallel:
...or perspective:
|
protected |
|
protected |
|
protected |
Destructor.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
virtualinherited |
Reimplemented in Dtk_Shell, Dtk_Body, Dtk_Lump, Dtk_Volume, Dtk_Face, Dtk_Loop, Dtk_Coedge, Dtk_Edge, Dtk_Vertex, Dtk_TransformedSurface, Dtk_FilletSurface, Dtk_OffsetSurface, Dtk_SphericalSurface, Dtk_ToroidalSurface, Dtk_ConicalSurface, Dtk_CylindricalSurface, Dtk_RuledSurface, Dtk_LinearExtrusionSurface, Dtk_StandardRevolutionSurface, Dtk_RevolutionSurface, Dtk_PlaneSurface, Dtk_NurbsSurface, Dtk_Surface, Dtk_Hyperbola, Dtk_Parabola, Dtk_Ellipse, Dtk_Conic, Dtk_Line, Dtk_Polyline, Dtk_NurbsCurve, Dtk_Curve, and Dtk_Point.
Dtk_Double64 Dtk_Camera::Angle | ( | ) | const |
|
protectedvirtual |
Implements Dtk_Entity.
|
static |
Base constructor.
|
static |
Full featured constructor.
inOriginPoint | The Dtk_Camera location point |
inTarget | The Target vector |
inUpVector | The Up vector |
inAngle | The angle - in Degrees - - will be used to process Semi-Width/Semi-Height - |
inFocus | The focus - This value will be ignored - |
inZoomFactor | The zoom factor - 1.0 by default - - This value will be ignored - |
inProjectionType | The projection type - ProjectionTypeParallel by default - |
inZoomFitMode | The Zoom Fit Mode - NoZoomFit by default - |
|
static |
Full featured constructor.
inOriginPoint | The Dtk_Camera location point |
inTarget | The Target vector |
inSemiWidth | Semi-Width of the Pyramid/Block Camera Frustum - in mm - |
inSemiHeight | Semi-Height of the Pyramid/Block Camera Frustum - in mm - |
inUpVector | The Up vector |
inProjectionType | The projection type - ProjectionTypeParallel by default - |
inZoomFitMode | The Zoom Fit Mode - NoZoomFit by default - |
|
static |
Performs a dynamic cast - doesn't need RTTI -.
|
virtualinherited |
Implements Dtk_Object.
Reimplemented in Dtk_Shell, Dtk_Body, Dtk_Lump, Dtk_Volume, Dtk_Face, Dtk_Loop, Dtk_Coedge, Dtk_Edge, Dtk_Vertex, Dtk_TopologicalEntity, Dtk_MeshSurface, Dtk_TransformedSurface, Dtk_FilletSurface, Dtk_OffsetSurface, Dtk_SphericalSurface, Dtk_ToroidalSurface, Dtk_ConicalSurface, Dtk_CylindricalSurface, Dtk_RuledSurface, Dtk_LinearExtrusionSurface, Dtk_StandardRevolutionSurface, Dtk_RevolutionSurface, Dtk_PlaneSurface, Dtk_NurbsSurface, Dtk_Surface, Dtk_Hyperbola, Dtk_Parabola, Dtk_Ellipse, Dtk_Conic, Dtk_Line, Dtk_Polyline, Dtk_NurbsCurve, Dtk_Curve, Dtk_Point, Dtk_Constraint, Dtk_ConstraintReference, and Dtk_AxisSystem.
|
virtualinherited |
Dtk_Double64 Dtk_Camera::Focus | ( | ) | const |
|
inherited |
|
virtual |
void Dtk_Camera::GetClippingDistance | ( | Dtk_Double64 & | outFrontDistance, |
Dtk_Double64 & | outBackDistance | ||
) | const |
get the Front Clipping Distance et Back Clipping Distance
Dtk_Double64 Dtk_Camera::GetFocusDistance | ( | ) | const |
Processes the Focus Distance ie the Distance between the Origin and the Target points - read only -.
|
inherited |
Get Internal UniqueID.
Dtk_Double64 Dtk_Camera::GetSemiHeight | ( | ) | const |
Retrieves the Camera Base Semi Height - read only -.
Dtk_Double64 Dtk_Camera::GetSemiWidth | ( | ) | const |
Retrieves the Camera Base Semi Width - read only -.
|
virtualinherited |
Reimplemented from Dtk_Object.
Reimplemented in Dtk_Shell, Dtk_Body, Dtk_Lump, Dtk_Volume, Dtk_Face, Dtk_Loop, Dtk_Coedge, Dtk_Edge, Dtk_Vertex, Dtk_mesh, Dtk_TransformedSurface, Dtk_FilletSurface, Dtk_OffsetSurface, Dtk_SphericalSurface, Dtk_ToroidalSurface, Dtk_ConicalSurface, Dtk_CylindricalSurface, Dtk_RuledSurface, Dtk_LinearExtrusionSurface, Dtk_StandardRevolutionSurface, Dtk_RevolutionSurface, Dtk_PlaneSurface, Dtk_NurbsSurface, Dtk_Surface, Dtk_Hyperbola, Dtk_Parabola, Dtk_Ellipse, Dtk_Conic, Dtk_Line, Dtk_Polyline, Dtk_NurbsCurve, Dtk_Curve, and Dtk_Point.
const Dtk_Camera::ZoomFitModeEnum& Dtk_Camera::GetZoomFitMode | ( | ) | const |
Retrieves the zoom fit mode - read only -.
|
inherited |
Dtk_bool Dtk_Camera::IsValid | ( | ) | const |
Checks if the Dtk_Camera is valid. For this:
const Dtk_pnt& Dtk_Camera::OriginPoint | ( | ) | const |
Retrieves the origin point - read only -.
|
virtualinherited |
Reimplemented in Dtk_OffsetSurface.
Dtk_Double64 Dtk_Camera::ProcessXSemiAngle | ( | ) | const |
Processes the X - along width - Semi Angle - read only -.
Dtk_Double64 Dtk_Camera::ProcessXZoomFactor | ( | ) | const |
Processes the X - along width - zoom factor - read only -.
Dtk_Double64 Dtk_Camera::ProcessYSemiAngle | ( | ) | const |
Processes the Y - along height - Semi Angle - read only -.
Dtk_Double64 Dtk_Camera::ProcessYZoomFactor | ( | ) | const |
Processes the Y - along height - zoom factor - read only -.
const Dtk_Camera::ProjectionTypeEnum& Dtk_Camera::ProjectionType | ( | ) | const |
Retrieves the projection type - read only -.
void Dtk_Camera::SetClippingDistance | ( | const Dtk_Double64 & | inFrontDistance, |
const Dtk_Double64 & | inBackDistance | ||
) | const |
set the Front Clipping Distance et Back Clipping Distance
const Dtk_pnt& Dtk_Camera::TargetPoint | ( | ) | const |
Retrieves the target point - read only -.
Dtk_dir Dtk_Camera::TargetVector | ( | ) | const |
Retrieves the target vector - read only -.
|
virtual |
Applies a transformation matrix to the entity. //!
inTransfo | The transformation matrix to apply. |
Implements Dtk_Entity.
const Dtk_dir& Dtk_Camera::UpVector | ( | ) | const |
Retrieves the up vector - read only -.
Dtk_Double64 Dtk_Camera::ZoomFactor | ( | ) | const |
Processes the X - width - zoom factor - read only -.
|
friend |
|
protected |
|
protectedinherited |