fix build on systems without CUDA,
apply opcode patch: http://code.google.com/p/bullet/issues/detail?id=175
This commit is contained in:
@@ -24,7 +24,9 @@ subject to the following restrictions:
|
|||||||
#include "btBulletCollisionCommon.h"
|
#include "btBulletCollisionCommon.h"
|
||||||
#include "BulletCollision/BroadphaseCollision/btDbvtBroadphase.h"
|
#include "BulletCollision/BroadphaseCollision/btDbvtBroadphase.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
|
#ifdef USE_CUDA_BROADPHASE
|
||||||
#include "../CUDA/btCudaBroadphase.h"
|
#include "../CUDA/btCudaBroadphase.h"
|
||||||
|
#endif
|
||||||
#include "LinearMath/btQuickprof.h"
|
#include "LinearMath/btQuickprof.h"
|
||||||
|
|
||||||
int numParts =2;
|
int numParts =2;
|
||||||
@@ -429,14 +431,18 @@ BulletSAPCompleteBoxPruningTest::BulletSAPCompleteBoxPruningTest(int numBoxes,in
|
|||||||
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 8, 8, 8, 8192, 8192, 64, 16);
|
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 8, 8, 8, 8192, 8192, 64, 16);
|
||||||
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 12, 12, 12, 8192, 8192, 64, 16);
|
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 12, 12, 12, 8192, 8192, 64, 16);
|
||||||
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 16, 16, 16, 8192, 8192, 64, 16);
|
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 16, 16, 16, 8192, 8192, 64, 16);
|
||||||
|
#ifdef USE_CUDA_BROADPHASE
|
||||||
m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 24, 24, 24,maxNumBoxes , maxNumBoxes, 64, 16);
|
m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 24, 24, 24,maxNumBoxes , maxNumBoxes, 64, 16);
|
||||||
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 32, 32, 32, 8192, 8192, 64, 16);
|
// m_broadphase = new btCudaBroadphase(aabbMin, aabbMax, 32, 32, 32, 8192, 8192, 64, 16);
|
||||||
methodname = "btCudaBroadphase";
|
methodname = "btCudaBroadphase";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
m_broadphase = new bt3DGridBroadphase(aabbMin, aabbMax, 24, 24, 24,maxNumBoxes , maxNumBoxes, 64, 16);
|
m_broadphase = new bt3DGridBroadphase(aabbMin, aabbMax, 24, 24, 24,maxNumBoxes , maxNumBoxes, 64, 16);
|
||||||
methodname = "bt3DGridBroadphase";
|
methodname = "bt3DGridBroadphase";
|
||||||
break;
|
break;
|
||||||
|
#endif //USE_CUDA_BROADPHASE
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
m_broadphase = new btAxisSweep3(aabbMin,aabbMax,numBoxes,new btNullPairCache());
|
m_broadphase = new btAxisSweep3(aabbMin,aabbMax,numBoxes,new btNullPairCache());
|
||||||
|
|||||||
@@ -2,10 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
|||||||
# Visual Studio 2005
|
# Visual Studio 2005
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDTestFramework", "CDTestFramework.vcproj", "{0565DB39-45CC-416E-B549-BFC24F2666D1}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CDTestFramework", "CDTestFramework.vcproj", "{0565DB39-45CC-416E-B549-BFC24F2666D1}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165} = {F74E8E02-0B47-4816-BD0B-FAEAE3343165}
|
|
||||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE} = {6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}
|
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE} = {6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}
|
||||||
{DBE44CA3-2912-4441-8D99-AA2242688AD2} = {DBE44CA3-2912-4441-8D99-AA2242688AD2}
|
|
||||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A} = {7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}
|
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A} = {7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}
|
||||||
|
{DBE44CA3-2912-4441-8D99-AA2242688AD2} = {DBE44CA3-2912-4441-8D99-AA2242688AD2}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Opcode", "Opcode\Opcode.vcproj", "{DBE44CA3-2912-4441-8D99-AA2242688AD2}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Opcode", "Opcode\Opcode.vcproj", "{DBE44CA3-2912-4441-8D99-AA2242688AD2}"
|
||||||
@@ -14,8 +13,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletmath", "..\..\msvc
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletcollision", "..\..\msvc\8\libbulletcollision.vcproj", "{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletcollision", "..\..\msvc\8\libbulletcollision.vcproj", "{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletcuda", "..\CUDA\libbulletcuda.vcproj", "{F74E8E02-0B47-4816-BD0B-FAEAE3343165}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
@@ -74,18 +71,6 @@ Global
|
|||||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDll|Win32.Build.0 = ReleaseDll|Win32
|
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDll|Win32.Build.0 = ReleaseDll|Win32
|
||||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDoublePrecision|Win32.ActiveCfg = ReleaseDoublePrecision|Win32
|
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDoublePrecision|Win32.ActiveCfg = ReleaseDoublePrecision|Win32
|
||||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDoublePrecision|Win32.Build.0 = ReleaseDoublePrecision|Win32
|
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}.ReleaseDoublePrecision|Win32.Build.0 = ReleaseDoublePrecision|Win32
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.DebugDll|Win32.ActiveCfg = DebugDll|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.DebugDll|Win32.Build.0 = DebugDll|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.DebugDoublePrecision|Win32.ActiveCfg = DebugDoublePrecision|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.DebugDoublePrecision|Win32.Build.0 = DebugDoublePrecision|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.ReleaseDll|Win32.ActiveCfg = ReleaseDll|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.ReleaseDll|Win32.Build.0 = ReleaseDll|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.ReleaseDoublePrecision|Win32.ActiveCfg = ReleaseDoublePrecision|Win32
|
|
||||||
{F74E8E02-0B47-4816-BD0B-FAEAE3343165}.ReleaseDoublePrecision|Win32.Build.0 = ReleaseDoublePrecision|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -63,10 +63,9 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="cudart.lib"
|
|
||||||
OutputFile="./Bin/CDTestFrameworkDEBUG.exe"
|
OutputFile="./Bin/CDTestFrameworkDEBUG.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=".\AntTweakBar\lib;../../Glut;"$(CUDA_LIB_PATH)""
|
AdditionalLibraryDirectories=".\AntTweakBar\lib;../../Glut"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/CDTestFramework.pdb"
|
ProgramDatabaseFile="$(OutDir)/CDTestFramework.pdb"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
using namespace IceCore;
|
using namespace Opcode;
|
||||||
|
|
||||||
//#define ZERO_OVERHEAD_RELEASE
|
//#define ZERO_OVERHEAD_RELEASE
|
||||||
#define NEW_CODE
|
#define NEW_CODE
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
|
|
||||||
using namespace IceCore;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
|
|
||||||
using namespace IceCore;
|
using namespace Opcode;
|
||||||
|
|
||||||
// Static members
|
// Static members
|
||||||
#ifdef CONTAINER_STATS
|
#ifdef CONTAINER_STATS
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Point Mul = HPoint * Matrix3x3;
|
// Point Mul = HPoint * Matrix3x3;
|
||||||
@@ -84,3 +84,4 @@ HPoint& HPoint::operator*=(const Matrix4x4& mat)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
// Cast operator
|
// Cast operator
|
||||||
Matrix3x3::operator Matrix4x4() const
|
Matrix3x3::operator Matrix4x4() const
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
@@ -149,3 +149,4 @@ Matrix4x4& Matrix4x4::Invert()
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceCore;
|
using namespace Opcode;
|
||||||
|
|
||||||
void IceCore:: SRand(udword seed)
|
void IceCore:: SRand(udword seed)
|
||||||
{
|
{
|
||||||
@@ -49,3 +49,4 @@ udword IceCore::GetRandomIndex(udword max_index)
|
|||||||
return Index % max_index;
|
return Index % max_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
float Ray::SquareDistance(const Point& point, float* t) const
|
float Ray::SquareDistance(const Point& point, float* t) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ To do:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
|
|
||||||
using namespace IceCore;
|
using namespace Opcode;
|
||||||
|
|
||||||
#define INVALIDATE_RANKS mCurrentSize|=0x80000000
|
#define INVALIDATE_RANKS mCurrentSize|=0x80000000
|
||||||
#define VALIDATE_RANKS mCurrentSize&=0x7fffffff
|
#define VALIDATE_RANKS mCurrentSize&=0x7fffffff
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
float Segment::SquareDistance(const Point& point, float* t) const
|
float Segment::SquareDistance(const Point& point, float* t) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceMaths;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ subject to the following restrictions:
|
|||||||
// Precompiled Header
|
// Precompiled Header
|
||||||
#include "Stdafx.h"
|
#include "Stdafx.h"
|
||||||
|
|
||||||
using namespace IceCore;
|
using namespace Opcode;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ udword HybridModel::GetUsedBytes() const
|
|||||||
return UsedBytes;
|
return UsedBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline_ void ComputeMinMax(Point& min, Point& max, const VertexPointers& vp)
|
inline_ void ComputeMinMax_HM(Point& min, Point& max, const VertexPointers& vp)
|
||||||
{
|
{
|
||||||
// Compute triangle's AABB = a leaf box
|
// Compute triangle's AABB = a leaf box
|
||||||
#ifdef OPC_USE_FCOMI // a 15% speedup on my machine, not much
|
#ifdef OPC_USE_FCOMI // a 15% speedup on my machine, not much
|
||||||
@@ -388,7 +388,7 @@ bool HybridModel::Refit()
|
|||||||
while(NbTris--)
|
while(NbTris--)
|
||||||
{
|
{
|
||||||
mIMesh->GetTriangle(VP, *T++);
|
mIMesh->GetTriangle(VP, *T++);
|
||||||
ComputeMinMax(TmpMin, TmpMax, VP);
|
ComputeMinMax_HM(TmpMin, TmpMax, VP);
|
||||||
Min.Min(TmpMin);
|
Min.Min(TmpMin);
|
||||||
Max.Max(TmpMax);
|
Max.Max(TmpMax);
|
||||||
}
|
}
|
||||||
@@ -401,7 +401,7 @@ bool HybridModel::Refit()
|
|||||||
while(NbTris--)
|
while(NbTris--)
|
||||||
{
|
{
|
||||||
mIMesh->GetTriangle(VP, BaseIndex++);
|
mIMesh->GetTriangle(VP, BaseIndex++);
|
||||||
ComputeMinMax(TmpMin, TmpMax, VP);
|
ComputeMinMax_HM(TmpMin, TmpMax, VP);
|
||||||
Min.Min(TmpMin);
|
Min.Min(TmpMin);
|
||||||
Max.Max(TmpMax);
|
Max.Max(TmpMax);
|
||||||
}
|
}
|
||||||
@@ -433,7 +433,7 @@ bool HybridModel::Refit()
|
|||||||
while(NbTris--)
|
while(NbTris--)
|
||||||
{
|
{
|
||||||
mIMesh->GetTriangle(VP, *T++);
|
mIMesh->GetTriangle(VP, *T++);
|
||||||
ComputeMinMax(TmpMin, TmpMax, VP);
|
ComputeMinMax_HM(TmpMin, TmpMax, VP);
|
||||||
Min_.Min(TmpMin);
|
Min_.Min(TmpMin);
|
||||||
Max_.Max(TmpMax);
|
Max_.Max(TmpMax);
|
||||||
}
|
}
|
||||||
@@ -446,7 +446,7 @@ bool HybridModel::Refit()
|
|||||||
while(NbTris--)
|
while(NbTris--)
|
||||||
{
|
{
|
||||||
mIMesh->GetTriangle(VP, BaseIndex++);
|
mIMesh->GetTriangle(VP, BaseIndex++);
|
||||||
ComputeMinMax(TmpMin, TmpMax, VP);
|
ComputeMinMax_HM(TmpMin, TmpMax, VP);
|
||||||
Min_.Min(TmpMin);
|
Min_.Min(TmpMin);
|
||||||
Max_.Max(TmpMax);
|
Max_.Max(TmpMax);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ subject to the following restrictions:
|
|||||||
#include ".\Ice\IceFPU.h"
|
#include ".\Ice\IceFPU.h"
|
||||||
#include ".\Ice\IceMemoryMacros.h"
|
#include ".\Ice\IceMemoryMacros.h"
|
||||||
|
|
||||||
|
namespace Opcode
|
||||||
|
{
|
||||||
namespace IceCore
|
namespace IceCore
|
||||||
{
|
{
|
||||||
#include ".\Ice\IceAllocator.h"
|
#include ".\Ice\IceAllocator.h"
|
||||||
@@ -87,3 +89,4 @@ subject to the following restrictions:
|
|||||||
#include ".\Ice\IceLSS.h"
|
#include ".\Ice\IceLSS.h"
|
||||||
}
|
}
|
||||||
using namespace IceMaths;
|
using namespace IceMaths;
|
||||||
|
}
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ bool AABBNoLeafTree::Build(AABBTree* tree)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline_ void ComputeMinMax(Point& min, Point& max, const VertexPointers& vp)
|
inline_ void ComputeMinMax_OT(Point& min, Point& max, const VertexPointers& vp)
|
||||||
{
|
{
|
||||||
// Compute triangle's AABB = a leaf box
|
// Compute triangle's AABB = a leaf box
|
||||||
#ifdef OPC_USE_FCOMI // a 15% speedup on my machine, not much
|
#ifdef OPC_USE_FCOMI // a 15% speedup on my machine, not much
|
||||||
@@ -403,7 +403,7 @@ bool AABBNoLeafTree::Refit(const MeshInterface* mesh_interface)
|
|||||||
if(Current.HasPosLeaf())
|
if(Current.HasPosLeaf())
|
||||||
{
|
{
|
||||||
mesh_interface->GetTriangle(VP, Current.GetPosPrimitive());
|
mesh_interface->GetTriangle(VP, Current.GetPosPrimitive());
|
||||||
ComputeMinMax(Min, Max, VP);
|
ComputeMinMax_OT(Min, Max, VP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -415,7 +415,7 @@ bool AABBNoLeafTree::Refit(const MeshInterface* mesh_interface)
|
|||||||
if(Current.HasNegLeaf())
|
if(Current.HasNegLeaf())
|
||||||
{
|
{
|
||||||
mesh_interface->GetTriangle(VP, Current.GetNegPrimitive());
|
mesh_interface->GetTriangle(VP, Current.GetNegPrimitive());
|
||||||
ComputeMinMax(Min_, Max_, VP);
|
ComputeMinMax_OT(Min_, Max_, VP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user