7 #ifndef __draw_CameraEditable_h__ 8 #define __draw_CameraEditable_h__ 33 setIdentity(m_cameraMatrix);
35 setName(
"CameraEditable");
42 { m_cameraMatrix=matrix; }
45 {
return m_cameraMatrix; }
52 virtual void setPlanes(Real nearplane,Real farplane)
53 { m_nearplane=nearplane;
54 m_farplane=farplane; }
55 virtual void getPlanes(Real& nearplane,Real& farplane)
56 { nearplane=m_nearplane;
57 farplane=m_farplane; }
61 m_center = a_center; }
64 a_center = m_center; }
67 { m_rasterSpace = a_rasterSpace; }
69 {
return m_rasterSpace; }
88 inline void CameraEditable::copy(
const sp<CameraI> a_spCameraI)
90 setCameraMatrix(a_spCameraI->cameraMatrix());
92 setFov(a_spCameraI->fov());
96 a_spCameraI->getPlanes(nearplane,farplane);
97 setPlanes(nearplane,farplane);
101 a_spCameraI->getOrtho(zoom,center);
102 setOrtho(zoom,center);
104 setRasterSpace(a_spCameraI->rasterSpace());
109 const Real fovy=a_spCameraEditable->fov()[1];
113 a_spCameraEditable->getPlanes(nearplane,farplane);
117 a_spCameraEditable->getOrtho(zoom,center);
122 s.
sPrintf(
"fovy %g near %g far %g" 123 " zoom %g center %s camera:\n%s",
124 fovy,nearplane,farplane,
125 zoom,c_print(center),c_print(xform));
virtual void setFov(Vector2 a_fov)
Set perspective Field of View (degrees)
Definition: CameraEditable.h:49
virtual void setOrtho(Real a_zoom, const Vector2 &a_center)
Set clipping planes.
Definition: CameraEditable.h:59
kernel
Definition: namespace.dox:3
virtual const SpatialTransform & cameraMatrix(void) const
Get camera transform.
Definition: CameraEditable.h:44
virtual void getPlanes(Real &nearplane, Real &farplane)
Get distance clipping planes.
Definition: CameraEditable.h:55
virtual void setPlanes(Real nearplane, Real farplane)
Set distance clipping planes.
Definition: CameraEditable.h:52
virtual void getOrtho(Real &a_zoom, Vector2 &a_center) const
Get clipping planes.
Definition: CameraEditable.h:62
virtual void setCameraMatrix(const SpatialTransform &matrix)
Set camera transform.
Definition: CameraEditable.h:41
virtual void setRasterSpace(BWORD a_rasterSpace)
choose drawing to 2D pixel coordinates
Definition: CameraEditable.h:66
virtual BWORD rasterSpace(void) const
Get raster space mode (on/off)
Definition: CameraEditable.h:68
String & sPrintf(const char *fmt,...)
Populate the string in the manner of sprintf().
Definition: String.cc:529
Automatically reference-counted string container.
Definition: String.h:128
virtual Vector2 fov(void) const
Get perspective Field of View (degrees)
Definition: CameraEditable.h:47
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
viewing position
Definition: CameraI.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192
Adjustable Camera.
Definition: CameraEditable.h:20