Started getting rid of IntegrealVector3.
Also added ForwardDeclarations.h
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#pragma region License
|
||||
/******************************************************************************
|
||||
This file is part of a voxel plugin for OGRE
|
||||
Copyright (C) 2006 David Williams
|
||||
@ -16,19 +17,26 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
******************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef __Block_H__
|
||||
#define __Block_H__
|
||||
|
||||
#pragma region Standard Headers
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Boost Headers
|
||||
#include "boost/cstdint.hpp"
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PolyVox Headers
|
||||
#include "Constants.h"
|
||||
|
||||
#include "TypeDef.h"
|
||||
#pragma endregion
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
|
||||
class VOXEL_SCENE_MANAGER_API Block
|
||||
class POLYVOX_API Block
|
||||
{
|
||||
//Make VolumeIterator a friend
|
||||
friend class VolumeIterator;
|
||||
|
20
include/ForwardDeclarations.h
Normal file
20
include/ForwardDeclarations.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef __ForwardDeclarations_H__
|
||||
#define __ForwardDeclarations_H__
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class Block;
|
||||
class IndexedSurfacePatch;
|
||||
class IntegrealVector3;
|
||||
class PolyVoxSceneManager;
|
||||
class RegionGeometry;
|
||||
class SurfaceEdge;
|
||||
class SurfaceTriange;
|
||||
class SurfaceTypes;
|
||||
class SurfaceVertex;
|
||||
class Vector;
|
||||
class Volume;
|
||||
class VolumeIterator;
|
||||
}
|
||||
|
||||
#endif
|
@ -9,7 +9,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Constants.h"
|
||||
#include "IntegralVector3.h"
|
||||
#include "SurfaceTypes.h"
|
||||
#include "SurfaceVertex.h"
|
||||
#include "TypeDef.h"
|
||||
@ -18,7 +17,7 @@
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class VOXEL_SCENE_MANAGER_API IndexedSurfacePatch
|
||||
class POLYVOX_API IndexedSurfacePatch
|
||||
{
|
||||
public:
|
||||
IndexedSurfacePatch(bool allowDuplicateVertices);
|
||||
|
@ -46,7 +46,7 @@ namespace PolyVox
|
||||
};
|
||||
|
||||
/// Voxel scene manager
|
||||
class VOXEL_SCENE_MANAGER_API PolyVoxSceneManager
|
||||
class POLYVOX_API PolyVoxSceneManager
|
||||
{
|
||||
public:
|
||||
//Constructors, etc
|
||||
|
@ -34,7 +34,7 @@ namespace PolyVox
|
||||
bool m_bContainsSingleMaterialPatch;
|
||||
bool m_bContainsMultiMaterialPatch;
|
||||
|
||||
UIntVector3 m_v3dRegionPosition;
|
||||
Vector3DInt32 m_v3dRegionPosition;
|
||||
IndexedSurfacePatch* m_patchSingleMaterial;
|
||||
IndexedSurfacePatch* m_patchMultiMaterial;
|
||||
|
||||
|
@ -27,12 +27,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class VOXEL_SCENE_MANAGER_API SurfaceVertex
|
||||
class POLYVOX_API SurfaceVertex
|
||||
{
|
||||
public:
|
||||
SurfaceVertex();
|
||||
SurfaceVertex(UIntVector3 positionToSet, float materialToSet, float alphaToSet);
|
||||
SurfaceVertex(UIntVector3 positionToSet, Vector3DFloat normalToSet);
|
||||
SurfaceVertex(Vector3DUint32 positionToSet, float materialToSet, float alphaToSet);
|
||||
SurfaceVertex(Vector3DUint32 positionToSet, Vector3DFloat normalToSet);
|
||||
|
||||
friend bool operator==(const SurfaceVertex& lhs, const SurfaceVertex& rhs);
|
||||
friend bool operator < (const SurfaceVertex& lhs, const SurfaceVertex& rhs);
|
||||
@ -41,7 +41,7 @@ namespace PolyVox
|
||||
const SurfaceEdgeIterator& getEdge(void) const;
|
||||
float getMaterial(void) const;
|
||||
const Vector3DFloat& getNormal(void) const;
|
||||
const UIntVector3& getPosition(void) const;
|
||||
const Vector3DUint32& getPosition(void) const;
|
||||
|
||||
void setAlpha(float alphaToSet);
|
||||
void setEdge(const SurfaceEdgeIterator& edgeToSet);
|
||||
@ -51,7 +51,7 @@ namespace PolyVox
|
||||
std::string tostring(void) const;
|
||||
|
||||
private:
|
||||
UIntVector3 position;
|
||||
Vector3DUint32 position;
|
||||
Vector3DFloat normal;
|
||||
float material;
|
||||
float alpha;
|
||||
|
35
include/TypeDef.h
Normal file
35
include/TypeDef.h
Normal file
@ -0,0 +1,35 @@
|
||||
/******************************************************************************
|
||||
This file is part of a voxel plugin for OGRE
|
||||
Copyright (C) 2006 David Williams
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
******************************************************************************/
|
||||
|
||||
//Dave, maybe make use of OgrePlatform.h instead?
|
||||
// I think use _OgreExport instead of POLYVOX_API and define OGRE_NONCLIENT_BUILD instead of POLYVOX_EXPORT?
|
||||
#ifndef __TYPEDEF_H__
|
||||
#define __TYPEDEF_H__
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef POLYVOX_EXPORT
|
||||
#define POLYVOX_API __declspec(dllexport)
|
||||
#else
|
||||
#define POLYVOX_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define POLYVOX_API __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
#endif
|
@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
namespace PolyVox
|
||||
{
|
||||
class VOXEL_SCENE_MANAGER_API Volume
|
||||
class POLYVOX_API Volume
|
||||
{
|
||||
//Make VolumeIterator a friend
|
||||
friend class VolumeIterator;
|
||||
|
@ -27,7 +27,7 @@ namespace PolyVox
|
||||
{
|
||||
class Volume;
|
||||
|
||||
class VOXEL_SCENE_MANAGER_API VolumeIterator
|
||||
class POLYVOX_API VolumeIterator
|
||||
{
|
||||
public:
|
||||
VolumeIterator(Volume& volume);
|
||||
|
Reference in New Issue
Block a user