Irrlicht 3D Engine: IGeometryCreator.h Source File

| Irrlicht 3D Engine |

IGeometryCreator.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __I_GEOMETRY_CREATOR_H_INCLUDED__
    00006 #define __I_GEOMETRY_CREATOR_H_INCLUDED__
    00007
    00008 #include "IReferenceCounted.h"
    00009 #include "IMesh.h"
    00010 #include "IImage.h"
    00011
    00012 namespace irr
    00013 {
    00014 namespace video
    00015 {
    00016     class IVideoDriver;
    00017     class SMaterial;
    00018 }
    00019
    00020 namespace scene
    00021 {
    00022
    00024
    00025 class IGeometryCreator : public IReferenceCounted
    00026 {
    00027 public:
    00028
    00030
    00034     virtual IMesh* createCubeMesh(const core::vector3df& size=core::vector3df(5.f,5.f,5.f)) const =0;
    00035
    00037
    00046     virtual IMesh* createHillPlaneMesh(
    00047             const core::dimension2d<f32>& tileSize,
    00048             const core::dimension2d<u32>& tileCount,
    00049             video::SMaterial* material, f32 hillHeight,
    00050             const core::dimension2d<f32>& countHills,
    00051             const core::dimension2d<f32>& textureRepeatCount) const =0;
    00052
    00054
    00061     IMesh* createPlaneMesh(
    00062             const core::dimension2d<f32>& tileSize,
    00063             const core::dimension2d<u32>& tileCount=core::dimension2du(1,1),
    00064             video::SMaterial* material=0,
    00065             const core::dimension2df& textureRepeatCount=core::dimension2df(1.f,1.f)) const
    00066     {
    00067         return createHillPlaneMesh(tileSize, tileCount, material, 0.f, core::dimension2df(), textureRepeatCount);
    00068     }
    00069
    00071
    00086     virtual IMesh* createTerrainMesh(video::IImage* texture,
    00087             video::IImage* heightmap,
    00088             const core::dimension2d<f32>& stretchSize,
    00089             f32 maxHeight, video::IVideoDriver* driver,
    00090             const core::dimension2d<u32>& defaultVertexBlockSize,
    00091             bool debugBorders=false) const =0;
    00092
    00094
    00107     virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4,
    00108             const u32 tesselationCone = 8, const f32 height = 1.f,
    00109             const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f,
    00110             const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF,
    00111             const video::SColor colorCone = 0xFFFFFFFF) const =0;
    00112
    00113
    00115
    00121     virtual IMesh* createSphereMesh(f32 radius = 5.f,
    00122             u32 polyCountX = 16, u32 polyCountY = 16) const =0;
    00123
    00125
    00134     virtual IMesh* createCylinderMesh(f32 radius, f32 length,
    00135             u32 tesselation,
    00136             const video::SColor& color=video::SColor(0xffffffff),
    00137             bool closeTop=true, f32 oblique=0.f) const =0;
    00138
    00140
    00149     virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
    00150             const video::SColor& colorTop=video::SColor(0xffffffff),
    00151             const video::SColor& colorBottom=video::SColor(0xffffffff),
    00152             f32 oblique=0.f) const =0;
    00153
    00155
    00164     virtual IMesh* createVolumeLightMesh(
    00165             const u32 subdivideU=32, const u32 subdivideV=32,
    00166             const video::SColor footColor = 0xffffffff,
    00167             const video::SColor tailColor = 0xffffffff,
    00168             const f32 lpDistance = 8.f,
    00169             const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const =0;
    00170 };
    00171
    00172
    00173 } // end namespace scene
    00174 } // end namespace irr
    00175
    00176 #endif // __I_GEOMETRY_CREATOR_H_INCLUDED__
    00177