Started moving code for maintaining scene graph out of _findVisibleObjects and into main application.
This commit is contained in:
		| @@ -3,9 +3,11 @@ | |||||||
|  |  | ||||||
| #include <OgreResourceManager.h> | #include <OgreResourceManager.h> | ||||||
|  |  | ||||||
|  | #include "TypeDef.h" | ||||||
|  |  | ||||||
| namespace Ogre | namespace Ogre | ||||||
| { | { | ||||||
| 	class MaterialMap : public Ogre::Resource | 	class VOXEL_SCENE_MANAGER_API MaterialMap : public Ogre::Resource | ||||||
| 	{ | 	{ | ||||||
| 	   String mMaterials[256];	    | 	   String mMaterials[256];	    | ||||||
|  |  | ||||||
|   | |||||||
| @@ -72,7 +72,7 @@ namespace Ogre | |||||||
|  |  | ||||||
| 		//Setters | 		//Setters | ||||||
| 		void setNormalGenerationMethod(NormalGenerationMethod method); | 		void setNormalGenerationMethod(NormalGenerationMethod method); | ||||||
| 		void _findVisibleObjects(Camera* cam,  VisibleObjectsBoundsInfo *  visibleBounds, bool onlyShadowCasters); | 		//void _findVisibleObjects(Camera* cam,  VisibleObjectsBoundsInfo *  visibleBounds, bool onlyShadowCasters); | ||||||
|  |  | ||||||
| 		std::list<RegionGeometry> getChangedRegionGeometry(void); | 		std::list<RegionGeometry> getChangedRegionGeometry(void); | ||||||
|  |  | ||||||
| @@ -93,7 +93,7 @@ namespace Ogre | |||||||
|  |  | ||||||
| 		void setAxisVisible(bool visible); | 		void setAxisVisible(bool visible); | ||||||
|  |  | ||||||
| 		SceneNode* makeSureSceneNodeExists(bool bShouldExist, const String strSceneNodeName); | 		//SceneNode* makeSureSceneNodeExists(bool bShouldExist, const String strSceneNodeName); | ||||||
|  |  | ||||||
|  |  | ||||||
| 		 | 		 | ||||||
| @@ -106,7 +106,7 @@ namespace Ogre | |||||||
|  |  | ||||||
| 		Vector3 computeNormal(const Vector3& position, NormalGenerationMethod normalGenerationMethod) const; | 		Vector3 computeNormal(const Vector3& position, NormalGenerationMethod normalGenerationMethod) const; | ||||||
|  |  | ||||||
| 	private: | 	public: | ||||||
| 		void markVoxelChanged(uint x, uint y, uint z); | 		void markVoxelChanged(uint x, uint y, uint z); | ||||||
| 		void markRegionChanged(uint firstX, uint firstY, uint firstZ, uint lastX, uint lastY, uint lastZ); | 		void markRegionChanged(uint firstX, uint firstY, uint firstZ, uint lastX, uint lastY, uint lastZ); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ namespace Ogre | |||||||
| 	//IDEA - If profiling identifies this class as a bottleneck, we could implement a memory pooling system. | 	//IDEA - If profiling identifies this class as a bottleneck, we could implement a memory pooling system. | ||||||
| 	//All buffers could be powers of two, and we get the smallest one which is big enough for our needs. | 	//All buffers could be powers of two, and we get the smallest one which is big enough for our needs. | ||||||
| 	//See http://www.ogre3d.org/wiki/index.php/DynamicGrowingBuffers | 	//See http://www.ogre3d.org/wiki/index.php/DynamicGrowingBuffers | ||||||
| 	class SurfacePatchRenderable : public SimpleRenderable | 	class VOXEL_SCENE_MANAGER_API SurfacePatchRenderable : public SimpleRenderable | ||||||
| 	{ | 	{ | ||||||
| 	public: | 	public: | ||||||
| 	   SurfacePatchRenderable(const String& name); | 	   SurfacePatchRenderable(const String& name); | ||||||
|   | |||||||
| @@ -110,6 +110,8 @@ namespace Ogre | |||||||
| 		return true; | 		return true; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
|  | #ifdef BLAH | ||||||
| 	void PolyVoxSceneManager::_findVisibleObjects(Camera* cam, VisibleObjectsBoundsInfo *  visibleBounds,  bool onlyShadowCasters) | 	void PolyVoxSceneManager::_findVisibleObjects(Camera* cam, VisibleObjectsBoundsInfo *  visibleBounds,  bool onlyShadowCasters) | ||||||
| 	{ | 	{ | ||||||
| 		if(!volumeData.isNull()) | 		if(!volumeData.isNull()) | ||||||
| @@ -240,6 +242,8 @@ namespace Ogre | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | #endif | ||||||
|  |  | ||||||
| 	std::list<RegionGeometry> PolyVoxSceneManager::getChangedRegionGeometry(void) | 	std::list<RegionGeometry> PolyVoxSceneManager::getChangedRegionGeometry(void) | ||||||
| 	{ | 	{ | ||||||
| 		std::list<RegionGeometry> listChangedRegionGeometry; | 		std::list<RegionGeometry> listChangedRegionGeometry; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user