Commit 582cb750 authored by hybrid's avatar hybrid

Merge from 1.7 branch. Fixes for SSharedMeshBuffer and matrix4

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3925 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 39e76d36
......@@ -88,6 +88,12 @@ namespace scene
return Indices.size();
}
//! Get type of index data which is stored in this meshbuffer.
virtual video::E_INDEX_TYPE getIndexType() const
{
return video::EIT_16BIT;
}
//! returns an axis aligned bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const
{
......@@ -119,6 +125,54 @@ namespace scene
}
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const
{
if (Vertices)
return (*Vertices)[Indices[i]].Pos;
else
return core::vector3df();
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i)
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const
{
if (Vertices)
return (*Vertices)[Indices[i]].Normal;
else
return core::vector3df();
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i)
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const
{
if (Vertices)
return (*Vertices)[Indices[i]].TCoords;
else
return core::vector2df();
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i)
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].TCoords;
}
//! append the vertices and indices to the current buffer
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {}
......
......@@ -99,7 +99,10 @@ struct SSkinMeshBuffer : public IMeshBuffer
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const { return video::EIT_16BIT; }
virtual video::E_INDEX_TYPE getIndexType() const
{
return video::EIT_16BIT;
}
//! Get pointer to index array
virtual const u16* getIndices() const
......
......@@ -1619,7 +1619,7 @@ namespace core
M[12] = 0;
M[13] = 0;
M[14] = (T)(zNear/(zNear-zFar));
M[15] = -1;
M[15] = 1;
#if defined ( USE_MATRIX_TEST )
definitelyIdentityMatrix=false;
......
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