Loading...
Searching...
No Matches
irr::scene::IGeometryCreator Class Referenceabstract

Helper class for creating geometry on the fly. More...

`#include <IGeometryCreator.h>`

Inheritance diagram for irr::scene::IGeometryCreator:

## Public Member Functions

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 * | 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 * | 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.
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.
virtual IMesh * | createSphereMesh (f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16) const =0
| Create a sphere mesh.
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 * | 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.
Public Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Additional Inherited Members

Protected Member Functions inherited from irr::IReferenceCounted
void | setDebugName (const c8 *newName)
| Sets the debug name of the object.

## Detailed Description

Helper class for creating geometry on the fly.

You can get an instance of this class through ISceneManager::getGeometryCreator()

Definition at line 25 of file IGeometryCreator.h.

## Member Function Documentation

## createArrowMesh()

virtual IMesh * irr::scene::IGeometryCreator::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

pure virtual

Create an arrow mesh, composed of a cylinder and a cone.

Parameters

  tesselationCylinder | Number of quads composing the cylinder.
  tesselationCone | Number of triangles composing the cone's roof.
  height | Total height of the arrow
  cylinderHeight | Total height of the cylinder, should be lesser than total height
  widthCylinder | Diameter of the cylinder
  widthCone | Diameter of the cone's base, should be not smaller than the cylinder's diameter
  colorCylinder | color of the cylinder
  colorCone | color of the cone

Returns
  Generated mesh.

## createConeMesh()

virtual IMesh * irr::scene::IGeometryCreator::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

pure virtual

Create a cone mesh.

Parameters

  radius | Radius of the cone.
  length | Length of the cone.
  tesselation | Number of quads around the circumference of the cone.
  colorTop | The color of the top of the cone.
  colorBottom | The color of the bottom of the cone.
  oblique | (to be documented)

Returns
  Generated mesh.

## createCubeMesh()

virtual IMesh * irr::scene::IGeometryCreator::createCubeMesh | ( | const core::vector3df & | size = core::vector3df(5.f, 5.f, 5.f) | ) | const

pure virtual

Creates a simple cube mesh.

Parameters

  size | Dimensions of the cube.

Returns
  Generated mesh.

## createCylinderMesh()

virtual IMesh * irr::scene::IGeometryCreator::createCylinderMesh | ( | f32 | radius,
|  | f32 | length,
|  | u32 | tesselation,
|  | const video::SColor & | color = video::SColor(0xffffffff),
|  | bool | closeTop = true,
|  | f32 | oblique = 0.f ) const

pure virtual

Create a cylinder mesh.

Parameters

  radius | Radius of the cylinder.
  length | Length of the cylinder.
  tesselation | Number of quads around the circumference of the cylinder.
  color | The color of the cylinder.
  closeTop | If true, close the ends of the cylinder, otherwise leave them open.
  oblique | (to be documented)

Returns
  Generated mesh.

## createHillPlaneMesh()

virtual IMesh * irr::scene::IGeometryCreator::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

pure virtual

Create a pseudo-random mesh representing a hilly terrain.

Parameters

  tileSize | The size of each tile.
  tileCount | The number of tiles in each dimension.
  material | The material to apply to the mesh.
  hillHeight | The maximum height of the hills.
  countHills | The number of hills along each dimension.
  textureRepeatCount | The number of times to repeat the material texture along each dimension.

Returns
  Generated mesh.

Referenced by createPlaneMesh().

## createPlaneMesh()

IMesh * irr::scene::IGeometryCreator::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

inline

Create a simple rectangular textured plane mesh.

Parameters

  tileSize | The size of each tile.
  tileCount | The number of tiles in each dimension.
  material | The material to apply to the mesh.
  textureRepeatCount | The number of times to repeat the material texture along each dimension.

Returns
  Generated mesh.

Definition at line 61 of file IGeometryCreator.h.

References createHillPlaneMesh().

## createSphereMesh()

virtual IMesh * irr::scene::IGeometryCreator::createSphereMesh | ( | f32 | radius = 5.f,
|  | u32 | polyCountX = 16,
|  | u32 | polyCountY = 16 ) const

pure virtual

Create a sphere mesh.

Parameters

  radius | Radius of the sphere
  polyCountX | Number of quads used for the horizontal tiling
  polyCountY | Number of quads used for the vertical tiling

Returns
  Generated mesh.

## createTerrainMesh()

virtual IMesh * irr::scene::IGeometryCreator::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

pure virtual

Create a terrain mesh from an image representing a heightfield.

Parameters

  texture | The texture to apply to the terrain.
  heightmap | An image that will be interpreted as a heightmap. The brightness (average color) of each pixel is interpreted as a height, with a 255 brightness pixel producing the maximum height.
  stretchSize | The size that each pixel will produce, i.e. a 512x512 heightmap and a stretchSize of (10.f, 20.f) will produce a mesh of size 5120.f x 10240.f
  maxHeight | The maximum height of the terrain.
  driver | The current video driver.
  defaultVertexBlockSize | (to be documented)
  debugBorders | (to be documented)

Returns
  Generated mesh.

## createVolumeLightMesh()

virtual IMesh * irr::scene::IGeometryCreator::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

pure virtual

Create a volume light mesh.

Parameters

  subdivideU | Horizontal patch count.
  subdivideV | Vertical patch count.
  footColor | Color at the bottom of the light.
  tailColor | Color at the mid of the light.
  lpDistance | Virtual distance of the light point for normals.
  lightDim | Dimensions of the light.

Returns
  Generated mesh.

The documentation for this class was generated from the following file:

- IGeometryCreator.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0