Changeset 187 for trunk/VUT/work
- Timestamp:
- 07/31/05 11:16:09 (20 years ago)
- Location:
- trunk/VUT/work
- Files:
-
- 7 added
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/IVReader/include/ivmeshdata.h
r183 r187 5 5 #include <Ogre.h> 6 6 7 enum IVRenderOperationType7 enum mIVReaderenderOperationType 8 8 { 9 9 IV_ROT_INVALID = -1, … … 25 25 Ogre::Real *vertices, *normals, *texCoords, *indices, *normalIndices, *texCoordIndices; 26 26 int vcnt, ncnt, tcnt, icnt, nicnt, ticnt; 27 IVRenderOperationType roType;27 mIVReaderenderOperationType roType; 28 28 Ogre::AxisAlignedBox *boundingBox; 29 29 -
trunk/VUT/work/IVReader/include/ivreader.h
r183 r187 1 #ifndef __ IVReader_H__2 #define __ IVReader_H__1 #ifndef __mIVReader_H__ 2 #define __mIVReader_H__ 3 3 4 4 … … 120 120 Ogre::Entity *createEntity(Ogre::SceneManager* sceneMgr, std::string name, IVMeshData *mData, Ogre::Vector3 *translation = NULL); 121 121 122 void buildTree(Ogre::SceneManager *sceneMgr, Ogre::SceneNode *sceneNodeRoot, IVNode * ivRoot, IVMeshData *mData = NULL, Ogre::Material *material = NULL);122 void buildTree(Ogre::SceneManager *sceneMgr, Ogre::SceneNode *sceneNodeRoot, IVNode *mIVReaderoot, IVMeshData *mData = NULL, Ogre::Material *material = NULL); 123 123 124 124 IVDefListNode *defList; -
trunk/VUT/work/IVReader/src/ivmanualmeshloader.cpp
r183 r187 1 1 #include "ivmanualmeshloader.h" 2 #include " IVReader.h"2 #include "ivreader.h" 3 3 4 4 IVManualMeshLoader::IVManualMeshLoader() -
trunk/VUT/work/IVReader/src/ivmeshdata.cpp
r183 r187 1 1 #include "ivmeshdata.h" 2 #include " IVReader.h"2 #include "ivreader.h" 3 3 4 4 -
trunk/VUT/work/IVReader/src/ivnode.cpp
r183 r187 1 1 #include "ivnode.h" 2 #include " IVReader.h"2 #include "ivreader.h" 3 3 4 4 IVField::IVField() -
trunk/VUT/work/IVReader/src/ivreader.cpp
r183 r187 1 #include " ivreader.h"1 #include "IVReader.h" 2 2 #include <string> 3 3 #include <stdlib.h> … … 571 571 } 572 572 573 void IVReader::buildTree(Ogre::SceneManager* sceneMgr, Ogre::SceneNode *sceneNodeRoot, IVNode * ivRoot, IVMeshData *mData, Ogre::Material *material)573 void IVReader::buildTree(Ogre::SceneManager* sceneMgr, Ogre::SceneNode *sceneNodeRoot, IVNode *IVReaderoot, IVMeshData *mData, Ogre::Material *material) 574 574 { 575 575 using namespace Ogre; … … 586 586 IVType t; int i; 587 587 588 IVNode *help = ivRoot->getNextChildNode(true);588 IVNode *help = IVReaderoot->getNextChildNode(true); 589 589 while (help != NULL) 590 590 { … … 766 766 } 767 767 768 help = ivRoot->getNextChildNode();768 help = IVReaderoot->getNextChildNode(); 769 769 } 770 770 if (meshDataCreated) if (mData != NULL) delete mData; -
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.cpp
r183 r187 169 169 170 170 // set scene manager options 171 mSceneMgr->setOption("TestGeometryForVisibleLeaves", &mTestGeometryForVisibleLeaves); 172 173 // apply delayed rendering (i.e., transparents after hierarchical culling pass) 174 // only if optimization is not used 175 bool delayRenderTransparents = !mTestGeometryForVisibleLeaves; 176 177 mSceneMgr->setOption("DelayRenderTransparents", &delayRenderTransparents); 171 setTestGeometryForVisibleLeaves(mTestGeometryForVisibleLeaves); 172 178 173 mSceneMgr->setOption("UseDepthPass", &mUseDepthPass); 179 174 … … 190 185 TerrainFrameListener::~TerrainFrameListener() 191 186 { 192 delete mRayQueryExecutor; 193 delete mEventProcessor; 194 195 if (mQueryManager) 196 { 197 delete mQueryManager; 198 mQueryManager = NULL; 199 } 187 OGRE_DELETE(mRayQueryExecutor); 188 OGRE_DELETE(mEventProcessor); 189 OGRE_DELETE(mQueryManager); 200 190 } 201 191 //----------------------------------------------------------------------- … … 858 848 } 859 849 //----------------------------------------------------------------------- 860 void TerrainFrameListener::toggleTestGeometryForVisibleLeaves() 861 { 862 mTestGeometryForVisibleLeaves = !mTestGeometryForVisibleLeaves; 850 void TerrainFrameListener::setTestGeometryForVisibleLeaves(bool testGeometryForVisibleLeaves) 851 { 863 852 mSceneMgr->setOption("TestGeometryForVisibleLeaves", &mTestGeometryForVisibleLeaves); 864 853 … … 1005 994 break; 1006 995 case KC_G: 1007 toggleTestGeometryForVisibleLeaves(); 996 mTestGeometryForVisibleLeaves = !mTestGeometryForVisibleLeaves; 997 setTestGeometryForVisibleLeaves(mTestGeometryForVisibleLeaves); 1008 998 break; 1009 999 case KC_T: -
trunk/VUT/work/TestCullingTerrain/TerrainFrameListener.h
r174 r187 119 119 void changeThreshold(int incr); 120 120 void changeAssumedVisibility(int incr); 121 void toggleTestGeometryForVisibleLeaves();121 void setTestGeometryForVisibleLeaves(bool testGeometryForVisibleLeaves); 122 122 void toggleShowOctree(); 123 123 void toggleUseDepthPass(); -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrain.vcproj
r136 r187 73 73 <Tool 74 74 Name="VCCLCompilerTool" 75 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\ ReferenceApplication\ReferenceAppLayer\include";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\Ogre\include;..\..\GtpVisibility\include;..\include;..\TestCulling"75 AdditionalIncludeDirectories=""$(OGRE_PATH)\Dependencies\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";..\..\Ogre\include;..\..\GtpVisibility\include;..\include" 76 76 PreprocessorDefinitions="_WINDOWS;_STLP_USE_DYNAMIC_LIB;OGRE_LIBRARY_IMPORTS;_RELEASE;WIN32;_STLP_RELEASE;GTP_VISIBILITY_MODIFIED_OGRE" 77 77 RuntimeLibrary="2" … … 88 88 OutputFile="$(OGRE_PATH)/Samples/Common/bin/Release/TestCullingTerrain.exe" 89 89 LinkIncremental="1" 90 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_ ADDONS_PATH)\dotsceneoctree\PlugIns\DotSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"$(GAMETOOLS_PATH)\trunk\VUT\Ogre\lib\$(ConfigurationName)""90 AdditionalLibraryDirectories=""$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)";"$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)";"$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";"$(GAMETOOLS_PATH)\trunk\VUT\Ogre\lib\$(ConfigurationName)"" 91 91 GenerateDebugInformation="TRUE" 92 92 SubSystem="2" -
trunk/VUT/work/TestCullingTerrain/TestCullingTerrainApplication.cpp
r175 r187 227 227 void TestCullingTerrainApplication::createScene() 228 228 { 229 Real scale = 3; 230 mSceneMgr->setOption("NodeVizScale", &scale); 231 229 232 // Set ambient light 230 233 mAmbientLight = ColourValue(0.5 , 0.5, 0.5); -
trunk/VUT/work/ogre_changes/Plugins/OctreeSceneManager/src/OgreOctreeNode.cpp
r183 r187 46 46 unsigned long green = 0xFFFFFFFF; 47 47 48 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 49 Real OctreeNode::msVizScale = 1; 50 #endif // GTP_VISIBILITY_MODIFIED_OGRE 51 48 52 unsigned short OctreeNode::mIndexes[ 24 ] = {0, 1, 1, 2, 2, 3, 3, 0, //back 49 53 0, 6, 6, 5, 5, 1, //left … … 187 191 } 188 192 193 //LogManager::getSingleton().logMessage("hagaaggaagag"); 189 194 AxisAlignedBox box = mLocalAABB; 195 190 196 // HACK: scale should not be done here 191 box.scale(Vector3(3, 3, 3)); 197 box.scale(Vector3(msVizScale, msVizScale, msVizScale)); 198 192 199 mWireBoundingBox->setupBoundingBox(box); 193 200 mWireBoundingBox->getRenderOperation(rend); … … 224 231 225 232 } 226 } 233 234 #ifdef GTP_VISIBILITY_MODIFIED_OGRE 235 void OctreeNode::setVizScale(Real scale) 236 { 237 msVizScale = scale; 238 } 239 #endif // GTP_VISIBILITY_MODIFIED_OGRE 240 }
Note: See TracChangeset
for help on using the changeset viewer.