Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IGeometryCreator.hpp
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 nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_GEOMETRY_CREATOR_HPP_INCLUDED
6#define NIRT_I_GEOMETRY_CREATOR_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/IMesh.hpp>
10#include <nirtcpp/core/engine/IImage.hpp>
11
12namespace nirt
13{
14namespace video
15{
16 class IVideoDriver;
17 class SMaterial;
18}
19
20namespace scene
21{
22
41
44 {
45 "1BUF_12VTX_NA",
46 "ECMT_6BUF_4VTX_NP",
47 "1BUF_24VTX_NP",
48 0
49 };
50
51
53
55{
56public:
57
59
67 virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f), ECUBE_MESH_TYPE type = ECMT_1BUF_12VTX_NA) const =0;
68
70
80 const core::dimension2d<f32>& tileSize,
81 const core::dimension2d<u32>& tileCount,
82 video::SMaterial* material, f32 hillHeight,
83 const core::dimension2d<f32>& countHills,
84 const core::dimension2d<f32>& textureRepeatCount) const =0;
85
87
95 const core::dimension2d<f32>& tileSize,
96 const core::dimension2d<u32>& tileCount=core::dimension2du(1,1),
97 video::SMaterial* material=0,
98 const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const
99 {
100 return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount);
101 }
102
104
110 virtual IMesh* createGeoplaneMesh(f32 radius = 5.f,
111 u32 rows = 16, u32 columns = 16) const =0;
112
114
130 video::IImage* heightmap,
131 const core::dimension2d<f32>& stretchSize,
132 f32 maxHeight, video::IVideoDriver* driver,
133 const core::dimension2d<u32>& defaultVertexBlockSize,
134 bool debugBorders=false) const =0;
135
137
150 virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4,
151 const u32 tesselationCone = 8, const f32 height = 1.f,
152 const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f,
153 const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF,
154 const video::SColor colorCone = 0xFFFFFFFF) const =0;
155
156
158
164 virtual IMesh* createSphereMesh(f32 radius = 5.f,
165 u32 polyCountX = 16, u32 polyCountY = 16) const =0;
166
168
185 virtual IMesh* createCylinderMesh(f32 radius, f32 length,
186 u32 tesselation,
187 const video::SColor& color=video::SColor(0xffffffff),
188 bool closeTop=true, f32 oblique=0.f, u32 normalType=0) const =0;
189
191
200 virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
201 const video::SColor& colorTop=video::SColor(0xffffffff),
202 const video::SColor& colorBottom=video::SColor(0xffffffff),
203 f32 oblique=0.f) const =0;
204
206
221 virtual IMesh* createTorusMesh(f32 majorRadius, f32 minorRadius,
222 u32 majorSegments = 32, u32 minorSegments = 16,
223 f32 angleStart=0.f, f32 angleEnd=360.f, int capEnds=0) const = 0;
224
226
236 const u32 subdivideU=32, const u32 subdivideV=32,
237 const video::SColor footColor = 0xffffffff,
238 const video::SColor tailColor = 0xffffffff,
239 const f32 lpDistance = 8.f,
240 const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0;
241};
242
243
244} // end namespace scene
245} // end namespace nirt
246
247#endif // NIRT_I_GEOMETRY_CREATOR_HPP_INCLUDED
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Helper class for creating geometry on the fly.
Definition IGeometryCreator.hpp:55
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 * 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.
virtual IMesh * createCylinderMesh(f32 radius, f32 length, u32 tesselation, const video::SColor &color=video::SColor(0xffffffff), bool closeTop=true, f32 oblique=0.f, u32 normalType=0) const =0
Create a cylinder mesh.
virtual IMesh * createTorusMesh(f32 majorRadius, f32 minorRadius, u32 majorSegments=32, u32 minorSegments=16, f32 angleStart=0.f, f32 angleEnd=360.f, int capEnds=0) const =0
Create a torus mesh.
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 * createGeoplaneMesh(f32 radius=5.f, u32 rows=16, u32 columns=16) const =0
Create a geoplane.
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.hpp:94
virtual IMesh * createCubeMesh(const core::vector3df &size=core::vector3df(5.f, 5.f, 5.f), ECUBE_MESH_TYPE type=ECMT_1BUF_12VTX_NA) const =0
Creates a simple cube mesh.
virtual IMesh * createSphereMesh(f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16) const =0
Create a sphere 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.hpp:72
Interface for software image data.
Definition IImage.hpp:26
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.hpp:152
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
Class for holding parameters for a material renderer.
Definition SMaterial.hpp:304
const c8 *const CubeMeshTypeNames[ECMT_COUNT+1]
Names for ECUBE_MESH_TYPE.
Definition IGeometryCreator.hpp:43
ECUBE_MESH_TYPE
Definition IGeometryCreator.hpp:24
@ ECMT_1BUF_24VTX_NP
Single buffer with 24 different vertices, normals are perpendicular to sides.
Definition IGeometryCreator.hpp:36
@ ECMT_1BUF_12VTX_NA
Definition IGeometryCreator.hpp:29
@ ECMT_COUNT
not used, counts the number of enumerated types
Definition IGeometryCreator.hpp:39
@ ECMT_6BUF_4VTX_NP
Definition IGeometryCreator.hpp:33
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
char c8
8 bit character variable.
Definition irrTypes.hpp:37
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print