aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CQuake3ShaderSceneNode.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/CQuake3ShaderSceneNode.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/CQuake3ShaderSceneNode.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CQuake3ShaderSceneNode.h236
1 files changed, 118 insertions, 118 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CQuake3ShaderSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/CQuake3ShaderSceneNode.h
index 6ec026f..8847216 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CQuake3ShaderSceneNode.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CQuake3ShaderSceneNode.h
@@ -1,118 +1,118 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten 1// Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten
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_QUAKE3_SCENE_NODE_H_INCLUDED__ 5#ifndef __C_QUAKE3_SCENE_NODE_H_INCLUDED__
6#define __C_QUAKE3_SCENE_NODE_H_INCLUDED__ 6#define __C_QUAKE3_SCENE_NODE_H_INCLUDED__
7 7
8#include "IMeshSceneNode.h" 8#include "IMeshSceneNode.h"
9#include "IQ3Shader.h" 9#include "IQ3Shader.h"
10#include "IFileSystem.h" 10#include "IFileSystem.h"
11#include "SMeshBuffer.h" 11#include "SMeshBuffer.h"
12#include "SMeshBufferLightMap.h" 12#include "SMeshBufferLightMap.h"
13#include "SMesh.h" 13#include "SMesh.h"
14#include "ISceneManager.h" 14#include "ISceneManager.h"
15 15
16namespace irr 16namespace irr
17{ 17{
18namespace scene 18namespace scene
19{ 19{
20 20
21//! Scene node which is a quake3 shader. 21//! Scene node which is a quake3 shader.
22class CQuake3ShaderSceneNode : public scene::IMeshSceneNode 22class CQuake3ShaderSceneNode : public scene::IMeshSceneNode
23{ 23{
24public: 24public:
25 25
26 CQuake3ShaderSceneNode( ISceneNode* parent, ISceneManager* mgr, s32 id, 26 CQuake3ShaderSceneNode( ISceneNode* parent, ISceneManager* mgr, s32 id,
27 io::IFileSystem* fileSystem, 27 io::IFileSystem* fileSystem,
28 const IMeshBuffer* original, 28 const IMeshBuffer* original,
29 const quake3::IShader* shader 29 const quake3::IShader* shader
30 ); 30 );
31 31
32 virtual ~CQuake3ShaderSceneNode(); 32 virtual ~CQuake3ShaderSceneNode();
33 33
34 virtual void OnRegisterSceneNode(); 34 virtual void OnRegisterSceneNode();
35 virtual void render(); 35 virtual void render();
36 virtual void OnAnimate(u32 timeMs); 36 virtual void OnAnimate(u32 timeMs);
37 virtual const core::aabbox3d<f32>& getBoundingBox() const; 37 virtual const core::aabbox3d<f32>& getBoundingBox() const;
38 38
39 virtual u32 getMaterialCount() const; 39 virtual u32 getMaterialCount() const;
40 virtual video::SMaterial& getMaterial(u32 i); 40 virtual video::SMaterial& getMaterial(u32 i);
41 41
42 //! Returns type of the scene node 42 //! Returns type of the scene node
43 virtual ESCENE_NODE_TYPE getType() const { return ESNT_Q3SHADER_SCENE_NODE; } 43 virtual ESCENE_NODE_TYPE getType() const { return ESNT_Q3SHADER_SCENE_NODE; }
44 44
45 virtual void setMesh(IMesh* mesh){} 45 virtual void setMesh(IMesh* mesh){}
46 virtual IMesh* getMesh() { return Mesh; } 46 virtual IMesh* getMesh() { return Mesh; }
47 virtual void setReadOnlyMaterials(bool readonly) {} 47 virtual void setReadOnlyMaterials(bool readonly) {}
48 virtual bool isReadOnlyMaterials() const { return true; } 48 virtual bool isReadOnlyMaterials() const { return true; }
49 49
50 //! Creates shadow volume scene node as child of this node 50 //! Creates shadow volume scene node as child of this node
51 //! and returns a pointer to it. 51 //! and returns a pointer to it.
52 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, 52 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh,
53 s32 id, bool zfailmethod=true, f32 infinity=10000.0f); 53 s32 id, bool zfailmethod=true, f32 infinity=10000.0f);
54 54
55 //! Removes a child from this scene node. 55 //! Removes a child from this scene node.
56 //! Implemented here, to be able to remove the shadow properly, if there is one, 56 //! Implemented here, to be able to remove the shadow properly, if there is one,
57 //! or to remove attached childs. 57 //! or to remove attached childs.
58 virtual bool removeChild(ISceneNode* child); 58 virtual bool removeChild(ISceneNode* child);
59 59
60private: 60private:
61 const quake3::IShader* Shader; 61 const quake3::IShader* Shader;
62 SMesh *Mesh; 62 SMesh *Mesh;
63 IShadowVolumeSceneNode* Shadow; 63 IShadowVolumeSceneNode* Shadow;
64 const SMeshBufferLightMap* Original; 64 const SMeshBufferLightMap* Original;
65 SMeshBuffer* MeshBuffer; 65 SMeshBuffer* MeshBuffer;
66 core::vector3df MeshOffset; 66 core::vector3df MeshOffset;
67 67
68 struct SQ3Texture 68 struct SQ3Texture
69 { 69 {
70 SQ3Texture () : 70 SQ3Texture () :
71 TextureIndex ( 0 ), 71 TextureIndex ( 0 ),
72 TextureFrequency(0.f), 72 TextureFrequency(0.f),
73 TextureAddressMode( video::ETC_REPEAT ) 73 TextureAddressMode( video::ETC_REPEAT )
74 { 74 {
75 Texture.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE ); 75 Texture.setAllocStrategy ( core::ALLOC_STRATEGY_SAFE );
76 } 76 }
77 77
78 quake3::tTexArray Texture; 78 quake3::tTexArray Texture;
79 79
80 u32 TextureIndex; 80 u32 TextureIndex;
81 f32 TextureFrequency; 81 f32 TextureFrequency;
82 video::E_TEXTURE_CLAMP TextureAddressMode; // Wrapping/Clamping 82 video::E_TEXTURE_CLAMP TextureAddressMode; // Wrapping/Clamping
83 }; 83 };
84 84
85 core::array< SQ3Texture > Q3Texture; 85 core::array< SQ3Texture > Q3Texture;
86 86
87 void loadTextures ( io::IFileSystem * fileSystem ); 87 void loadTextures ( io::IFileSystem * fileSystem );
88 void addBuffer ( scene::SMeshBufferLightMap * buffer ); 88 void addBuffer ( scene::SMeshBufferLightMap * buffer );
89 void cloneBuffer ( scene::SMeshBuffer *dest, const scene::SMeshBufferLightMap * buffer, bool translateCenter ); 89 void cloneBuffer ( scene::SMeshBuffer *dest, const scene::SMeshBufferLightMap * buffer, bool translateCenter );
90 90
91 void deformvertexes_wave ( f32 dt, quake3::SModifierFunction &function ); 91 void deformvertexes_wave ( f32 dt, quake3::SModifierFunction &function );
92 void deformvertexes_move ( f32 dt, quake3::SModifierFunction &function ); 92 void deformvertexes_move ( f32 dt, quake3::SModifierFunction &function );
93 void deformvertexes_bulge( f32 dt, quake3::SModifierFunction &function ); 93 void deformvertexes_bulge( f32 dt, quake3::SModifierFunction &function );
94 void deformvertexes_autosprite( f32 dt, quake3::SModifierFunction &function ); 94 void deformvertexes_autosprite( f32 dt, quake3::SModifierFunction &function );
95 void deformvertexes_autosprite2( f32 dt, quake3::SModifierFunction &function ); 95 void deformvertexes_autosprite2( f32 dt, quake3::SModifierFunction &function );
96 void deformvertexes_normal ( f32 dt, quake3::SModifierFunction &function ); 96 void deformvertexes_normal ( f32 dt, quake3::SModifierFunction &function );
97 97
98 void vertextransform_tcgen ( f32 dt, quake3::SModifierFunction &function ); 98 void vertextransform_tcgen ( f32 dt, quake3::SModifierFunction &function );
99 void vertextransform_rgbgen ( f32 dt, quake3::SModifierFunction &function ); 99 void vertextransform_rgbgen ( f32 dt, quake3::SModifierFunction &function );
100 void vertextransform_alphagen ( f32 dt, quake3::SModifierFunction &function ); 100 void vertextransform_alphagen ( f32 dt, quake3::SModifierFunction &function );
101 101
102 void transformtex ( const core::matrix4 &m, const u32 clamp ); 102 void transformtex ( const core::matrix4 &m, const u32 clamp );
103 103
104 f32 TimeAbs; 104 f32 TimeAbs;
105 105
106 void animate( u32 stage, core::matrix4 &texture ); 106 void animate( u32 stage, core::matrix4 &texture );
107 107
108 E_SCENE_NODE_RENDER_PASS getRenderStage() const; 108 E_SCENE_NODE_RENDER_PASS getRenderStage() const;
109 109
110}; 110};
111 111
112 112
113} // end namespace scene 113} // end namespace scene
114} // end namespace irr 114} // end namespace irr
115 115
116 116
117#endif 117#endif
118 118