Got blending between materials working with texture atlases.

This commit is contained in:
David Williams
2008-01-16 19:51:47 +00:00
parent 98af071bdd
commit c013b100a2
9 changed files with 158 additions and 57 deletions

View File

@ -11,8 +11,9 @@ namespace Ogre
{
}
SurfaceVertex::SurfaceVertex(UIntVector3 positionToSet, float alphaToSet)
:alpha(alphaToSet)
SurfaceVertex::SurfaceVertex(UIntVector3 positionToSet, float materialToSet, float alphaToSet)
:material(materialToSet)
,alpha(alphaToSet)
,position(positionToSet)
,m_uHash((position.x*(OGRE_REGION_SIDE_LENGTH*2+1)*(OGRE_REGION_SIDE_LENGTH*2+1)) + (position.y*(OGRE_REGION_SIDE_LENGTH*2+1)) + (position.z))
{
@ -31,6 +32,11 @@ namespace Ogre
return alpha;
}
float SurfaceVertex::getMaterial(void) const
{
return material;
}
const SurfaceEdgeIterator& SurfaceVertex::getEdge(void) const
{
return edge;
@ -51,6 +57,11 @@ namespace Ogre
alpha = alphaToSet;
}
void SurfaceVertex::setMaterial(float materialToSet)
{
material = materialToSet;
}
void SurfaceVertex::setEdge(const SurfaceEdgeIterator& edgeToSet)
{
edge = edgeToSet;