Started removing OgreVector3 from main library.

This commit is contained in:
David Williams
2008-02-09 17:49:34 +00:00
parent f263714ebc
commit 38b266d261
9 changed files with 70 additions and 68 deletions

View File

@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <OgreVector3.h>
#include "Vector.hpp"
namespace Ogre
{
template <typename Type> class IntegralVector3
@ -66,9 +68,9 @@ namespace Ogre
return false; //They are equal
}
Vector3 toOgreVector3(void) const
Vector3DFloat toVector3DFloat(void) const
{
return Vector3(Real(x), Real(y), Real(z));
return Vector3DFloat(x, y, z);
}
Type x;

View File

@ -32,6 +32,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "SurfaceVertex.h"
#include "RegionGeometry.h"
#include "Vector.hpp"
#include <set>
namespace Ogre
@ -64,13 +66,13 @@ namespace Ogre
std::list<RegionGeometry> getChangedRegionGeometry(void);
void setAllUpToDateFlagsTo(bool newUpToDateValue);
void createSphereAt(Vector3 centre, Real radius, boost::uint8_t value, bool painting);
void createSphereAt(Vector3DFloat centre, Real radius, boost::uint8_t value, bool painting);
void generateLevelVolume(void);
void generateMeshDataForRegion(boost::uint16_t regionX,boost:: uint16_t regionY, boost::uint16_t regionZ, IndexedSurfacePatch* singleMaterialPatch, IndexedSurfacePatch* multiMaterialPatch) const;
bool containsPoint(Vector3 pos, float boundary);
bool containsPoint(Vector3DFloat pos, float boundary);
bool containsPoint(IntVector3 pos, boost::uint16_t boundary);
@ -81,7 +83,7 @@ namespace Ogre
//SurfacePatchRenderable* m_singleMaterialSurfaces[OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS][OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS][OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS];
//SurfacePatchRenderable* m_multiMaterialSurfaces[OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS][OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS][OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS];
Vector3 computeNormal(const Vector3& position, NormalGenerationMethod normalGenerationMethod) const;
Vector3DFloat computeNormal(const Vector3DFloat& position, NormalGenerationMethod normalGenerationMethod) const;
public:
void markVoxelChanged(boost::uint16_t x, boost::uint16_t y, boost::uint16_t z);

View File

@ -34,7 +34,7 @@ namespace Ogre
public:
SurfaceVertex();
SurfaceVertex(UIntVector3 positionToSet, float materialToSet, float alphaToSet);
SurfaceVertex(UIntVector3 positionToSet, Vector3 normalToSet);
SurfaceVertex(UIntVector3 positionToSet, Vector3DFloat normalToSet);
friend bool operator==(const SurfaceVertex& lhs, const SurfaceVertex& rhs);
friend bool operator < (const SurfaceVertex& lhs, const SurfaceVertex& rhs);
@ -42,19 +42,19 @@ namespace Ogre
float getAlpha(void) const;
const SurfaceEdgeIterator& getEdge(void) const;
float getMaterial(void) const;
const Vector3& getNormal(void) const;
const Vector3DFloat& getNormal(void) const;
const UIntVector3& getPosition(void) const;
void setAlpha(float alphaToSet);
void setEdge(const SurfaceEdgeIterator& edgeToSet);
void setMaterial(float materialToSet);
void setNormal(const Vector3& normalToSet);
void setNormal(const Vector3DFloat& normalToSet);
std::string toString(void) const;
private:
UIntVector3 position;
Vector3 normal;
Vector3DFloat normal;
float material;
float alpha;

View File

@ -44,7 +44,7 @@ namespace Ogre
Block* getBlock(boost::uint16_t index);
bool containsPoint(Vector3 pos, float boundary);
bool containsPoint(Vector3DFloat pos, float boundary);
bool containsPoint(IntVector3 pos, boost::uint16_t boundary);
bool loadFromFile(const std::string& sFilename);

View File

@ -42,9 +42,9 @@ namespace Ogre
float getAveragedVoxelAt(const boost::uint16_t xPosition, const boost::uint16_t yPosition, const boost::uint16_t zPosition, boost::uint16_t size) const;
//FIXME - this shouldn't return float vector
Vector3 getCentralDifferenceGradient(void) const;
Vector3 getAveragedCentralDifferenceGradient(void) const;
Vector3 getSobelGradient(void) const;
Vector3DFloat getCentralDifferenceGradient(void) const;
Vector3DFloat getAveragedCentralDifferenceGradient(void) const;
Vector3DFloat getSobelGradient(void) const;
boost::uint16_t getPosX(void);
boost::uint16_t getPosY(void);