Commit 0ebbe960 authored by hybrid's avatar hybrid

Moved the arrow mesh parts into separate mesh constructor methods for cylinder...

Moved the arrow mesh parts into separate mesh constructor methods for cylinder and cone. Not yet exposed in the API.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1410 dfc29bdd-3216-0410-991c-e03cc46cb475
parent d0888a25
......@@ -22,9 +22,6 @@ namespace scene
{
public:
//! Destructor
virtual ~IMesh() { }
//! Returns the amount of mesh buffers.
/** \return Returns the amount of mesh buffers (IMeshBuffer) in this mesh. */
virtual u32 getMeshBufferCount() const = 0;
......
......@@ -893,6 +893,15 @@ namespace scene
const core::dimension2d<s32>& defaultVertexBlockSize = core::dimension2d<s32>(64,64)) = 0;
//! add a static arrow mesh to the meshpool
/** \param name Name of the mesh
\param vtxColor0 color of the cylinder
\param vtxColor1 color of the cone
\param tesselationCylinder Number of quads the cylinder side consists of
\param tesselationCone Number of triangles the cone's roof consits of
\param height Total height of the arrow
\param cylinderHeight Total height of the cylinder, should be lesser than total height
\param width0 Diameter of the cylinder
\param width1 Diameter of the cone's base, should be not smaller than the cylinder's diameter */
virtual IAnimatedMesh* addArrowMesh(const c8* name,
video::SColor vtxColor0=0xFFFFFFFF,
video::SColor vtxColor1=0xFFFFFFFF,
......@@ -901,6 +910,10 @@ namespace scene
f32 width0=0.05f, f32 width1=0.3f) = 0;
//! add a static sphere mesh to the meshpool
/** \param name Name of the mesh
\param radius Radius of the sphere
\param polyCountX Number of quads used for the horizontal tiling
\param polyCountY Number of quads used for the vertical tiling */
virtual IAnimatedMesh* addSphereMesh(const c8* name,
f32 radius=5.f, u32 polyCountX = 16,
u32 polyCountY = 16) = 0;
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ public:
static IMesh* createTerrainMesh(video::IImage* texture,
video::IImage* heightmap, const core::dimension2d<f32>& stretchSize,
f32 maxHeight, video::IVideoDriver* driver,
const core::dimension2d<s32> defaultVertexBlockSize,
const core::dimension2d<s32>& defaultVertexBlockSize,
bool debugBorders=false);
static IMesh* createArrowMesh(const u32 tesselationCylinder,
......@@ -44,6 +44,10 @@ public:
const video::SColor vtxColor1);
static IMesh* createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY);
static IMesh* createCylinderMesh(f32 radius, f32 length, u32 tesselation, const video::SColor& color=video::SColor(0xffffffff), bool closeTop=true, f32 oblique=0.f);
static 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);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment