aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h344
1 files changed, 172 insertions, 172 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h
index ce75408..6536d5f 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CCameraSceneNode.h
@@ -1,172 +1,172 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_CAMERA_SCENE_NODE_H_INCLUDED__ 5#ifndef __C_CAMERA_SCENE_NODE_H_INCLUDED__
6#define __C_CAMERA_SCENE_NODE_H_INCLUDED__ 6#define __C_CAMERA_SCENE_NODE_H_INCLUDED__
7 7
8#include "ICameraSceneNode.h" 8#include "ICameraSceneNode.h"
9#include "SViewFrustum.h" 9#include "SViewFrustum.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace scene 13namespace scene
14{ 14{
15 15
16 class CCameraSceneNode : public ICameraSceneNode 16 class CCameraSceneNode : public ICameraSceneNode
17 { 17 {
18 public: 18 public:
19 19
20 //! constructor 20 //! constructor
21 CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 21 CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
22 const core::vector3df& position = core::vector3df(0,0,0), 22 const core::vector3df& position = core::vector3df(0,0,0),
23 const core::vector3df& lookat = core::vector3df(0,0,100)); 23 const core::vector3df& lookat = core::vector3df(0,0,100));
24 24
25 //! Sets the projection matrix of the camera. 25 //! Sets the projection matrix of the camera.
26 /** The core::matrix4 class has some methods 26 /** The core::matrix4 class has some methods
27 to build a projection matrix. e.g: core::matrix4::buildProjectionMatrixPerspectiveFovLH. 27 to build a projection matrix. e.g: core::matrix4::buildProjectionMatrixPerspectiveFovLH.
28 Note that the matrix will only stay as set by this method until one of 28 Note that the matrix will only stay as set by this method until one of
29 the following Methods are called: setNearValue, setFarValue, setAspectRatio, setFOV. 29 the following Methods are called: setNearValue, setFarValue, setAspectRatio, setFOV.
30 \param projection The new projection matrix of the camera. 30 \param projection The new projection matrix of the camera.
31 \param isOrthogonal Set this to true if the matrix is an orthogonal one (e.g. 31 \param isOrthogonal Set this to true if the matrix is an orthogonal one (e.g.
32 from matrix4::buildProjectionMatrixOrthoLH(). */ 32 from matrix4::buildProjectionMatrixOrthoLH(). */
33 virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal = false); 33 virtual void setProjectionMatrix(const core::matrix4& projection, bool isOrthogonal = false);
34 34
35 //! Gets the current projection matrix of the camera 35 //! Gets the current projection matrix of the camera
36 //! \return Returns the current projection matrix of the camera. 36 //! \return Returns the current projection matrix of the camera.
37 virtual const core::matrix4& getProjectionMatrix() const; 37 virtual const core::matrix4& getProjectionMatrix() const;
38 38
39 //! Gets the current view matrix of the camera 39 //! Gets the current view matrix of the camera
40 //! \return Returns the current view matrix of the camera. 40 //! \return Returns the current view matrix of the camera.
41 virtual const core::matrix4& getViewMatrix() const; 41 virtual const core::matrix4& getViewMatrix() const;
42 42
43 //! Sets a custom view matrix affector. 43 //! Sets a custom view matrix affector.
44 /** \param affector: The affector matrix. */ 44 /** \param affector: The affector matrix. */
45 virtual void setViewMatrixAffector(const core::matrix4& affector); 45 virtual void setViewMatrixAffector(const core::matrix4& affector);
46 46
47 //! Gets the custom view matrix affector. 47 //! Gets the custom view matrix affector.
48 virtual const core::matrix4& getViewMatrixAffector() const; 48 virtual const core::matrix4& getViewMatrixAffector() const;
49 49
50 //! It is possible to send mouse and key events to the camera. Most cameras 50 //! It is possible to send mouse and key events to the camera. Most cameras
51 //! may ignore this input, but camera scene nodes which are created for 51 //! may ignore this input, but camera scene nodes which are created for
52 //! example with scene::ISceneManager::addMayaCameraSceneNode or 52 //! example with scene::ISceneManager::addMayaCameraSceneNode or
53 //! scene::ISceneManager::addMeshViewerCameraSceneNode, may want to get this input 53 //! scene::ISceneManager::addMeshViewerCameraSceneNode, may want to get this input
54 //! for changing their position, look at target or whatever. 54 //! for changing their position, look at target or whatever.
55 virtual bool OnEvent(const SEvent& event); 55 virtual bool OnEvent(const SEvent& event);
56 56
57 //! Sets the look at target of the camera 57 //! Sets the look at target of the camera
58 /** If the camera's target and rotation are bound ( @see bindTargetAndRotation() ) 58 /** If the camera's target and rotation are bound ( @see bindTargetAndRotation() )
59 then calling this will also change the camera's scene node rotation to match the target. 59 then calling this will also change the camera's scene node rotation to match the target.
60 \param pos: Look at target of the camera. */ 60 \param pos: Look at target of the camera. */
61 virtual void setTarget(const core::vector3df& pos); 61 virtual void setTarget(const core::vector3df& pos);
62 62
63 //! Sets the rotation of the node. 63 //! Sets the rotation of the node.
64 /** This only modifies the relative rotation of the node. 64 /** This only modifies the relative rotation of the node.
65 If the camera's target and rotation are bound ( @see bindTargetAndRotation() ) 65 If the camera's target and rotation are bound ( @see bindTargetAndRotation() )
66 then calling this will also change the camera's target to match the rotation. 66 then calling this will also change the camera's target to match the rotation.
67 \param rotation New rotation of the node in degrees. */ 67 \param rotation New rotation of the node in degrees. */
68 virtual void setRotation(const core::vector3df& rotation); 68 virtual void setRotation(const core::vector3df& rotation);
69 69
70 //! Gets the current look at target of the camera 70 //! Gets the current look at target of the camera
71 /** \return The current look at target of the camera */ 71 /** \return The current look at target of the camera */
72 virtual const core::vector3df& getTarget() const; 72 virtual const core::vector3df& getTarget() const;
73 73
74 //! Sets the up vector of the camera. 74 //! Sets the up vector of the camera.
75 //! \param pos: New upvector of the camera. 75 //! \param pos: New upvector of the camera.
76 virtual void setUpVector(const core::vector3df& pos); 76 virtual void setUpVector(const core::vector3df& pos);
77 77
78 //! Gets the up vector of the camera. 78 //! Gets the up vector of the camera.
79 //! \return Returns the up vector of the camera. 79 //! \return Returns the up vector of the camera.
80 virtual const core::vector3df& getUpVector() const; 80 virtual const core::vector3df& getUpVector() const;
81 81
82 //! Gets distance from the camera to the near plane. 82 //! Gets distance from the camera to the near plane.
83 //! \return Value of the near plane of the camera. 83 //! \return Value of the near plane of the camera.
84 virtual f32 getNearValue() const; 84 virtual f32 getNearValue() const;
85 85
86 //! Gets the distance from the camera to the far plane. 86 //! Gets the distance from the camera to the far plane.
87 //! \return Value of the far plane of the camera. 87 //! \return Value of the far plane of the camera.
88 virtual f32 getFarValue() const; 88 virtual f32 getFarValue() const;
89 89
90 //! Get the aspect ratio of the camera. 90 //! Get the aspect ratio of the camera.
91 //! \return The aspect ratio of the camera. 91 //! \return The aspect ratio of the camera.
92 virtual f32 getAspectRatio() const; 92 virtual f32 getAspectRatio() const;
93 93
94 //! Gets the field of view of the camera. 94 //! Gets the field of view of the camera.
95 //! \return Field of view of the camera 95 //! \return Field of view of the camera
96 virtual f32 getFOV() const; 96 virtual f32 getFOV() const;
97 97
98 //! Sets the value of the near clipping plane. (default: 1.0f) 98 //! Sets the value of the near clipping plane. (default: 1.0f)
99 virtual void setNearValue(f32 zn); 99 virtual void setNearValue(f32 zn);
100 100
101 //! Sets the value of the far clipping plane (default: 2000.0f) 101 //! Sets the value of the far clipping plane (default: 2000.0f)
102 virtual void setFarValue(f32 zf); 102 virtual void setFarValue(f32 zf);
103 103
104 //! Sets the aspect ratio (default: 4.0f / 3.0f) 104 //! Sets the aspect ratio (default: 4.0f / 3.0f)
105 virtual void setAspectRatio(f32 aspect); 105 virtual void setAspectRatio(f32 aspect);
106 106
107 //! Sets the field of view (Default: PI / 3.5f) 107 //! Sets the field of view (Default: PI / 3.5f)
108 virtual void setFOV(f32 fovy); 108 virtual void setFOV(f32 fovy);
109 109
110 //! PreRender event 110 //! PreRender event
111 virtual void OnRegisterSceneNode(); 111 virtual void OnRegisterSceneNode();
112 112
113 //! Render 113 //! Render
114 virtual void render(); 114 virtual void render();
115 115
116 //! Returns the axis aligned bounding box of this node 116 //! Returns the axis aligned bounding box of this node
117 virtual const core::aabbox3d<f32>& getBoundingBox() const; 117 virtual const core::aabbox3d<f32>& getBoundingBox() const;
118 118
119 //! Returns the view area. Sometimes needed by bsp or lod render nodes. 119 //! Returns the view area. Sometimes needed by bsp or lod render nodes.
120 virtual const SViewFrustum* getViewFrustum() const; 120 virtual const SViewFrustum* getViewFrustum() const;
121 121
122 //! Disables or enables the camera to get key or mouse inputs. 122 //! Disables or enables the camera to get key or mouse inputs.
123 //! If this is set to true, the camera will respond to key inputs 123 //! If this is set to true, the camera will respond to key inputs
124 //! otherwise not. 124 //! otherwise not.
125 virtual void setInputReceiverEnabled(bool enabled); 125 virtual void setInputReceiverEnabled(bool enabled);
126 126
127 //! Returns if the input receiver of the camera is currently enabled. 127 //! Returns if the input receiver of the camera is currently enabled.
128 virtual bool isInputReceiverEnabled() const; 128 virtual bool isInputReceiverEnabled() const;
129 129
130 //! Writes attributes of the scene node. 130 //! Writes attributes of the scene node.
131 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; 131 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
132 132
133 //! Reads attributes of the scene node. 133 //! Reads attributes of the scene node.
134 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 134 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
135 135
136 //! Returns type of the scene node 136 //! Returns type of the scene node
137 virtual ESCENE_NODE_TYPE getType() const { return ESNT_CAMERA; } 137 virtual ESCENE_NODE_TYPE getType() const { return ESNT_CAMERA; }
138 138
139 //! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them. 139 //! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them.
140 virtual void bindTargetAndRotation(bool bound); 140 virtual void bindTargetAndRotation(bool bound);
141 141
142 //! Queries if the camera scene node's rotation and its target position are bound together. 142 //! Queries if the camera scene node's rotation and its target position are bound together.
143 virtual bool getTargetAndRotationBinding(void) const; 143 virtual bool getTargetAndRotationBinding(void) const;
144 144
145 //! Creates a clone of this scene node and its children. 145 //! Creates a clone of this scene node and its children.
146 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); 146 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
147 147
148 protected: 148 protected:
149 149
150 void recalculateProjectionMatrix(); 150 void recalculateProjectionMatrix();
151 void recalculateViewArea(); 151 void recalculateViewArea();
152 152
153 core::vector3df Target; 153 core::vector3df Target;
154 core::vector3df UpVector; 154 core::vector3df UpVector;
155 155
156 f32 Fovy; // Field of view, in radians. 156 f32 Fovy; // Field of view, in radians.
157 f32 Aspect; // Aspect ratio. 157 f32 Aspect; // Aspect ratio.
158 f32 ZNear; // value of the near view-plane. 158 f32 ZNear; // value of the near view-plane.
159 f32 ZFar; // Z-value of the far view-plane. 159 f32 ZFar; // Z-value of the far view-plane.
160 160
161 SViewFrustum ViewArea; 161 SViewFrustum ViewArea;
162 core::matrix4 Affector; 162 core::matrix4 Affector;
163 163
164 bool InputReceiverEnabled; 164 bool InputReceiverEnabled;
165 bool TargetAndRotationAreBound; 165 bool TargetAndRotationAreBound;
166 }; 166 };
167 167
168} // end namespace 168} // end namespace
169} // end namespace 169} // end namespace
170 170
171#endif 171#endif
172 172