diff options
author | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
commit | 959831f4ef5a3e797f576c3de08cd65032c997ad (patch) | |
tree | e7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/include/IGeometryCreator.h | |
parent | Add info about changes to Irrlicht. (diff) | |
download | SledjHamr-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/include/IGeometryCreator.h')
-rw-r--r-- | libraries/irrlicht-1.8/include/IGeometryCreator.h | 354 |
1 files changed, 177 insertions, 177 deletions
diff --git a/libraries/irrlicht-1.8/include/IGeometryCreator.h b/libraries/irrlicht-1.8/include/IGeometryCreator.h index 164e94b..22cd013 100644 --- a/libraries/irrlicht-1.8/include/IGeometryCreator.h +++ b/libraries/irrlicht-1.8/include/IGeometryCreator.h | |||
@@ -1,177 +1,177 @@ | |||
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 __I_GEOMETRY_CREATOR_H_INCLUDED__ | 5 | #ifndef __I_GEOMETRY_CREATOR_H_INCLUDED__ |
6 | #define __I_GEOMETRY_CREATOR_H_INCLUDED__ | 6 | #define __I_GEOMETRY_CREATOR_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | #include "IMesh.h" | 9 | #include "IMesh.h" |
10 | #include "IImage.h" | 10 | #include "IImage.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace video | 14 | namespace video |
15 | { | 15 | { |
16 | class IVideoDriver; | 16 | class IVideoDriver; |
17 | class SMaterial; | 17 | class SMaterial; |
18 | } | 18 | } |
19 | 19 | ||
20 | namespace scene | 20 | namespace scene |
21 | { | 21 | { |
22 | 22 | ||
23 | //! Helper class for creating geometry on the fly. | 23 | //! Helper class for creating geometry on the fly. |
24 | /** You can get an instance of this class through ISceneManager::getGeometryCreator() */ | 24 | /** You can get an instance of this class through ISceneManager::getGeometryCreator() */ |
25 | class IGeometryCreator : public IReferenceCounted | 25 | class IGeometryCreator : public IReferenceCounted |
26 | { | 26 | { |
27 | public: | 27 | public: |
28 | 28 | ||
29 | //! Creates a simple cube mesh. | 29 | //! Creates a simple cube mesh. |
30 | /** | 30 | /** |
31 | \param size Dimensions of the cube. | 31 | \param size Dimensions of the cube. |
32 | \return Generated mesh. | 32 | \return Generated mesh. |
33 | */ | 33 | */ |
34 | virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0; | 34 | virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0; |
35 | 35 | ||
36 | //! Create a pseudo-random mesh representing a hilly terrain. | 36 | //! Create a pseudo-random mesh representing a hilly terrain. |
37 | /** | 37 | /** |
38 | \param tileSize The size of each tile. | 38 | \param tileSize The size of each tile. |
39 | \param tileCount The number of tiles in each dimension. | 39 | \param tileCount The number of tiles in each dimension. |
40 | \param material The material to apply to the mesh. | 40 | \param material The material to apply to the mesh. |
41 | \param hillHeight The maximum height of the hills. | 41 | \param hillHeight The maximum height of the hills. |
42 | \param countHills The number of hills along each dimension. | 42 | \param countHills The number of hills along each dimension. |
43 | \param textureRepeatCount The number of times to repeat the material texture along each dimension. | 43 | \param textureRepeatCount The number of times to repeat the material texture along each dimension. |
44 | \return Generated mesh. | 44 | \return Generated mesh. |
45 | */ | 45 | */ |
46 | virtual IMesh* createHillPlaneMesh( | 46 | virtual IMesh* createHillPlaneMesh( |
47 | const core::dimension2d<f32>& tileSize, | 47 | const core::dimension2d<f32>& tileSize, |
48 | const core::dimension2d<u32>& tileCount, | 48 | const core::dimension2d<u32>& tileCount, |
49 | video::SMaterial* material, f32 hillHeight, | 49 | video::SMaterial* material, f32 hillHeight, |
50 | const core::dimension2d<f32>& countHills, | 50 | const core::dimension2d<f32>& countHills, |
51 | const core::dimension2d<f32>& textureRepeatCount) const =0; | 51 | const core::dimension2d<f32>& textureRepeatCount) const =0; |
52 | 52 | ||
53 | //! Create a simple rectangular textured plane mesh. | 53 | //! Create a simple rectangular textured plane mesh. |
54 | /** | 54 | /** |
55 | \param tileSize The size of each tile. | 55 | \param tileSize The size of each tile. |
56 | \param tileCount The number of tiles in each dimension. | 56 | \param tileCount The number of tiles in each dimension. |
57 | \param material The material to apply to the mesh. | 57 | \param material The material to apply to the mesh. |
58 | \param textureRepeatCount The number of times to repeat the material texture along each dimension. | 58 | \param textureRepeatCount The number of times to repeat the material texture along each dimension. |
59 | \return Generated mesh. | 59 | \return Generated mesh. |
60 | */ | 60 | */ |
61 | IMesh* createPlaneMesh( | 61 | IMesh* createPlaneMesh( |
62 | const core::dimension2d<f32>& tileSize, | 62 | const core::dimension2d<f32>& tileSize, |
63 | const core::dimension2d<u32>& tileCount=core::dimension2du(1,1), | 63 | const core::dimension2d<u32>& tileCount=core::dimension2du(1,1), |
64 | video::SMaterial* material=0, | 64 | video::SMaterial* material=0, |
65 | const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const | 65 | const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const |
66 | { | 66 | { |
67 | return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount); | 67 | return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount); |
68 | } | 68 | } |
69 | 69 | ||
70 | //! Create a terrain mesh from an image representing a heightfield. | 70 | //! Create a terrain mesh from an image representing a heightfield. |
71 | /** | 71 | /** |
72 | \param texture The texture to apply to the terrain. | 72 | \param texture The texture to apply to the terrain. |
73 | \param heightmap An image that will be interpreted as a heightmap. The | 73 | \param heightmap An image that will be interpreted as a heightmap. The |
74 | brightness (average color) of each pixel is interpreted as a height, | 74 | brightness (average color) of each pixel is interpreted as a height, |
75 | with a 255 brightness pixel producing the maximum height. | 75 | with a 255 brightness pixel producing the maximum height. |
76 | \param stretchSize The size that each pixel will produce, i.e. a | 76 | \param stretchSize The size that each pixel will produce, i.e. a |
77 | 512x512 heightmap | 77 | 512x512 heightmap |
78 | and a stretchSize of (10.f, 20.f) will produce a mesh of size | 78 | and a stretchSize of (10.f, 20.f) will produce a mesh of size |
79 | 5120.f x 10240.f | 79 | 5120.f x 10240.f |
80 | \param maxHeight The maximum height of the terrain. | 80 | \param maxHeight The maximum height of the terrain. |
81 | \param driver The current video driver. | 81 | \param driver The current video driver. |
82 | \param defaultVertexBlockSize (to be documented) | 82 | \param defaultVertexBlockSize (to be documented) |
83 | \param debugBorders (to be documented) | 83 | \param debugBorders (to be documented) |
84 | \return Generated mesh. | 84 | \return Generated mesh. |
85 | */ | 85 | */ |
86 | virtual IMesh* createTerrainMesh(video::IImage* texture, | 86 | virtual IMesh* createTerrainMesh(video::IImage* texture, |
87 | video::IImage* heightmap, | 87 | video::IImage* heightmap, |
88 | const core::dimension2d<f32>& stretchSize, | 88 | const core::dimension2d<f32>& stretchSize, |
89 | f32 maxHeight, video::IVideoDriver* driver, | 89 | f32 maxHeight, video::IVideoDriver* driver, |
90 | const core::dimension2d<u32>& defaultVertexBlockSize, | 90 | const core::dimension2d<u32>& defaultVertexBlockSize, |
91 | bool debugBorders=false) const =0; | 91 | bool debugBorders=false) const =0; |
92 | 92 | ||
93 | //! Create an arrow mesh, composed of a cylinder and a cone. | 93 | //! Create an arrow mesh, composed of a cylinder and a cone. |
94 | /** | 94 | /** |
95 | \param tesselationCylinder Number of quads composing the cylinder. | 95 | \param tesselationCylinder Number of quads composing the cylinder. |
96 | \param tesselationCone Number of triangles composing the cone's roof. | 96 | \param tesselationCone Number of triangles composing the cone's roof. |
97 | \param height Total height of the arrow | 97 | \param height Total height of the arrow |
98 | \param cylinderHeight Total height of the cylinder, should be lesser | 98 | \param cylinderHeight Total height of the cylinder, should be lesser |
99 | than total height | 99 | than total height |
100 | \param widthCylinder Diameter of the cylinder | 100 | \param widthCylinder Diameter of the cylinder |
101 | \param widthCone Diameter of the cone's base, should be not smaller | 101 | \param widthCone Diameter of the cone's base, should be not smaller |
102 | than the cylinder's diameter | 102 | than the cylinder's diameter |
103 | \param colorCylinder color of the cylinder | 103 | \param colorCylinder color of the cylinder |
104 | \param colorCone color of the cone | 104 | \param colorCone color of the cone |
105 | \return Generated mesh. | 105 | \return Generated mesh. |
106 | */ | 106 | */ |
107 | virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4, | 107 | virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4, |
108 | const u32 tesselationCone = 8, const f32 height = 1.f, | 108 | const u32 tesselationCone = 8, const f32 height = 1.f, |
109 | const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f, | 109 | const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f, |
110 | const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF, | 110 | const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF, |
111 | const video::SColor colorCone = 0xFFFFFFFF) const =0; | 111 | const video::SColor colorCone = 0xFFFFFFFF) const =0; |
112 | 112 | ||
113 | 113 | ||
114 | //! Create a sphere mesh. | 114 | //! Create a sphere mesh. |
115 | /** | 115 | /** |
116 | \param radius Radius of the sphere | 116 | \param radius Radius of the sphere |
117 | \param polyCountX Number of quads used for the horizontal tiling | 117 | \param polyCountX Number of quads used for the horizontal tiling |
118 | \param polyCountY Number of quads used for the vertical tiling | 118 | \param polyCountY Number of quads used for the vertical tiling |
119 | \return Generated mesh. | 119 | \return Generated mesh. |
120 | */ | 120 | */ |
121 | virtual IMesh* createSphereMesh(f32 radius = 5.f, | 121 | virtual IMesh* createSphereMesh(f32 radius = 5.f, |
122 | u32 polyCountX = 16, u32 polyCountY = 16) const =0; | 122 | u32 polyCountX = 16, u32 polyCountY = 16) const =0; |
123 | 123 | ||
124 | //! Create a cylinder mesh. | 124 | //! Create a cylinder mesh. |
125 | /** | 125 | /** |
126 | \param radius Radius of the cylinder. | 126 | \param radius Radius of the cylinder. |
127 | \param length Length of the cylinder. | 127 | \param length Length of the cylinder. |
128 | \param tesselation Number of quads around the circumference of the cylinder. | 128 | \param tesselation Number of quads around the circumference of the cylinder. |
129 | \param color The color of the cylinder. | 129 | \param color The color of the cylinder. |
130 | \param closeTop If true, close the ends of the cylinder, otherwise leave them open. | 130 | \param closeTop If true, close the ends of the cylinder, otherwise leave them open. |
131 | \param oblique (to be documented) | 131 | \param oblique (to be documented) |
132 | \return Generated mesh. | 132 | \return Generated mesh. |
133 | */ | 133 | */ |
134 | virtual IMesh* createCylinderMesh(f32 radius, f32 length, | 134 | virtual IMesh* createCylinderMesh(f32 radius, f32 length, |
135 | u32 tesselation, | 135 | u32 tesselation, |
136 | const video::SColor& color=video::SColor(0xffffffff), | 136 | const video::SColor& color=video::SColor(0xffffffff), |
137 | bool closeTop=true, f32 oblique=0.f) const =0; | 137 | bool closeTop=true, f32 oblique=0.f) const =0; |
138 | 138 | ||
139 | //! Create a cone mesh. | 139 | //! Create a cone mesh. |
140 | /** | 140 | /** |
141 | \param radius Radius of the cone. | 141 | \param radius Radius of the cone. |
142 | \param length Length of the cone. | 142 | \param length Length of the cone. |
143 | \param tesselation Number of quads around the circumference of the cone. | 143 | \param tesselation Number of quads around the circumference of the cone. |
144 | \param colorTop The color of the top of the cone. | 144 | \param colorTop The color of the top of the cone. |
145 | \param colorBottom The color of the bottom of the cone. | 145 | \param colorBottom The color of the bottom of the cone. |
146 | \param oblique (to be documented) | 146 | \param oblique (to be documented) |
147 | \return Generated mesh. | 147 | \return Generated mesh. |
148 | */ | 148 | */ |
149 | virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation, | 149 | virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation, |
150 | const video::SColor& colorTop=video::SColor(0xffffffff), | 150 | const video::SColor& colorTop=video::SColor(0xffffffff), |
151 | const video::SColor& colorBottom=video::SColor(0xffffffff), | 151 | const video::SColor& colorBottom=video::SColor(0xffffffff), |
152 | f32 oblique=0.f) const =0; | 152 | f32 oblique=0.f) const =0; |
153 | 153 | ||
154 | //! Create a volume light mesh. | 154 | //! Create a volume light mesh. |
155 | /** | 155 | /** |
156 | \param subdivideU Horizontal patch count. | 156 | \param subdivideU Horizontal patch count. |
157 | \param subdivideV Vertical patch count. | 157 | \param subdivideV Vertical patch count. |
158 | \param footColor Color at the bottom of the light. | 158 | \param footColor Color at the bottom of the light. |
159 | \param tailColor Color at the mid of the light. | 159 | \param tailColor Color at the mid of the light. |
160 | \param lpDistance Virtual distance of the light point for normals. | 160 | \param lpDistance Virtual distance of the light point for normals. |
161 | \param lightDim Dimensions of the light. | 161 | \param lightDim Dimensions of the light. |
162 | \return Generated mesh. | 162 | \return Generated mesh. |
163 | */ | 163 | */ |
164 | virtual IMesh* createVolumeLightMesh( | 164 | virtual IMesh* createVolumeLightMesh( |
165 | const u32 subdivideU=32, const u32 subdivideV=32, | 165 | const u32 subdivideU=32, const u32 subdivideV=32, |
166 | const video::SColor footColor = 0xffffffff, | 166 | const video::SColor footColor = 0xffffffff, |
167 | const video::SColor tailColor = 0xffffffff, | 167 | const video::SColor tailColor = 0xffffffff, |
168 | const f32 lpDistance = 8.f, | 168 | const f32 lpDistance = 8.f, |
169 | const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0; | 169 | const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0; |
170 | }; | 170 | }; |
171 | 171 | ||
172 | 172 | ||
173 | } // end namespace scene | 173 | } // end namespace scene |
174 | } // end namespace irr | 174 | } // end namespace irr |
175 | 175 | ||
176 | #endif // __I_GEOMETRY_CREATOR_H_INCLUDED__ | 176 | #endif // __I_GEOMETRY_CREATOR_H_INCLUDED__ |
177 | 177 | ||