Separated getChangedRegionGeometry() from _findVisibleObjects().

This commit is contained in:
David Williams
2008-01-19 22:14:51 +00:00
parent b41793b520
commit e368926b5f
5 changed files with 217 additions and 155 deletions

View File

@ -41,6 +41,13 @@ namespace Ogre
{
}
void setData(Type xToSet, Type yToSet, Type zToSet)
{
x = xToSet;
y = yToSet;
z = zToSet;
}
bool operator==(const IntegralVector3<Type>& rhs) const throw()
{
return ((x == rhs.x) && (y == rhs.y) && (z == rhs.z));

View File

@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "TypeDef.h"
#include "Volume.h"
#include "SurfaceVertex.h"
#include "RegionGeometry.h"
#include <set>
@ -73,7 +74,9 @@ namespace Ogre
void setNormalGenerationMethod(NormalGenerationMethod method);
void _findVisibleObjects(Camera* cam, VisibleObjectsBoundsInfo * visibleBounds, bool onlyShadowCasters);
void setAllUpToDateFalse(void);
std::list<RegionGeometry> getChangedRegionGeometry(void);
void setAllUpToDateFlagsTo(bool newUpToDateValue);
void createSphereAt(Vector3 centre, Real radius, uchar value, bool painting);
bool loadScene(const String& filename);

41
include/RegionGeometry.h Normal file
View File

@ -0,0 +1,41 @@
/******************************************************************************
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.
******************************************************************************/
#ifndef __RegionGeometry_H__
#define __RegionGeometry_H__
#include "IndexedSurfacePatch.h"
#include "IntegralVector3.h"
namespace Ogre
{
class RegionGeometry
{
public:
RegionGeometry(){};
bool m_bIsEmpty;
UIntVector3 m_v3dRegionPosition;
IndexedSurfacePatch* m_patchSingleMaterial;
IndexedSurfacePatch* m_patchMultiMaterial;
};
}
#endif