Started getting rid of IntegrealVector3.

Also added ForwardDeclarations.h
This commit is contained in:
David Williams
2008-02-10 21:58:35 +00:00
parent 76df5e00b5
commit e180f67bae
14 changed files with 157 additions and 94 deletions

View File

@ -11,20 +11,20 @@ namespace PolyVox
{
}
SurfaceVertex::SurfaceVertex(UIntVector3 positionToSet, float materialToSet, float alphaToSet)
SurfaceVertex::SurfaceVertex(Vector3DUint32 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))
,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()))
{
}
SurfaceVertex::SurfaceVertex(UIntVector3 positionToSet, Vector3DFloat normalToSet)
SurfaceVertex::SurfaceVertex(Vector3DUint32 positionToSet, Vector3DFloat normalToSet)
:position(positionToSet)
,normal(normalToSet)
{
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);
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());
}
float SurfaceVertex::getAlpha(void) const
@ -47,7 +47,7 @@ namespace PolyVox
return normal;
}
const UIntVector3& SurfaceVertex::getPosition(void) const
const Vector3DUint32& SurfaceVertex::getPosition(void) const
{
return position;
}
@ -76,7 +76,7 @@ namespace PolyVox
std::string SurfaceVertex::tostring(void) const
{
std::stringstream ss;
ss << "SurfaceVertex: Position = (" << position.x << "," << position.y << "," << position.z << "), Normal = " << normal;
ss << "SurfaceVertex: Position = (" << position.x() << "," << position.y() << "," << position.z() << "), Normal = " << normal;
return ss.str();
}