Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials
ICameraSceneNode.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2010 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 irr
12 {
13 namespace scene
14 {
15  struct SViewFrustum;
16 
18 
24  {
25  public:
26 
29  const core::vector3df& position = core::vector3df(0,0,0),
30  const core::vector3df& rotation = core::vector3df(0,0,0),
31  const core::vector3df& scale = core::vector3df(1.0f,1.0f,1.0f))
32  : ISceneNode(parent, mgr, id, position, rotation, scale), IsOrthogonal(false) {}
33 
35 
45  virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal=false) =0;
46 
48 
49  virtual const core::matrix4& getProjectionMatrix() const =0;
50 
52 
53  virtual const core::matrix4& getViewMatrix() const =0;
54 
56 
60  virtual void setViewMatrixAffector(const core::matrix4& affector) =0;
61 
63 
64  virtual const core::matrix4& getViewMatrixAffector() const =0;
65 
67 
73  virtual bool OnEvent(const SEvent& event) =0;
74 
76 
80  virtual void setTarget(const core::vector3df& pos) =0;
81 
83 
88  virtual void setRotation(const core::vector3df& rotation) =0;
89 
91 
92  virtual const core::vector3df& getTarget() const =0;
93 
95 
96  virtual void setUpVector(const core::vector3df& pos) =0;
97 
99 
100  virtual const core::vector3df& getUpVector() const =0;
101 
103 
104  virtual f32 getNearValue() const =0;
105 
107 
108  virtual f32 getFarValue() const =0;
109 
111 
112  virtual f32 getAspectRatio() const =0;
113 
115 
116  virtual f32 getFOV() const =0;
117 
119 
120  virtual void setNearValue(f32 zn) =0;
121 
123 
124  virtual void setFarValue(f32 zf) =0;
125 
127 
128  virtual void setAspectRatio(f32 aspect) =0;
129 
131 
132  virtual void setFOV(f32 fovy) =0;
133 
135 
137  virtual const SViewFrustum* getViewFrustum() const =0;
138 
140 
142  virtual void setInputReceiverEnabled(bool enabled) =0;
143 
145  virtual bool isInputReceiverEnabled() const =0;
146 
148  virtual bool isOrthogonal() const
149  {
151  return IsOrthogonal;
152  }
153 
155 
163  virtual void bindTargetAndRotation(bool bound) =0;
164 
166 
167  virtual bool getTargetAndRotationBinding(void) const =0;
168 
171  {
172  ISceneNode::serializeAttributes(out, options);
173 
174  if (!out)
175  return;
176  out->addBool ("IsOrthogonal", IsOrthogonal );
177  }
178 
181  {
183  if (!in)
184  return;
185 
186  if ( in->findAttribute("IsOrthogonal") )
187  IsOrthogonal = in->getAttributeAsBool("IsOrthogonal");
188  }
189 
190  protected:
191 
192  void cloneMembers(ICameraSceneNode* toCopyFrom)
193  {
194  IsOrthogonal = toCopyFrom->IsOrthogonal;
195  }
196 
198  };
199 
200 } // end namespace scene
201 } // end namespace irr
202 
203 #endif
204 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Tue Jun 5 2012 17:57:11 by Doxygen (1.8.1)