RTFX  0.3
Real time special effects collaborative visualization and production library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
RTFXCamera.h
1 #ifndef __RTFX_CAMERA__
2 #define __RTFX_CAMERA__
3 
14 #include <iostream>
15 #include <sstream>
16 #include "RTFXObject.h"
17 #include "RTFX_API.h"
18 
19 namespace RTFX
20 {
29  class RTFXAPI RTFXCamera : public RTFXObject
30  {
31  public:
32 
35  RTFXCamera();
36 
39  RTFXCamera( bool _genID );
40 
42  ~RTFXCamera();
43 
45  RTFXCamera( const RTFXCamera &_c );
46 
50  void Update( RTFXObject * _cam );
51 
53  void ToNative( AXISFRAME _frame );
54 
56  void FromNative( AXISFRAME _frame );
57 
59  void ChangeFrame( AXISFRAME _from, AXISFRAME _to );
60 
62  void SetPosition( Point3D _p );
63 
65  void SetPosition( double _x, double _y, double _z );
66 
68  Point3D GetPosition();
69 
71  double * GetPositionAsDoubles();
72 
74  void SetRotation( Point3D _p );
75 
77  void SetRotation( double _x, double _y, double _z );
78 
80  Point3D GetRotation();
81 
83  double * GetRotationAsDoubles();
84 
86  void SetUpVector( Vector3D _p );
87 
89  void SetUpVector( double _x, double _y, double _z );
90 
92  Vector3D GetUpVector();
93 
95  double * GetUpVectorAsDoubles();
96 
98  void SetForwardVector( Vector3D _p );
99 
101  void SetForwardVector( double _x, double _y, double _z );
102 
104  Vector3D GetForwardVector();
105 
107  double * GetForwardVectorAsDoubles();
108 
110  void SetTransform( Matrix4x4 _m );
111 
113  void SetTransform( double * _m );
114 
116  Matrix4x4 GetTransform();
117 
119  double * GetTransformAsDoubles();
120 
122  void SetDepthOfField( bool _dof );
123 
125  bool GetDepthOfField();
126 
128  void SetFocalDistance( double _fd );
129 
131  double GetFocalDistance();
132 
134  void SetFocalLength( double _fl );
135 
137  double GetFocalLength();
138 
140  void SetAperture( double _ap );
141 
143  double GetAperture();
144 
146  void SetFStop( double _fs );
147 
149  double GetFStop();
150 
152  void SetResolution( double _width, double _height );
153 
155  double * GetResolution();
156 
158  void SetNearPlane( double _np );
159 
161  double GetNearPlane();
162 
164  void SetFarPlane( double _fp );
165 
167  double GetFarPlane();
168 
170  void SetStereo( bool _st );
171 
173  bool GetStereo();
174 
176  void SetZeroParallax( double _zp );
177 
179  double GetZeroParallax();
180 
182  void SetInterAxialDistance( double _iad );
183 
185  double GetInterAxialDistance();
186 
187  private:
188 
190  void Init( bool _genID );
191 
192  friend class boost::serialization::access;
193  template<class Archive>
194  void serialize( Archive &_ar, const unsigned int _version )
195  {
196  debug( ostringstream().flush() << "RTFXCamera::serialize" << endl );
197  _ar & boost::serialization::base_object<RTFXObject>( *this );
198  }
199  };
200 }
201 
202 BOOST_CLASS_EXPORT_KEY( RTFX::RTFXCamera )
203 
204 #endif
205