Duckcpp 2.1.0
Duckcpp 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 duckcpp/duckcpp.hpp
4
5#ifndef DCPP_I_GEOMETRY_CREATOR_HPP_INCLUDED
6#define DCPP_I_GEOMETRY_CREATOR_HPP_INCLUDED
7
8#include <duckcpp/core/engine/IReferenceCounted.hpp>
9#include <duckcpp/core/engine/IMesh.hpp>
10#include <duckcpp/core/engine/IImage.hpp>
11
12namespace dcpp
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
68
70
80 const dcpp::nub::dimension2df& tileSize,
81 const dcpp::nub::dimension2du& tileCount,
82 dcpp::video::SMaterial* material, dcpp::float32_kt hillHeight,
83 const dcpp::nub::dimension2df& countHills,
84 const dcpp::nub::dimension2df& textureRepeatCount) const =0;
85
87
95 const dcpp::nub::dimension2df& tileSize,
97 dcpp::video::SMaterial* material=0,
98 const dcpp::nub::dimension2df& textureRepeatCount=dcpp::nub::dimension2df(1.f,1.f)) const
99 {
100 return createHillPlaneMesh(tileSize, tileCount, material, 0.f, dcpp::nub::dimension2df(), textureRepeatCount);
101 }
102
104
111 dcpp::uint32_kt rows = 16, dcpp::uint32_kt columns = 16) const =0;
112
114
130 dcpp::video::IImage* heightmap,
131 const dcpp::nub::dimension2df& stretchSize,
133 const dcpp::nub::dimension2du& defaultVertexBlockSize,
134 bool debugBorders=false) const =0;
135
137
150 virtual IMesh* createArrowMesh(const dcpp::uint32_kt tesselationCylinder = 4,
151 const dcpp::uint32_kt tesselationCone = 8, const dcpp::float32_kt height = 1.f,
152 const dcpp::float32_kt cylinderHeight = 0.6f, const dcpp::float32_kt widthCylinder = 0.05f,
153 const dcpp::float32_kt widthCone = 0.3f, const dcpp::video::SColor colorCylinder = 0xFFFFFFFF,
154 const dcpp::video::SColor colorCone = 0xFFFFFFFF) const =0;
155
156
158
165 dcpp::uint32_kt polyCountX = 16, dcpp::uint32_kt polyCountY = 16) const =0;
166
168
186 dcpp::uint32_kt tesselation,
187 const dcpp::video::SColor& color=dcpp::video::SColor(0xffffffff),
188 bool closeTop=true, dcpp::float32_kt oblique=0.f, dcpp::uint32_kt normalType=0) const =0;
189
191
201 const dcpp::video::SColor& colorTop=dcpp::video::SColor(0xffffffff),
202 const dcpp::video::SColor& colorBottom=dcpp::video::SColor(0xffffffff),
203 dcpp::float32_kt oblique=0.f) const =0;
204
206
221 virtual IMesh* createTorusMesh(dcpp::float32_kt majorRadius, dcpp::float32_kt minorRadius,
222 dcpp::uint32_kt majorSegments = 32, dcpp::uint32_kt minorSegments = 16,
223 dcpp::float32_kt angleStart=0.f, dcpp::float32_kt angleEnd=360.f, int capEnds=0) const = 0;
224
226
236 const dcpp::uint32_kt subdivideU=32, const dcpp::uint32_kt subdivideV=32,
237 const dcpp::video::SColor footColor = 0xffffffff,
238 const dcpp::video::SColor tailColor = 0xffffffff,
239 const dcpp::float32_kt lpDistance = 8.f,
240 const dcpp::nub::vector3df& lightDim = dcpp::nub::vector3df(1.f,1.2f,1.f)) const =0;
241};
242
243
244} // end namespace scene
245} // end namespace dcpp
246
247#endif // DCPP_I_GEOMETRY_CREATOR_HPP_INCLUDED
Base class of most objects of the Duckcpp Engine.
Definition IReferenceCounted.hpp:46
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Specifies a 2 dimensional size.
Definition dimension2d.hpp:21
3d vector template class with lots of operators and methods.
Definition vector3d.hpp:32
Helper class for creating geometry on the fly.
Definition IGeometryCreator.hpp:55
virtual IMesh * createSphereMesh(dcpp::float32_kt radius=5.f, dcpp::uint32_kt polyCountX=16, dcpp::uint32_kt polyCountY=16) const =0
Create a sphere mesh.
virtual IMesh * createArrowMesh(const dcpp::uint32_kt tesselationCylinder=4, const dcpp::uint32_kt tesselationCone=8, const dcpp::float32_kt height=1.f, const dcpp::float32_kt cylinderHeight=0.6f, const dcpp::float32_kt widthCylinder=0.05f, const dcpp::float32_kt widthCone=0.3f, const dcpp::video::SColor colorCylinder=0xFFFFFFFF, const dcpp::video::SColor colorCone=0xFFFFFFFF) const =0
Create an arrow mesh, composed of a cylinder and a cone.
virtual IMesh * createTerrainMesh(dcpp::video::IImage *texture, dcpp::video::IImage *heightmap, const dcpp::nub::dimension2df &stretchSize, dcpp::float32_kt maxHeight, dcpp::video::IVideoDriver *driver, const dcpp::nub::dimension2du &defaultVertexBlockSize, bool debugBorders=false) const =0
Create a terrain mesh from an image representing a heightfield.
virtual IMesh * createVolumeLightMesh(const dcpp::uint32_kt subdivideU=32, const dcpp::uint32_kt subdivideV=32, const dcpp::video::SColor footColor=0xffffffff, const dcpp::video::SColor tailColor=0xffffffff, const dcpp::float32_kt lpDistance=8.f, const dcpp::nub::vector3df &lightDim=dcpp::nub::vector3df(1.f, 1.2f, 1.f)) const =0
Create a volume light mesh.
virtual IMesh * createTorusMesh(dcpp::float32_kt majorRadius, dcpp::float32_kt minorRadius, dcpp::uint32_kt majorSegments=32, dcpp::uint32_kt minorSegments=16, dcpp::float32_kt angleStart=0.f, dcpp::float32_kt angleEnd=360.f, int capEnds=0) const =0
Create a torus mesh.
virtual IMesh * createCylinderMesh(dcpp::float32_kt radius, dcpp::float32_kt length, dcpp::uint32_kt tesselation, const dcpp::video::SColor &color=dcpp::video::SColor(0xffffffff), bool closeTop=true, dcpp::float32_kt oblique=0.f, dcpp::uint32_kt normalType=0) const =0
Create a cylinder mesh.
virtual IMesh * createConeMesh(dcpp::float32_kt radius, dcpp::float32_kt length, dcpp::uint32_kt tesselation, const dcpp::video::SColor &colorTop=dcpp::video::SColor(0xffffffff), const dcpp::video::SColor &colorBottom=dcpp::video::SColor(0xffffffff), dcpp::float32_kt oblique=0.f) const =0
Create a cone mesh.
virtual IMesh * createCubeMesh(const dcpp::nub::vector3df &size=dcpp::nub::vector3df(5.f, 5.f, 5.f), ECUBE_MESH_TYPE type=ECMT_1BUF_12VTX_NA) const =0
Creates a simple cube mesh.
IMesh * createPlaneMesh(const dcpp::nub::dimension2df &tileSize, const dcpp::nub::dimension2du &tileCount=dcpp::nub::dimension2du(1, 1), dcpp::video::SMaterial *material=0, const dcpp::nub::dimension2df &textureRepeatCount=dcpp::nub::dimension2df(1.f, 1.f)) const
Create a simple rectangular textured plane mesh.
Definition IGeometryCreator.hpp:94
virtual IMesh * createGeoplaneMesh(dcpp::float32_kt radius=5.f, dcpp::uint32_kt rows=16, dcpp::uint32_kt columns=16) const =0
Create a geoplane.
virtual IMesh * createHillPlaneMesh(const dcpp::nub::dimension2df &tileSize, const dcpp::nub::dimension2du &tileCount, dcpp::video::SMaterial *material, dcpp::float32_kt hillHeight, const dcpp::nub::dimension2df &countHills, const dcpp::nub::dimension2df &textureRepeatCount) const =0
Create a pseudo-random mesh representing a hilly terrain.
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
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_6BUF_4VTX_NP
Definition IGeometryCreator.hpp:33
@ ECMT_COUNT
not used, counts the number of enumerated types
Definition IGeometryCreator.hpp:39
@ ECMT_1BUF_12VTX_NA
Definition IGeometryCreator.hpp:29
const dcpp::char_kt *const CubeMeshTypeNames[ECMT_COUNT+1]
Names for ECUBE_MESH_TYPE.
Definition IGeometryCreator.hpp:43
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
char char_kt
8 bit character variable.
Definition irrTypes.hpp:37
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108

Duckcpp    @cppfx.xyz