camera.h

Go to the documentation of this file.
00001 //**************************************************************************/
00002 // Copyright (c) 2008 Autodesk, Inc.
00003 // All rights reserved.
00004 //
00005 // Use of this software is subject to the terms of the Autodesk license
00006 // agreement provided at the time of installation or download, or which
00007 // otherwise accompanies this software in either electronic or hard copy form.
00008 //
00009 //**************************************************************************/
00010 // DESCRIPTION:
00011 // CREATED: October 2008
00012 //**************************************************************************/
00013 
00014 namespace mudbox {
00015 
00020 class MBDLL_DECL Camera : virtual public GroupNode
00021 {
00022     DECLARE_CLASS;
00023 
00024 protected:
00032     Camera( void );
00033 
00034 public:
00035 
00037     virtual Vector Forward( void ) const;
00038 
00040     virtual Vector Up( void ) const;
00041 
00043     virtual Vector Right( void ) const;
00044 
00048     virtual float Yaw( void ) const;
00049 
00054     virtual float Pitch( void ) const;
00055 
00060     virtual float Roll( void ) const;
00061 
00063     virtual Vector Position( void ) const;
00064 
00074     virtual void SetYawPitchRoll(
00075         const Vector &vYPR      
00076         );
00077 
00087     virtual void AddYawPitchRoll(
00088         const Vector &vYPR      
00089         );
00090 
00096     virtual void SetForwardUpRight(
00097         const Vector &vForward,     
00098         const Vector &vUp,          
00099         const Vector &vRight        
00100         );
00101 
00107     virtual void SetTarget(
00108         const Vector &vTarget,                      
00109         const Vector &vUpDir = Vector( 0, 1, 0 )    
00110         );
00111 
00113     virtual void SetPosition(
00114         const Vector &vPosition     
00115         );
00116 
00118     virtual void MoveForward(
00119         float fRange    
00120         );
00121 
00123     virtual void MoveUp(
00124         float fRange    
00125         );
00126 
00128     virtual void MoveRight(
00129         float fRange    
00130         );
00131 
00133     virtual void MoveBackward(
00134         float fRange    
00135         );
00136 
00138     virtual void MoveDown(
00139         float fRange    
00140         );
00141 
00143     virtual void MoveLeft(
00144         float fRange    
00145         );
00146 
00156     virtual Vector Project(
00157         const Vector &vWorldPosition    
00158         ) const;
00159 
00167     virtual Vector UnProject(
00168         const Vector &vScreenPosition   
00169         ) const;
00170 
00172     virtual mudbox::Matrix Matrix(
00173         bool bOffscreen = false     
00174         ) const;
00175 
00182     virtual float FOV( void ) const;
00183 
00185     virtual float Near( void ) const;
00186 
00188     virtual float Far( void ) const;
00189 
00193     virtual float AspectRatio( void ) const;
00194 
00196     virtual void SetFOV(
00197         float fFOV          
00198         );
00199 
00201     virtual void SetNear(
00202         float fNear     
00203         );
00204 
00206     virtual void SetFar(
00207         float fFar  
00208         );
00209 
00213     virtual void SetAspectRatio(
00214         float fAspectRatio  
00215         );
00216 
00221     virtual float Scale2D( void ) const;
00222 
00228     virtual float Angle2D( void ) const;
00229 
00234     virtual Vector Position2D( void ) const;
00235 
00241     virtual void SetScale2D(
00242         float fScale2D      
00243         );
00244 
00250     virtual void SetAngle2D(
00251         float fAngle2D      
00252         );
00253 
00259     virtual void SetPosition2D(
00260         const Vector &vPosition2D   
00261         );
00262 
00264     virtual void CopyFrom(
00265         const Camera &cOther    
00266         );
00267 
00268 
00270     virtual bool IsEqualTo(
00271         const Camera &cOther    
00272         ) const;
00273 
00281     virtual bool Pick(
00282         float fXPosition,       
00283         float fYPosition,       
00284         SurfacePoint &sResult   
00285         );
00286 
00288     virtual Vector Aim() const;
00289     
00294     virtual void SetAim(
00295         const Vector &v     
00296         );
00297     
00299     virtual bool Orthographic() const;
00300     
00302     virtual void SetOrthographic(
00303         bool isOrtho        
00304         );
00305 
00306 };
00307 
00308 }; // end of namespace mudbox
00309 
00310 
00311