Saga3D API Documentation  1.0-RC4
ICameraSceneNode.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_CAMERA_SCENE_NODE_H_INCLUDED__
6 #define __I_CAMERA_SCENE_NODE_H_INCLUDED__
7 
8 #include "ISceneNode.h"
9 #include "IEventReceiver.h"
10 
11 namespace saga
12 {
13 namespace scene
14 {
15  struct SViewFrustum;
16 
18 
24  {
25  public:
26 
28  ICameraSceneNode(const std::shared_ptr<ISceneNode>& parent, const std::shared_ptr<ISceneManager>& mgr,
29  const glm::vec3& position = glm::vec3(0,0,0),
30  const glm::vec3& rotation = glm::vec3(0,0,0),
31  const glm::vec3& scale = glm::vec3(1.0f,1.0f,1.0f))
32  : ISceneNode(parent, mgr, position, rotation, scale), IsOrthogonal(false) {}
33 
35 
45  virtual void setProjectionMatrix(const glm::mat4& projection, bool isOrthogonal = false) = 0;
46 
48 
49  virtual const glm::mat4& getProjectionMatrix() const = 0;
50 
51  virtual void setViewMatrix(const glm::mat4& view) = 0;
52 
54 
55  virtual const glm::mat4& getViewMatrix() const = 0;
56 
58 
65  virtual void setTarget(const glm::vec3& newTarget) = 0;
66 
68 
73  virtual void setRotation(const glm::vec3& rotation) = 0;
74 
76 
77  virtual const glm::vec3& getTarget() const = 0;
78 
80 
81  virtual void setUpVector(const glm::vec3& pos) = 0;
82 
84 
85  virtual const glm::vec3& getUpVector() const = 0;
86 
88 
89  virtual float getNearValue() const = 0;
90 
92 
93  virtual float getFarValue() const = 0;
94 
96 
97  virtual float getAspectRatio() const = 0;
98 
100 
101  virtual float getFOV() const = 0;
102 
104 
105  virtual void setNearValue(float zn) = 0;
106 
108 
109  virtual void setFarValue(float zf) = 0;
110 
112 
113  virtual void setAspectRatio(float aspect) = 0;
114 
116 
117  virtual void setFOV(float fovy) = 0;
118 
120  virtual bool isOrthogonal() const
121  {
122  return IsOrthogonal;
123  }
124 
126  virtual void updateViewMatrix() = 0;
127 
129  virtual void updateProjectionMatrix() = 0;
130 
131  protected:
133  };
134 
135 } // namespace scene
136 } // namespace saga
137 
138 #endif
139 
saga::scene::ICameraSceneNode::updateProjectionMatrix
virtual void updateProjectionMatrix()=0
Updates projection matrix.
saga::scene::ICameraSceneNode::isOrthogonal
virtual bool isOrthogonal() const
Checks if a camera is orthogonal.
Definition: ICameraSceneNode.h:120
saga::scene::ICameraSceneNode::ICameraSceneNode
ICameraSceneNode(const std::shared_ptr< ISceneNode > &parent, const std::shared_ptr< ISceneManager > &mgr, const glm::vec3 &position=glm::vec3(0, 0, 0), const glm::vec3 &rotation=glm::vec3(0, 0, 0), const glm::vec3 &scale=glm::vec3(1.0f, 1.0f, 1.0f))
Constructor.
Definition: ICameraSceneNode.h:28
saga::scene::ISceneNode
Type for list of scene node animators.
Definition: ISceneNode.h:41
saga::scene::ICameraSceneNode::setAspectRatio
virtual void setAspectRatio(float aspect)=0
Sets the aspect ratio (default: 4.0f / 3.0f)
saga::scene::ICameraSceneNode::IsOrthogonal
bool IsOrthogonal
Definition: ICameraSceneNode.h:132
saga::scene::ICameraSceneNode
Scene Node which is a (controllable) camera.
Definition: ICameraSceneNode.h:23
saga::scene::ICameraSceneNode::setTarget
virtual void setTarget(const glm::vec3 &newTarget)=0
Sets the look at target of the camera.
saga::scene::ICameraSceneNode::getAspectRatio
virtual float getAspectRatio() const =0
Gets the aspect ratio of the camera.
saga::scene::ICameraSceneNode::getViewMatrix
virtual const glm::mat4 & getViewMatrix() const =0
Gets the current view matrix of the camera.
ISceneNode.h
saga::scene::ICameraSceneNode::getFOV
virtual float getFOV() const =0
Gets the field of view of the camera.
saga::scene::ICameraSceneNode::getTarget
virtual const glm::vec3 & getTarget() const =0
Gets the current look at target of the camera.
saga::scene::ICameraSceneNode::getUpVector
virtual const glm::vec3 & getUpVector() const =0
Gets the up vector of the camera.
IEventReceiver.h
saga::scene::ICameraSceneNode::getFarValue
virtual float getFarValue() const =0
Gets the value of the far plane of the camera.
saga::scene::ICameraSceneNode::setUpVector
virtual void setUpVector(const glm::vec3 &pos)=0
Sets the up vector of the camera.
saga::scene::ICameraSceneNode::setFarValue
virtual void setFarValue(float zf)=0
Sets the value of the far clipping plane (default: 2000.0f)
saga::scene::ICameraSceneNode::getProjectionMatrix
virtual const glm::mat4 & getProjectionMatrix() const =0
Gets the current projection matrix of the camera.
saga::scene::ICameraSceneNode::updateViewMatrix
virtual void updateViewMatrix()=0
Updates view matrix.
saga::scene::ICameraSceneNode::getNearValue
virtual float getNearValue() const =0
Gets the value of the near plane of the camera.
saga::scene::ICameraSceneNode::setRotation
virtual void setRotation(const glm::vec3 &rotation)=0
Sets the rotation of the node.
saga::scene::ICameraSceneNode::setFOV
virtual void setFOV(float fovy)=0
Sets the field of view (Default: PI / 2.5f)
saga::scene::ICameraSceneNode::setNearValue
virtual void setNearValue(float zn)=0
Sets the value of the near clipping plane. (default: 1.0f)
saga::scene::ICameraSceneNode::setProjectionMatrix
virtual void setProjectionMatrix(const glm::mat4 &projection, bool isOrthogonal=false)=0
Sets the projection matrix of the camera.
saga::scene::ICameraSceneNode::setViewMatrix
virtual void setViewMatrix(const glm::mat4 &view)=0
saga
Definition: aabbox3d.h:11