PolyVox now returns vertex positions as floats rather than ints.

Avoids converting and scaling in the engine.
This commit is contained in:
David Williams
2008-04-16 19:56:07 +00:00
parent 1d8fc1c544
commit 2bc1fc2b88
3 changed files with 48 additions and 43 deletions

View File

@ -30,8 +30,8 @@ namespace PolyVox
{
public:
SurfaceVertex();
SurfaceVertex(Vector3DUint32 positionToSet, float materialToSet, float alphaToSet);
SurfaceVertex(Vector3DUint32 positionToSet, Vector3DFloat normalToSet);
SurfaceVertex(Vector3DFloat positionToSet, float materialToSet, float alphaToSet);
SurfaceVertex(Vector3DFloat positionToSet, Vector3DFloat normalToSet);
friend bool operator==(const SurfaceVertex& lhs, const SurfaceVertex& rhs);
friend bool operator < (const SurfaceVertex& lhs, const SurfaceVertex& rhs);
@ -40,7 +40,7 @@ namespace PolyVox
const SurfaceEdgeIterator& getEdge(void) const;
float getMaterial(void) const;
const Vector3DFloat& getNormal(void) const;
const Vector3DUint32& getPosition(void) const;
const Vector3DFloat& getPosition(void) const;
void setAlpha(float alphaToSet);
void setEdge(const SurfaceEdgeIterator& edgeToSet);
@ -50,7 +50,7 @@ namespace PolyVox
std::string tostring(void) const;
private:
Vector3DUint32 position;
Vector3DFloat position;
Vector3DFloat normal;
float material;
float alpha;