Skylicht Engine
Loading...
Searching...
No Matches
IGeometryCreator.h
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_GEOMETRY_CREATOR_H_INCLUDED__
6#define __I_GEOMETRY_CREATOR_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "IMesh.h"
10#include "IImage.h"
11
12namespace irr
13{
14namespace video
15{
16 class IVideoDriver;
17 class SMaterial;
18}
19
20namespace scene
21{
22
24
26{
27public:
28
30
34 virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0;
35
37
47 const core::dimension2d<f32>& tileSize,
48 const core::dimension2d<u32>& tileCount,
49 video::SMaterial* material, f32 hillHeight,
50 const core::dimension2d<f32>& countHills,
51 const core::dimension2d<f32>& textureRepeatCount) const =0;
52
54
62 const core::dimension2d<f32>& tileSize,
63 const core::dimension2d<u32>& tileCount=core::dimension2du(1,1),
64 video::SMaterial* material=0,
65 const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const
66 {
67 return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount);
68 }
69
71
77 virtual IMesh* createGeoplaneMesh(f32 radius = 5.f,
78 u32 rows = 16, u32 columns = 16) const =0;
79
81
97 video::IImage* heightmap,
98 const core::dimension2d<f32>& stretchSize,
99 f32 maxHeight, video::IVideoDriver* driver,
100 const core::dimension2d<u32>& defaultVertexBlockSize,
101 bool debugBorders=false) const =0;
102
104
117 virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4,
118 const u32 tesselationCone = 8, const f32 height = 1.f,
119 const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f,
120 const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF,
121 const video::SColor colorCone = 0xFFFFFFFF) const =0;
122
123
125
131 virtual IMesh* createSphereMesh(f32 radius = 5.f,
132 u32 polyCountX = 16, u32 polyCountY = 16) const =0;
133
135
144 virtual IMesh* createCylinderMesh(f32 radius, f32 length,
145 u32 tesselation,
146 const video::SColor& color=video::SColor(0xffffffff),
147 bool closeTop=true, f32 oblique=0.f) const =0;
148
150
159 virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
160 const video::SColor& colorTop=video::SColor(0xffffffff),
161 const video::SColor& colorBottom=video::SColor(0xffffffff),
162 f32 oblique=0.f) const =0;
163
165
175 const u32 subdivideU=32, const u32 subdivideV=32,
176 const video::SColor footColor = 0xffffffff,
177 const video::SColor tailColor = 0xffffffff,
178 const f32 lpDistance = 8.f,
179 const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0;
180};
181
182
183} // end namespace scene
184} // end namespace irr
185
186#endif // __I_GEOMETRY_CREATOR_H_INCLUDED__
187
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:50
Specifies a 2 dimensional size.
Definition dimension2d.h:21
Helper class for creating geometry on the fly.
Definition IGeometryCreator.h:26
virtual IMesh * createGeoplaneMesh(f32 radius=5.f, u32 rows=16, u32 columns=16) const =0
Create a geoplane.
virtual IMesh * createTerrainMesh(video::IImage *texture, video::IImage *heightmap, const core::dimension2d< f32 > &stretchSize, f32 maxHeight, video::IVideoDriver *driver, const core::dimension2d< u32 > &defaultVertexBlockSize, bool debugBorders=false) const =0
Create a terrain mesh from an image representing a heightfield.
virtual IMesh * createSphereMesh(f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16) const =0
Create a sphere mesh.
virtual IMesh * createArrowMesh(const u32 tesselationCylinder=4, const u32 tesselationCone=8, const f32 height=1.f, const f32 cylinderHeight=0.6f, const f32 widthCylinder=0.05f, const f32 widthCone=0.3f, const video::SColor colorCylinder=0xFFFFFFFF, const video::SColor colorCone=0xFFFFFFFF) const =0
Create an arrow mesh, composed of a cylinder and a cone.
virtual IMesh * createConeMesh(f32 radius, f32 length, u32 tesselation, const video::SColor &colorTop=video::SColor(0xffffffff), const video::SColor &colorBottom=video::SColor(0xffffffff), f32 oblique=0.f) const =0
Create a cone mesh.
IMesh * createPlaneMesh(const core::dimension2d< f32 > &tileSize, const core::dimension2d< u32 > &tileCount=core::dimension2du(1, 1), video::SMaterial *material=0, const core::dimension2df &textureRepeatCount=core::dimension2df(1.f, 1.f)) const
Create a simple rectangular textured plane mesh.
Definition IGeometryCreator.h:61
virtual IMesh * createHillPlaneMesh(const core::dimension2d< f32 > &tileSize, const core::dimension2d< u32 > &tileCount, video::SMaterial *material, f32 hillHeight, const core::dimension2d< f32 > &countHills, const core::dimension2d< f32 > &textureRepeatCount) const =0
Create a pseudo-random mesh representing a hilly terrain.
virtual IMesh * createCubeMesh(const core::vector3df &size=core::vector3df(5.f, 5.f, 5.f)) const =0
Creates a simple cube mesh.
virtual IMesh * createCylinderMesh(f32 radius, f32 length, u32 tesselation, const video::SColor &color=video::SColor(0xffffffff), bool closeTop=true, f32 oblique=0.f) const =0
Create a cylinder mesh.
virtual IMesh * createVolumeLightMesh(const u32 subdivideU=32, const u32 subdivideV=32, const video::SColor footColor=0xffffffff, const video::SColor tailColor=0xffffffff, const f32 lpDistance=8.f, const core::vector3df &lightDim=core::vector3df(1.f, 1.2f, 1.f)) const =0
Create a volume light mesh.
Class which holds the geometry of an object.
Definition IMesh.h:24
Interface for software image data.
Definition IImage.h:23
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.h:388
Class representing a 32 bit ARGB color.
Definition SColor.h:285
Struct for holding parameters for a material renderer.
Definition SMaterial.h:255
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
dimension2d< u32 > dimension2du
Typedef for an unsigned integer dimension.
Definition dimension2d.h:212
dimension2d< f32 > dimension2df
Typedef for an f32 dimension.
Definition dimension2d.h:210
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CIndexBuffer.h:13
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
Everything in the Irrlicht Engine can be found in this namespace.
Definition Skylicht.h:33
float f32
32 bit floating point variable.
Definition irrTypes.h:104
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58