Class that represents a camera on the scene.  
 More...
#include <OsirisSDK/OCamera.h>
 | 
|   | OCamera (float fieldOfViewDeg=45.0f, float aspectRatio=4.0f/3, float zNear=1.0f, float zFar=5.0f, const OVector3 &pos=OVector3(0, 0,-1), const OVector3 &dir=OVector3(0, 0, 1)) | 
|   | Class constructor.  More...
  | 
|   | 
| 
virtual  | ~OCamera () | 
|   | Class destructor. 
  | 
|   | 
| void  | setFieldOfView (float valueDeg) | 
|   | Sets the camera field of view.  More...
  | 
|   | 
| 
void  | setAspectRatio (float value) | 
|   | Sets camera aspect ratio (width/height). 
  | 
|   | 
| void  | setCameraLimits (float zNear, float zFar) | 
|   | Sets camera depth limits.  More...
  | 
|   | 
| void  | setPosition (const OVector3 &position) | 
|   | Set camera position.  More...
  | 
|   | 
| void  | setDirection (const OVector3 &direction) | 
|   | Set camera direction.  More...
  | 
|   | 
| float  | fieldOfViewDegrees () const  | 
|   | Returns the camera field of view.  More...
  | 
|   | 
| float  | aspectRatio () const  | 
|   | Returns screen aspect ratio.  More...
  | 
|   | 
| 
float  | nearLimit () const  | 
|   | Returns camera nearest limit. 
  | 
|   | 
| 
float  | farLimit () const  | 
|   | Returns camera farthest limit. 
  | 
|   | 
| OVector3  | position () const  | 
|   | Returns the camera current position.  More...
  | 
|   | 
| OVector3  | direction () const  | 
|   | Returns the camera looking direction.  More...
  | 
|   | 
| const OMatrixStack *  | perspectiveTransform () | 
|   | Calculates the current perspective transformation matrix.  More...
  | 
|   | 
| const OMatrixStack *  | cameraTransform () | 
|   | Calculates the camera transformation matrix.  More...
  | 
|   | 
Class that represents a camera on the scene. 
 
      
        
          | OCamera::OCamera  | 
          ( | 
          float  | 
          fieldOfViewDeg = 45.0f,  | 
        
        
           | 
           | 
          float  | 
          aspectRatio = 4.0f/3,  | 
        
        
           | 
           | 
          float  | 
          zNear = 1.0f,  | 
        
        
           | 
           | 
          float  | 
          zFar = 5.0f,  | 
        
        
           | 
           | 
          const OVector3 &  | 
          pos = OVector3(0, 0, -1),  | 
        
        
           | 
           | 
          const OVector3 &  | 
          dir = OVector3(0, 0, 1)  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Class constructor. 
The constructor takes in all the attributes of the scene camera.
- Parameters
 - 
  
    | fieldOfViewDeg | Angle of the camera's field of view in degrees.  | 
    | aspectRatio | The aspect ration of the screen (width/height).  | 
    | zNear | Nearest camera depth.  | 
    | zFar | Farthest camera depth.  | 
    | pos | Camera position.  | 
    | dir | Camera direction vector.  | 
  
   
 
 
      
        
          | float OCamera::aspectRatio  | 
          ( | 
           | ) | 
           const | 
        
      
 
Returns screen aspect ratio. 
- Returns
 - Screen aspect ratio (width/height) 
 
 
 
Calculates the camera transformation matrix. 
- Returns
 - Camera transformation matrix. 
 
 
 
Returns the camera looking direction. 
- Returns
 - Camera direction vector. 
 
 
 
      
        
          | float OCamera::fieldOfViewDegrees  | 
          ( | 
           | ) | 
           const | 
        
      
 
Returns the camera field of view. 
- Returns
 - Field of view in degrees. 
 
 
 
Calculates the current perspective transformation matrix. 
- Returns
 - Perspective transformation matrix. 
 
 
 
Returns the camera current position. 
- Returns
 - Camera position coordinates. 
 
 
 
      
        
          | void OCamera::setCameraLimits  | 
          ( | 
          float  | 
          zNear,  | 
        
        
           | 
           | 
          float  | 
          zFar  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sets camera depth limits. 
- Parameters
 - 
  
    | zNear | Nearest camera depth.  | 
    | zFar | Farthest camera depth.  | 
  
   
 
 
      
        
          | void OCamera::setDirection  | 
          ( | 
          const OVector3 &  | 
          direction | ) | 
           | 
        
      
 
Set camera direction. 
- Parameters
 - 
  
    | direction | Camera direction vector.  | 
  
   
 
 
      
        
          | void OCamera::setFieldOfView  | 
          ( | 
          float  | 
          valueDeg | ) | 
           | 
        
      
 
Sets the camera field of view. 
- Parameters
 - 
  
    | valueDeg | Field of view in degrees.  | 
  
   
 
 
      
        
          | void OCamera::setPosition  | 
          ( | 
          const OVector3 &  | 
          position | ) | 
           | 
        
      
 
Set camera position. 
- Parameters
 - 
  
    | position | Camera position coordinates.  | 
  
   
 
 
The documentation for this class was generated from the following files: