Ported WM5 collision detection to GTE6.

Ported the Wild Magic 5 collision detection code to GTE6: BoundTree, CollisionGroup and CollisionRecord. Added a wrapper class, CollisionMesh, that provides the interface to a Visual-based triangle mesh to be used at a template parameter for the collision detection code. Added test-intersection and find-intersection queries for moving triangles. Ported the WM5 sample CollisionsBoundTree to illustrate use of the collision detection.
This commit is contained in:
David Eberly
2022-03-20 13:20:18 -07:00
parent fd7d474088
commit 828a0e44e9
33 changed files with 3729 additions and 9 deletions
+7
View File
@@ -30,6 +30,7 @@
<ClCompile Include="Graphics\BumpMapEffect.cpp" />
<ClCompile Include="Graphics\Camera.cpp" />
<ClCompile Include="Graphics\CLODMesh.cpp" />
<ClCompile Include="Graphics\CollisionMesh.cpp" />
<ClCompile Include="Graphics\ConstantBuffer.cpp" />
<ClCompile Include="Graphics\ConstantColorEffect.cpp" />
<ClCompile Include="Graphics\ControlledObject.cpp" />
@@ -81,6 +82,7 @@
<ClCompile Include="Graphics\Picker.cpp" />
<ClCompile Include="Graphics\PickRecord.cpp" />
<ClCompile Include="Graphics\PlanarReflectionEffect.cpp" />
<ClCompile Include="Graphics\PlanarShadowEffect.cpp" />
<ClCompile Include="Graphics\PointController.cpp" />
<ClCompile Include="Graphics\PointLightEffect.cpp" />
<ClCompile Include="Graphics\PointLightTextureEffect.cpp" />
@@ -134,6 +136,7 @@
<ClInclude Include="Graphics\BlendState.h" />
<ClInclude Include="Graphics\BlendTransformController.h" />
<ClInclude Include="Graphics\BoundingSphere.h" />
<ClInclude Include="Graphics\BoundTree.h" />
<ClInclude Include="Graphics\BspNode.h" />
<ClInclude Include="Graphics\Buffer.h" />
<ClInclude Include="Graphics\BumpMapEffect.h" />
@@ -141,6 +144,9 @@
<ClInclude Include="Graphics\CLODCollapseRecord.h" />
<ClInclude Include="Graphics\CLODMesh.h" />
<ClInclude Include="Graphics\CLODMeshCreator.h" />
<ClInclude Include="Graphics\CollisionGroup.h" />
<ClInclude Include="Graphics\CollisionMesh.h" />
<ClInclude Include="Graphics\CollisionRecord.h" />
<ClInclude Include="Graphics\ComputeProgram.h" />
<ClInclude Include="Graphics\ConstantBuffer.h" />
<ClInclude Include="Graphics\ConstantColorEffect.h" />
@@ -194,6 +200,7 @@
<ClInclude Include="Graphics\Picker.h" />
<ClInclude Include="Graphics\PickRecord.h" />
<ClInclude Include="Graphics\PlanarReflectionEffect.h" />
<ClInclude Include="Graphics\PlanarShadowEffect.h" />
<ClInclude Include="Graphics\PointController.h" />
<ClInclude Include="Graphics\PointLightEffect.h" />
<ClInclude Include="Graphics\PointLightTextureEffect.h" />
+24
View File
@@ -46,6 +46,9 @@
<Filter Include="Base">
<UniqueIdentifier>{2b86b5b2-caaa-4111-93ec-cc3e08787061}</UniqueIdentifier>
</Filter>
<Filter Include="SceneGraph\CollisionDetection">
<UniqueIdentifier>{ed147d9e-20f7-4699-8b5e-1723071190c4}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Graphics\GTGraphics.cpp" />
@@ -349,6 +352,12 @@
<ClCompile Include="Graphics\CLODMesh.cpp">
<Filter>SceneGraph\Detail</Filter>
</ClCompile>
<ClCompile Include="Graphics\PlanarShadowEffect.cpp">
<Filter>Effects</Filter>
</ClCompile>
<ClCompile Include="Graphics\CollisionMesh.cpp">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Graphics\GEDrawTarget.h">
@@ -683,5 +692,20 @@
<ClInclude Include="Graphics\CLODCollapseRecord.h">
<Filter>SceneGraph\Detail</Filter>
</ClInclude>
<ClInclude Include="Graphics\PlanarShadowEffect.h">
<Filter>Effects</Filter>
</ClInclude>
<ClInclude Include="Graphics\CollisionGroup.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
<ClInclude Include="Graphics\CollisionRecord.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
<ClInclude Include="Graphics\BoundTree.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
<ClInclude Include="Graphics\CollisionMesh.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
</ItemGroup>
</Project>
+7
View File
@@ -30,6 +30,7 @@
<ClCompile Include="Graphics\BumpMapEffect.cpp" />
<ClCompile Include="Graphics\Camera.cpp" />
<ClCompile Include="Graphics\CLODMesh.cpp" />
<ClCompile Include="Graphics\CollisionMesh.cpp" />
<ClCompile Include="Graphics\ConstantBuffer.cpp" />
<ClCompile Include="Graphics\ConstantColorEffect.cpp" />
<ClCompile Include="Graphics\ControlledObject.cpp" />
@@ -81,6 +82,7 @@
<ClCompile Include="Graphics\Picker.cpp" />
<ClCompile Include="Graphics\PickRecord.cpp" />
<ClCompile Include="Graphics\PlanarReflectionEffect.cpp" />
<ClCompile Include="Graphics\PlanarShadowEffect.cpp" />
<ClCompile Include="Graphics\PointController.cpp" />
<ClCompile Include="Graphics\PointLightEffect.cpp" />
<ClCompile Include="Graphics\PointLightTextureEffect.cpp" />
@@ -134,6 +136,7 @@
<ClInclude Include="Graphics\BlendState.h" />
<ClInclude Include="Graphics\BlendTransformController.h" />
<ClInclude Include="Graphics\BoundingSphere.h" />
<ClInclude Include="Graphics\BoundTree.h" />
<ClInclude Include="Graphics\BspNode.h" />
<ClInclude Include="Graphics\Buffer.h" />
<ClInclude Include="Graphics\BumpMapEffect.h" />
@@ -141,6 +144,9 @@
<ClInclude Include="Graphics\CLODCollapseRecord.h" />
<ClInclude Include="Graphics\CLODMesh.h" />
<ClInclude Include="Graphics\CLODMeshCreator.h" />
<ClInclude Include="Graphics\CollisionGroup.h" />
<ClInclude Include="Graphics\CollisionMesh.h" />
<ClInclude Include="Graphics\CollisionRecord.h" />
<ClInclude Include="Graphics\ComputeProgram.h" />
<ClInclude Include="Graphics\ConstantBuffer.h" />
<ClInclude Include="Graphics\ConstantColorEffect.h" />
@@ -194,6 +200,7 @@
<ClInclude Include="Graphics\Picker.h" />
<ClInclude Include="Graphics\PickRecord.h" />
<ClInclude Include="Graphics\PlanarReflectionEffect.h" />
<ClInclude Include="Graphics\PlanarShadowEffect.h" />
<ClInclude Include="Graphics\PointController.h" />
<ClInclude Include="Graphics\PointLightEffect.h" />
<ClInclude Include="Graphics\PointLightTextureEffect.h" />
+24
View File
@@ -46,6 +46,9 @@
<Filter Include="Base">
<UniqueIdentifier>{2b86b5b2-caaa-4111-93ec-cc3e08787061}</UniqueIdentifier>
</Filter>
<Filter Include="SceneGraph\CollisionDetection">
<UniqueIdentifier>{330927f4-251d-493a-8efc-2e486372167e}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Graphics\GTGraphics.cpp" />
@@ -349,6 +352,12 @@
<ClCompile Include="Graphics\CLODMesh.cpp">
<Filter>SceneGraph\Detail</Filter>
</ClCompile>
<ClCompile Include="Graphics\PlanarShadowEffect.cpp">
<Filter>Effects</Filter>
</ClCompile>
<ClCompile Include="Graphics\CollisionMesh.cpp">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Graphics\GEDrawTarget.h">
@@ -683,5 +692,20 @@
<ClInclude Include="Graphics\CLODCollapseRecord.h">
<Filter>SceneGraph\Detail</Filter>
</ClInclude>
<ClInclude Include="Graphics\PlanarShadowEffect.h">
<Filter>Effects</Filter>
</ClInclude>
<ClInclude Include="Graphics\CollisionRecord.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
<ClInclude Include="Graphics\CollisionMesh.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
<ClInclude Include="Graphics\CollisionGroup.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
<ClInclude Include="Graphics\BoundTree.h">
<Filter>SceneGraph\CollisionDetection</Filter>
</ClInclude>
</ItemGroup>
</Project>
+316
View File
@@ -0,0 +1,316 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#pragma once
#include <Mathematics/Logger.h>
#include <Mathematics/ApprOrthogonalLine3.h>
#include <Mathematics/Matrix4x4.h>
#include <Mathematics/Triangle.h>
#include <memory>
#include <numeric>
// Class Mesh must have the following functions in its interface.
// size_t GetNumVertices() const;
// Vector3<float> GetPosition(size_t i) const;
// size_t GetNumTriangles() const;
// bool GetTriangle(size_t t, std::array<int32_t, 3>& indices) const;
// bool GetModelTriangle(size_t t, Triangle3<float>& modelTriangle) const;
// bool GetWorldTriangle(size_t t, Triangle3<float>& worldTriangle) const;
// Matrix4x4<float> const& GetWorldTransform() const;
// A wrapper of this type for Visual objects representing triangle meshes
// is Graphics/CollisionMesh.{h,cpp}.
//
// Class Bound must have the following functions in its interface.
// Bound();
// void ComputeFromData(uint32_t numElements, uint32_t stride,
// char const* data);
// void TransformBy(Matrix4x4<float> const& hmatrix,
// Bound& bound) const;
// bool TestIntersection(Bound const& bound) const;
// bool TestIntersection(Bound const& bound, float tmax,
// Vector3<float> const& velocity0,
// Vector3<float> const& velocity1) const;
// A wrapper of this type for bounding spheres is Graphics/BoundingSphere.h.
namespace gte
{
template <typename Mesh, typename Bound>
class BoundTree
{
public:
// Construction and destruction.
BoundTree(std::shared_ptr<Mesh> const& mesh, int32_t maxTrisPerLeaf = 1,
bool storeInteriorTris = false)
:
mMesh(mesh),
mModelBound{},
mWorldBound{},
mLChild{},
mRChild{},
mTriangles{}
{
if (maxTrisPerLeaf == 0)
{
// This is a signal to defer construction, a behavior needed
// in the BuildTree function.
return;
}
// Centroids of triangles are used for splitting a mesh. The
// centroids are projected onto a splitting axis and sorted. The
// split is based on the median of the projections, which leads
// to a balanced tree.
size_t const numTriangles = mMesh->GetNumTriangles();
std::vector<Vector3<float>> centroids(numTriangles);
for (size_t t = 0; t < numTriangles; ++t)
{
Triangle3<float> triangle{};
mMesh->GetModelTriangle(t, triangle);
centroids[t] = (triangle.v[0] + triangle.v[1] + triangle.v[2]) / 3.0f;
}
// Initialize binary-tree arrays for storing triangle indices.
// These are used to store the indices when the mesh is split.
std::vector<int32_t> inSplit(numTriangles);
std::vector<int32_t> outSplit(numTriangles);
std::iota(inSplit.begin(), inSplit.end(), 0);
BuildTree(maxTrisPerLeaf, storeInteriorTris, centroids, 0,
numTriangles - 1, inSplit, outSplit);
}
~BoundTree() = default;
// Tree topology.
inline std::shared_ptr<BoundTree> const& GetLChild() const
{
return mLChild;
}
inline std::shared_ptr<BoundTree> const& GetRChild() const
{
return mRChild;
}
inline bool IsInteriorNode() const
{
return mLChild || mRChild;
}
inline bool IsLeafNode() const
{
return !mLChild && !mRChild;
}
// Member access.
inline std::shared_ptr<Mesh> const& GetMesh() const
{
return mMesh;
}
inline const Bound& GetWorldBound() const
{
return mWorldBound;
}
inline int32_t GetNumTriangles() const
{
return static_cast<int32_t>(mTriangles.size());
}
inline int32_t GetTriangle(int32_t i) const
{
return mTriangles[static_cast<size_t>(i)];
}
inline std::vector<int32_t> const& GetTriangles() const
{
return mTriangles;
}
// The Mesh world transform is assumed to change dynamically.
void UpdateWorldBound()
{
mModelBound.TransformBy(mMesh->GetWorldTransform(), mWorldBound);
}
private:
void BuildTree(size_t maxTrisPerLeaf, bool storeInteriorTris,
std::vector<Vector3<float>> const& centroids, size_t i0,
size_t i1, std::vector<int32_t>& inSplit,
std::vector<int32_t>& outSplit)
{
LogAssert(
i0 <= i1,
"Invalid index ordering.");
Vector3<float> origin{}, direction{};
CreateModelBound(i0, i1, inSplit, origin, direction);
if (i1 - i0 < maxTrisPerLeaf)
{
// At a leaf node.
size_t numTriangles = i1 - i0 + 1;
mTriangles.resize(numTriangles);
for (size_t t0 = 0, t1 = i0; t0 < numTriangles; ++t0, ++t1)
{
mTriangles[t0] = inSplit[t1];
}
mLChild.reset();
mRChild.reset();
}
else
{
// At an interior node.
if (storeInteriorTris)
{
size_t numTriangles = i1 - i0 + 1;
mTriangles.resize(numTriangles);
for (size_t t0 = 0, t1 = i0; t0 < numTriangles; ++t0, ++t1)
{
mTriangles[t0] = inSplit[t1];
}
}
else
{
mTriangles.clear();
}
size_t j0{}, j1{};
SplitTriangles(centroids, i0, i1, inSplit, j0, j1, outSplit,
origin, direction);
mLChild = std::make_shared<BoundTree<Mesh, Bound>>(mMesh, 0, false);
mLChild->BuildTree(maxTrisPerLeaf, storeInteriorTris,
centroids, i0, j0, outSplit, inSplit);
mRChild = std::make_shared<BoundTree<Mesh, Bound>>(mMesh, 0, false);
mRChild->BuildTree(maxTrisPerLeaf, storeInteriorTris,
centroids, j1, i1, outSplit, inSplit);
}
}
// Compute the model bound for the subset of triangles. Return a
// line used for splitting the projections of the triangle centroids.
void CreateModelBound(size_t i0, size_t i1, std::vector<int32_t>& inSplit,
Vector3<float>& origin, Vector3<float>& direction)
{
// Tag vertices that are used in the submesh.
size_t const numVertices = mMesh->GetNumVertices();
std::vector<bool> valid(numVertices, false);
for (size_t i = i0; i <= i1; ++i)
{
std::array<int32_t, 3> vertex{};
mMesh->GetTriangle(inSplit[i], vertex);
for (size_t j = 0; j < 3; ++j)
{
valid[vertex[j]] = true;
}
}
// Create a contiguous set of vertices in the submesh.
std::vector<Vector3<float>> meshVertices{};
for (size_t i = 0; i < numVertices; ++i)
{
if (valid[i])
{
meshVertices.push_back(mMesh->GetPosition(i));
}
}
// Compute the bound for the submesh.
uint32_t numSubvertices = static_cast<uint32_t>(meshVertices.size());
uint32_t stride = static_cast<uint32_t>(sizeof(Vector3<float>));
mModelBound.ComputeFromData(numSubvertices, stride,
reinterpret_cast<char const*>(meshVertices.data()));
// Compute a splitting line for the submesh.
ApprOrthogonalLine3<float> fitter{};
fitter.Fit(meshVertices);
auto const& line = fitter.GetParameters();
origin = line.origin;
direction = line.direction;
}
static void SplitTriangles(std::vector<Vector3<float>> const& centroids,
size_t i0, size_t i1, std::vector<int32_t>& inSplit,
size_t& j0, size_t& j1, std::vector<int32_t>& outSplit,
Vector3<float>& origin, Vector3<float>& direction)
{
// Project onto specified line.
size_t const quantity = i1 - i0 + 1;
std::vector<ProjectionInfo> info(quantity);
for (size_t i = i0, k = 0; i <= i1; ++i, ++k)
{
int32_t t = inSplit[i];
Vector3<float> diff = centroids[static_cast<size_t>(t)] - origin;
info[k].triangle = t;
info[k].projection = Dot(direction, diff);
}
// Find median of projections by sorting.
std::sort(info.begin(), info.end());
size_t median = (quantity - 1) / 2;
std::nth_element(info.begin(), info.begin() + median, info.end());
// Partition the triangles by the median.
size_t k = 0;
for (j0 = i0 - 1; k <= median; ++k)
{
outSplit[++j0] = info[k].triangle;
}
for (j1 = i1 + 1; k < quantity; ++k)
{
outSplit[--j1] = info[k].triangle;
}
}
// For sorting centroid projections on axes.
class ProjectionInfo
{
public:
ProjectionInfo()
:
triangle(0),
projection(0.0f)
{
}
bool operator<(ProjectionInfo const& other) const
{
return projection < other.projection;
}
int32_t triangle;
float projection;
};
// Mesh and bounds.
std::shared_ptr<Mesh> mMesh;
Bound mModelBound;
Bound mWorldBound;
// Binary tree representation.
std::shared_ptr<BoundTree> mLChild;
std::shared_ptr<BoundTree> mRChild;
// If storeInteriorTris is set to 'false' in the constructor, the interior
// nodes set the triangle quantity to zero and the array to null. Leaf
// nodes set the quantity to the number of triangles at that node (1, if
// maxTrianglesPerLeaf was set to 1) and allocate an array of triangle
// indices that are relative to the input mesh of the top level
// constructor.
//
// If storeInteriorTris is set to 'true', the interior nodes also save
// the triangle quantity and array of triangle indices for the mesh that
// the node represents.
std::vector<int32_t> mTriangles;
};
}
+1
View File
@@ -35,6 +35,7 @@ Buffer.cpp
BumpMapEffect.cpp
Camera.cpp
CLODMesh.cpp
CollisionMesh.cpp
ConstantBuffer.cpp
ConstantColorEffect.cpp
ControlledObject.cpp
+143
View File
@@ -0,0 +1,143 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#pragma once
#include <Graphics/CollisionRecord.h>
// Class Mesh must have the following functions in its interface.
// size_t GetNumVertices() const;
// Vector3<float> GetPosition(size_t i) const;
// size_t GetNumTriangles() const;
// bool GetTriangle(size_t t, std::array<int32_t, 3>& indices) const;
// bool GetModelTriangle(size_t t, Triangle3<float>& modelTriangle) const;
// bool GetWorldTriangle(size_t t, Triangle3<float>& worldTriangle) const;
// Matrix4x4<float> const& GetWorldTransform() const;
// A wrapper of this type for Visual objects representing triangle meshes
// is Graphics/CollisionMesh.{h,cpp}.
//
// Class Bound must have the following functions in its interface.
// Bound();
// void ComputeFromData(uint32_t numElements, uint32_t stride,
// char const* data);
// void TransformBy(Matrix4x4<float> const& hmatrix,
// Bound& bound) const;
// bool TestIntersection(Bound const& bound) const;
// bool TestIntersection(Bound const& bound, float tmax,
// Vector3<float> const& velocity0,
// Vector3<float> const& velocity1) const;
// A wrapper of this type for bounding spheres is Graphics/BoundingSphere.h.
namespace gte
{
template <class Mesh, class Bound>
class CollisionGroup
{
public:
CollisionGroup()
:
mRecords{}
{
}
~CollisionGroup() = default;
using Record = CollisionRecord<Mesh, Bound>;
bool Insert(std::shared_ptr<Record> const& record)
{
for (size_t i = 0; i < mRecords.size(); ++i)
{
if (record.get() == mRecords[i].get())
{
return false;
}
}
mRecords.push_back(record);
return true;
}
bool Remove(std::shared_ptr<CollisionRecord<Mesh, Bound>> const& record)
{
for (size_t i = 0; i < mRecords.size(); ++i)
{
if (record.get() == mRecords[i].get())
{
mRecords.erase(mRecords.begin() + i);
return true;
}
}
return false;
}
// The objects are assumed to be stationary (the velocities are
// ignored) and all pairs of objects are compared.
void TestIntersection()
{
size_t const numRecords = mRecords.size();
for (size_t i0 = 0; i0 < numRecords; ++i0)
{
auto const& record0 = mRecords[i0];
for (size_t i1 = i0 + 1; i1 < numRecords; ++i1)
{
auto const& record1 = mRecords[i1];
record0->TestIntersection(*record1);
}
}
}
void FindIntersection()
{
size_t const numRecords = mRecords.size();
for (size_t i0 = 0; i0 < numRecords; ++i0)
{
auto const& record0 = mRecords[i0];
for (size_t i1 = i0 + 1; i1 < numRecords; ++i1)
{
auto const& record1 = mRecords[i1];
record0->FindIntersection(*record1);
}
}
}
// The objects are assumed to be moving. Objects are compared when at
// least one of them has a velocity vector associated with it. A
// velocity vector is allowed to be the zero.
void TestIntersection(float tMax)
{
size_t const numRecords = mRecords.size();
for (size_t i0 = 0; i0 < numRecords; ++i0)
{
auto const& record0 = mRecords[i0];
for (size_t i1 = i0 + 1; i1 < numRecords; ++i1)
{
auto const& record1 = mRecords[i1];
record0->TestIntersection(tMax, *record1);
}
}
}
void FindIntersection(float tMax)
{
size_t const numRecords = mRecords.size();
for (size_t i0 = 0; i0 < numRecords; ++i0)
{
auto const& record0 = mRecords[i0];
for (size_t i1 = i0 + 1; i1 < numRecords; ++i1)
{
auto const& record1 = mRecords[i1];
record0->FindIntersection(tMax, *record1);
}
}
}
private:
std::vector<std::shared_ptr<Record>> mRecords;
};
}
+121
View File
@@ -0,0 +1,121 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#include <Graphics/GTGraphicsPCH.h>
#include <Graphics/CollisionMesh.h>
using namespace gte;
CollisionMesh::CollisionMesh(std::shared_ptr<Visual> const& mesh)
:
mMesh(mesh),
mVBuffer{},
mIBuffer{},
mVertexSize(0)
{
LogAssert(
mMesh,
"The input mesh must exist.");
mVBuffer = mMesh->GetVertexBuffer();
LogAssert(
mVBuffer->GetNumElements() >= 3,
"The vertex buffer does not have enough elements.");
auto const& vformat = mVBuffer->GetFormat();
LogAssert(
vformat.GetNumAttributes() > 0,
"The vertex format must have attributes.");
VASemantic semantic{};
DFType type{};
uint32_t unit{};
uint32_t offset{};
vformat.GetAttribute(0, semantic, type, unit, offset);
LogAssert(
semantic == VASemantic::POSITION &&
(type == DF_R32G32B32_FLOAT || type == DF_R32G32B32A32_FLOAT) &&
unit == 0 &&
offset == 0,
"The vertex format does not satisfy the requirements.");
mIBuffer = mMesh->GetIndexBuffer();
LogAssert(
mIBuffer->GetNumElements() > 0,
"The index buffer does not have enough elements.");
LogAssert(
mIBuffer->GetPrimitiveType() == IPType::IP_TRIMESH,
"The index buffer must represent a triangle mesh.");
mVertexSize = static_cast<size_t>(vformat.GetVertexSize());
}
size_t CollisionMesh::GetNumVertices() const
{
return static_cast<size_t>(mVBuffer->GetNumElements());
}
Vector3<float> CollisionMesh::GetPosition(size_t i) const
{
char const* vertex = mVBuffer->GetData() + i * mVertexSize;
return *reinterpret_cast<Vector3<float> const*>(vertex);
}
size_t CollisionMesh::GetNumTriangles() const
{
return static_cast<size_t>(mIBuffer->GetNumPrimitives());
}
bool CollisionMesh::GetTriangle(size_t t, std::array<int32_t, 3>& indices) const
{
if (t < GetNumTriangles())
{
uint32_t v0{}, v1{}, v2{};
mIBuffer->GetTriangle(static_cast<uint32_t>(t), v0, v1, v2);
indices[0] = static_cast<int32_t>(v0);
indices[1] = static_cast<int32_t>(v1);
indices[2] = static_cast<int32_t>(v2);
return true;
}
return false;
}
bool CollisionMesh::GetModelTriangle(size_t t, Triangle3<float>& modelTriangle) const
{
std::array<int32_t, 3> indices{};
if (GetTriangle(t, indices))
{
for (size_t j = 0; j < 3; ++j)
{
modelTriangle.v[j] = GetPosition(indices[j]);
}
return true;
}
return false;
}
bool CollisionMesh::GetWorldTriangle(size_t t, Triangle3<float>& worldTriangle) const
{
std::array<int32_t, 3> indices{};
if (GetTriangle(t, indices))
{
Matrix4x4<float> const& hmatrix = GetWorldTransform();
Vector3<float> modelVertex{};
for (size_t j = 0; j < 3; ++j)
{
modelVertex = GetPosition(indices[j]);
worldTriangle.v[j] = HProject(hmatrix * HLift(modelVertex, 1.0f));
}
return true;
}
return false;
}
Matrix4x4<float> const& CollisionMesh::GetWorldTransform() const
{
return mMesh->worldTransform.GetHMatrix();
}
+44
View File
@@ -0,0 +1,44 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#pragma once
#include <Mathematics/Triangle.h>
#include <Graphics/Visual.h>
namespace gte
{
class CollisionMesh
{
public:
// The input 'mesh' must have a vertex buffer whose vertex format
// has first binding call
// vformat.Bind(VASemantic::POSITION, DF_R32G32B32_FLOAT, 0);
// or
// vformat.Bind(VASemantic::POSITION, DF_R32G32B32A_FLOAT, 0);
// The input 'mesh' must have an index buffer whose primitive type
// is IPType::IP_TRIMESH.
CollisionMesh(std::shared_ptr<Visual> const& mesh);
size_t GetNumVertices() const;
Vector3<float> GetPosition(size_t i) const;
size_t GetNumTriangles() const;
bool GetTriangle(size_t t, std::array<int32_t, 3>& indices) const;
bool GetModelTriangle(size_t t, Triangle3<float>& modelTriangle) const;
bool GetWorldTriangle(size_t t, Triangle3<float>& worldTriangle) const;
Matrix4x4<float> const& GetWorldTransform() const;
private:
// The triangle mesh passed to the constructor.
std::shared_ptr<Visual> mMesh;
// This is commonly accessed data from mMesh.
std::shared_ptr<VertexBuffer> mVBuffer;
std::shared_ptr<IndexBuffer> mIBuffer;
size_t mVertexSize;
};
}
+464
View File
@@ -0,0 +1,464 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#pragma once
#include <Mathematics/IntrTriangle3Triangle3.h>
#include <Graphics/BoundTree.h>
#include <functional>
// Class Mesh must have the following functions in its interface.
// size_t GetNumVertices() const;
// Vector3<float> GetPosition(size_t i) const;
// size_t GetNumTriangles() const;
// bool GetTriangle(size_t t, std::array<int32_t, 3>& indices) const;
// bool GetModelTriangle(size_t t, Triangle3<float>& modelTriangle) const;
// bool GetWorldTriangle(size_t t, Triangle3<float>& worldTriangle) const;
// Matrix4x4<float> const& GetWorldTransform() const;
// A wrapper of this type for Visual objects representing triangle meshes
// is Graphics/CollisionMesh.{h,cpp}.
//
// Class Bound must have the following functions in its interface.
// Bound();
// void ComputeFromData(uint32_t numElements, uint32_t stride,
// char const* data);
// void TransformBy(Matrix4x4<float> const& hmatrix,
// Bound& bound) const;
// bool TestIntersection(Bound const& bound) const;
// bool TestIntersection(Bound const& bound, float tmax,
// Vector3<float> const& velocity0,
// Vector3<float> const& velocity1) const;
// A wrapper of this type for bounding spheres is Graphics/BoundingSphere.h.
namespace gte
{
template <class Mesh, class Bound>
class CollisionRecord
{
public:
// The callback for test-intersection queries. The int32_t inputs are
// indices into the array of triangles in the meshes of the queries.
// The float input is the contact time, which is 0 for stationary
// objects and nonnegative for moving objects.
using TICallback = std::function<void(
CollisionRecord&, int32_t,
CollisionRecord&, int32_t,
float)>;
// The callback for find-intersection queries. The int32_t inputs are
// indices into the array of triangles in the meshes of the queries.
// The float input is the contact time, which is 0 for stationary
// objects and nonnegative for moving objects. The std::vector input
// contains the contact points.
using FICallback = std::function<void(
CollisionRecord&, int32_t,
CollisionRecord&, int32_t,
float,
std::vector<Vector3<float>> const&)>;
// Construction and destruction. The input 'tree' must be dynamically
// allocated and created using 'storeInteriorTris = true'.
CollisionRecord(
std::shared_ptr<BoundTree<Mesh, Bound>> const& tree,
Vector3<float> const& velocity,
std::shared_ptr<TICallback> const& tiCallback,
std::shared_ptr<FICallback> const& fiCallback)
:
mTree(tree),
mVelocity(velocity),
mTICallback(tiCallback),
mFICallback(fiCallback)
{
}
~CollisionRecord() = default;
// Member access.
inline std::shared_ptr<Mesh> const& GetMesh() const
{
return mTree->GetMesh();
}
inline Vector3<float> const& GetVelocity() const
{
return mVelocity;
}
inline std::shared_ptr<TICallback> const& GetTICallback() const
{
return mTICallback;
}
inline std::shared_ptr<FICallback> const& GetFICallback() const
{
return mFICallback;
}
// Intersection queries. See the comments in class CollisionGroup
// about the information that is available to the application via
// the callback function.
void TestIntersection(CollisionRecord& record)
{
// Convenience variables.
auto& tree0 = mTree;
auto& tree1 = record.mTree;
auto const& mesh0 = tree0->GetMesh();
auto const& mesh1 = tree1->GetMesh();
auto const& worldBound0 = tree0->GetWorldBound();
auto const& worldBound1 = tree1->GetWorldBound();
tree0->UpdateWorldBound();
tree1->UpdateWorldBound();
if (worldBound0.TestIntersection(worldBound1))
{
std::shared_ptr<BoundTree<Mesh, Bound>> root{};
if (tree0->IsInteriorNode())
{
root = mTree;
// Compare Tree0.L to Tree1.
mTree = root->GetLChild();
TestIntersection(record);
// Compare Tree0.R to Tree1.
mTree = root->GetRChild();
TestIntersection(record);
mTree = root;
}
else if (tree1->IsInteriorNode())
{
root = record.mTree;
// Compare Tree0 to Tree1.L.
record.mTree = root->GetLChild();
TestIntersection(record);
// Compare Tree0 to Tree1.R.
record.mTree = root->GetRChild();
TestIntersection(record);
record.mTree = root;
}
else
{
// The traversal is at a leaf in each tree.
int32_t numTriangles0 = tree0->GetNumTriangles();
for (int32_t i0 = 0; i0 < numTriangles0; ++i0)
{
// Get the world space triangle.
int32_t t0 = tree0->GetTriangle(i0);
Triangle3<float> tri0{};
mesh0->GetWorldTriangle(t0, tri0);
int32_t numTriangles1 = tree1->GetNumTriangles();
for (int32_t i1 = 0; i1 < numTriangles1; ++i1)
{
// Get the world space triangle.
int32_t t1 = tree1->GetTriangle(i1);
Triangle3<float> tri1{};
mesh1->GetWorldTriangle(t1, tri1);
TIQuery<float, Triangle3<float>, Triangle3<float>> calc{};
auto const& result = calc(tri0, tri1);
if (result.intersect)
{
if (mTICallback)
{
(*mTICallback)(
*this, t0, record, t1, 0.0f);
}
if (record.mTICallback)
{
(*record.mTICallback)(
record, t1, *this, t0, 0.0f);
}
}
}
}
}
}
}
void FindIntersection(CollisionRecord& record)
{
// Convenience variables.
auto& tree0 = mTree;
auto& tree1 = record.mTree;
auto const& mesh0 = tree0->GetMesh();
auto const& mesh1 = tree1->GetMesh();
auto const& worldBound0 = tree0->GetWorldBound();
auto const& worldBound1 = tree1->GetWorldBound();
tree0->UpdateWorldBound();
tree1->UpdateWorldBound();
if (worldBound0.TestIntersection(worldBound1))
{
std::shared_ptr<BoundTree<Mesh, Bound>> root{};
if (tree0->IsInteriorNode())
{
root = mTree;
// Compare Tree0.L to Tree1.
mTree = root->GetLChild();
FindIntersection(record);
// Compare Tree0.R to Tree1.
mTree = root->GetRChild();
FindIntersection(record);
mTree = root;
}
else if (tree1->IsInteriorNode())
{
root = record.mTree;
// Compare Tree0 to Tree1.L.
record.mTree = root->GetLChild();
FindIntersection(record);
// Compare Tree0 to Tree1.R.
record.mTree = root->GetRChild();
FindIntersection(record);
record.mTree = root;
}
else
{
// The traversal is at a leaf in each tree.
int32_t numTriangles0 = tree0->GetNumTriangles();
for (int32_t i0 = 0; i0 < numTriangles0; ++i0)
{
// Get the world space triangle.
int32_t t0 = tree0->GetTriangle(i0);
Triangle3<float> tri0{};
mesh0->GetWorldTriangle(t0, tri0);
int32_t numTriangles1 = tree1->GetNumTriangles();
for (int32_t i1 = 0; i1 < numTriangles1; ++i1)
{
// Get the world space triangle.
int32_t t1 = tree1->GetTriangle(i1);
Triangle3<float> tri1{};
mesh1->GetWorldTriangle(t1, tri1);
FIQuery<float, Triangle3<float>, Triangle3<float>> calc{};
auto const& result = calc(tri0, tri1);
if (result.intersect)
{
if (mFICallback)
{
(*mFICallback)(
*this, t0, record, t1,
0.0f, result.intersection);
}
if (record.mFICallback)
{
(*record.mFICallback)(
record, t1, *this, t0,
0.0f, result.intersection);
}
}
}
}
}
}
}
void TestIntersection(float tMax, CollisionRecord& record)
{
// Convenience variables.
auto& tree0 = mTree;
auto& tree1 = record.mTree;
auto const& mesh0 = tree0->GetMesh();
auto const& mesh1 = tree1->GetMesh();
auto const& worldBound0 = tree0->GetWorldBound();
auto const& worldBound1 = tree1->GetWorldBound();
auto const& velocity0 = mVelocity;
auto const& velocity1 = record.mVelocity;
tree0->UpdateWorldBound();
tree1->UpdateWorldBound();
if (worldBound0.TestIntersection(worldBound1, tMax, velocity0, velocity1))
{
std::shared_ptr<BoundTree<Mesh, Bound>> root{};
if (tree0->IsInteriorNode())
{
root = mTree;
// Compare Tree0.L to Tree1.
mTree = root->GetLChild();
TestIntersection(tMax, record);
// Compare Tree0.R to Tree1.
mTree = root->GetRChild();
TestIntersection(tMax, record);
mTree = root;
}
else if (tree1->IsInteriorNode())
{
root = record.mTree;
// Compare Tree0 to Tree1.L.
record.mTree = root->GetLChild();
TestIntersection(tMax, record);
// Compare Tree0 to Tree1.R.
record.mTree = root->GetRChild();
TestIntersection(tMax, record);
record.mTree = root;
}
else
{
// The traversal is at a leaf in each tree.
int32_t numTriangles0 = tree0->GetNumTriangles();
for (int32_t i0 = 0; i0 < numTriangles0; ++i0)
{
// Get the world space triangle.
int32_t t0 = tree0->GetTriangle(i0);
Triangle3<float> tri0{};
mesh0->GetWorldTriangle(t0, tri0);
int32_t numTriangles1 = tree1->GetNumTriangles();
for (int32_t i1 = 0; i1 < numTriangles1; ++i1)
{
// Get the world space triangle.
int32_t t1 = tree1->GetTriangle(i1);
Triangle3<float> tri1{};
mesh1->GetWorldTriangle(t1, tri1);
TIQuery<float, Triangle3<float>, Triangle3<float>> calc{};
auto const& result = calc(tMax, tri0, velocity0, tri1, velocity1);
if (result.intersect)
{
if (mTICallback)
{
(*mTICallback)(
*this, t0, record, t1,
result.contactTime);
}
if (record.mTICallback)
{
(*record.mTICallback)(
record, t1, *this, t0,
result.contactTime);
}
}
}
}
}
}
}
void FindIntersection(float tMax, CollisionRecord& record)
{
// Convenience variables.
auto& tree0 = mTree;
auto& tree1 = record.mTree;
auto const& mesh0 = tree0->GetMesh();
auto const& mesh1 = tree1->GetMesh();
auto const& worldBound0 = tree0->GetWorldBound();
auto const& worldBound1 = tree1->GetWorldBound();
auto const& velocity0 = mVelocity;
auto const& velocity1 = record.mVelocity;
tree0->UpdateWorldBound();
tree1->UpdateWorldBound();
if (worldBound0.TestIntersection(worldBound1, tMax, velocity0, velocity1))
{
std::shared_ptr<BoundTree<Mesh, Bound>> root{};
if (tree0->IsInteriorNode())
{
root = mTree;
// Compare Tree0.L to Tree1.
mTree = root->GetLChild();
FindIntersection(tMax, record);
// Compare Tree0.R to Tree1.
mTree = root->GetRChild();
FindIntersection(tMax, record);
mTree = root;
}
else if (tree1->IsInteriorNode())
{
root = record.mTree;
// Compare Tree0 to Tree1.L.
record.mTree = root->GetLChild();
FindIntersection(tMax, record);
// compare Tree0 to Tree1.R
record.mTree = root->GetRChild();
FindIntersection(tMax, record);
record.mTree = root;
}
else
{
// The traversal is at a leaf in each tree.
int32_t numTriangles0 = tree0->GetNumTriangles();
for (int32_t i0 = 0; i0 < numTriangles0; ++i0)
{
// Get the world space triangle.
int32_t t0 = tree0->GetTriangle(i0);
Triangle3<float> tri0{};
mesh0->GetWorldTriangle(t0, tri0);
int32_t numTriangles1 = tree1->GetNumTriangles();
for (int32_t i1 = 0; i1 < numTriangles1; ++i1)
{
// Get the world space triangle.
int32_t t1 = tree1->GetTriangle(i1);
Triangle3<float> tri1{};
mesh1->GetWorldTriangle(t1, tri1);
FIQuery<float, Triangle3<float>, Triangle3<float>> calc{};
auto const& result = calc(tMax, tri0, velocity0, tri1, velocity1);
if (result.intersect)
{
if (mFICallback)
{
(*mFICallback)(
*this, t0, record, t1,
result.contactTime, result.intersection);
}
if (record.mFICallback)
{
(*record.mFICallback)(
record, t1, *this, t0,
result.contactTime, result.intersection);
}
}
}
}
}
}
}
private:
std::shared_ptr<BoundTree<Mesh, Bound>> mTree;
Vector3<float> mVelocity;
std::shared_ptr<TICallback> mTICallback;
std::shared_ptr<FICallback> mFICallback;
};
}
+6 -1
View File
@@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.0.2022.03.06
// Version: 6.0.2022.03.20
#pragma once
@@ -88,6 +88,11 @@
// SceneGraph
#include <Graphics/MeshFactory.h>
// SceneGraph/CollisionDetection
#include <Graphics/CollisionGroup.h>
#include <Graphics/CollisionRecord.h>
#include <Graphics/CollisionMesh.h>
// SceneGraph/Controllers
#include <Graphics/BlendTransformController.h>
#include <Graphics/Controller.h>
+730 -8
View File
@@ -3,7 +3,7 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.0.2022.03.18
// Version: 6.0.2022.03.20
#pragma once
@@ -49,13 +49,18 @@ namespace gte
{
Result()
:
intersect(false)
intersect(false),
contactTime(static_cast<T>(0))
{
}
// The contact time is 0 for stationary triangles. It is
// nonnegative for moving triangles.
bool intersect;
T contactTime;
};
// The query is for stationary triangles.
Result operator()(Triangle3<T> const& inTriangle0, Triangle3<T> const& inTriangle1)
{
Result result{};
@@ -89,7 +94,6 @@ namespace gte
std::array<T, 2> tExtreme1 = ScaleProjectOntoLine(triangle1, N0);
if (tExtreme0[1] < tExtreme1[0] || tExtreme1[1] < tExtreme0[0])
{
result.intersect = false;
return result;
}
@@ -100,7 +104,7 @@ namespace gte
triangle1.v[2] - triangle1.v[1],
triangle1.v[0] - triangle1.v[2]
};
Vector3<T> N1 = Cross(E1[0],E1[1]);
Vector3<T> N1 = Cross(E1[0], E1[1]);
// Scale-project triangle0 onto the normal line of triangle1 and
// test for separation.
@@ -109,7 +113,6 @@ namespace gte
tExtreme1 = ScaleProjectOntoLine(triangle0, N1);
if (tExtreme0[1] < tExtreme1[0] || tExtreme1[1] < tExtreme0[0])
{
result.intersect = false;
return result;
}
@@ -143,7 +146,6 @@ namespace gte
tExtreme1 = ScaleProjectOntoLine(triangle1, direction);
if (tExtreme0[1] < tExtreme1[0] || tExtreme1[1] < tExtreme0[0])
{
result.intersect = false;
return result;
}
}
@@ -164,7 +166,6 @@ namespace gte
tExtreme1 = ScaleProjectOntoLine(triangle1, direction);
if (tExtreme0[1] < tExtreme1[0] || tExtreme1[1] < tExtreme0[0])
{
result.intersect = false;
return result;
}
}
@@ -177,7 +178,6 @@ namespace gte
tExtreme1 = ScaleProjectOntoLine(triangle1, direction);
if (tExtreme0[1] < tExtreme1[0] || tExtreme1[1] < tExtreme0[0])
{
result.intersect = false;
return result;
}
}
@@ -187,6 +187,123 @@ namespace gte
return result;
}
// The query is for triangles moving with constant linear velocity
// during the time interval [0,tMax].
Result operator()(T const& tMax,
Triangle3<T> const& inTriangle0, Vector3<T> const& velocity0,
Triangle3<T> const& inTriangle1, Vector3<T> const& velocity1)
{
Result result{};
// The query determines the interval [tFirst,tLast] over which
// the triangle are intersecting. Start with time interval
// [0,+infinity).
T tFirst = static_cast<T>(0);
T tLast = std::numeric_limits<T>::max();
// Compute the velocity of inTriangle1 relative to inTriangle0.
Vector3<T> relVelocity = velocity1 - velocity0;
// Translate the triangles so that triangle0.v[0] becomes (0,0,0).
T const zero = static_cast<T>(0);
Vector3<T> const& origin = inTriangle0.v[0];
Triangle3<T> triangle0(
Vector3<T>{ zero, zero, zero },
inTriangle0.v[1] - origin,
inTriangle0.v[2] - origin);
Triangle3<T> triangle1(
inTriangle1.v[0] - origin,
inTriangle1.v[1] - origin,
inTriangle1.v[2] - origin);
// Get edge directions and a normal vector for triangle0.
std::array<Vector3<T>, 3> E0
{
triangle0.v[1] - triangle0.v[0],
triangle0.v[2] - triangle0.v[1],
triangle0.v[0] - triangle0.v[2]
};
Vector3<T> N0 = Cross(E0[0], E0[1]);
// Test for overlap using the separating axis test in the N0
// direction.
if (!TestOverlap(triangle0, triangle1, N0, tMax, relVelocity,
tFirst, tLast))
{
return result;
}
// Get edge directions and a normal vector for triangle1.
std::array<Vector3<T>, 3> E1
{
triangle1.v[1] - triangle1.v[0],
triangle1.v[2] - triangle1.v[1],
triangle1.v[0] - triangle1.v[2]
};
Vector3<T> N1 = Cross(E1[0], E1[1]);
if (std::fabs(Dot(N0, N1)) < static_cast<T>(1))
{
// The triangles are not parallel.
// Test for overlap using the separating axis test in the
// N1 direction.
if (!TestOverlap(triangle0, triangle1, N1, tMax,
relVelocity, tFirst, tLast))
{
return result;
}
// Test for overlap using the separating axis test in the
// directions E0[i0]xE1[i1].
for (size_t i1 = 0; i1 < 3; ++i1)
{
for (size_t i0 = 0; i0 < 3; ++i0)
{
Vector3<T> direction = UnitCross(E0[i0], E1[i1]);
if (!TestOverlap(triangle0, triangle1, direction,
tMax, relVelocity, tFirst, tLast))
{
return result;
}
}
}
}
else
{
// The triangles are coplanar.
// Test for overlap using the separating axis test in the
// directions N0xE0[i0].
for (size_t i0 = 0; i0 < 3; ++i0)
{
Vector3<T> direction = UnitCross(N0, E0[i0]);
if (!TestOverlap(triangle0, triangle1, direction,
tMax, relVelocity, tFirst, tLast))
{
return result;
}
}
// Test for overlap using the separating axis test in the
// directions N1xE1[i1].
for (size_t i1 = 0; i1 < 3; ++i1)
{
Vector3<T> direction = UnitCross(N1, E1[i1]);
if (!TestOverlap(triangle0, triangle1, direction,
tMax, relVelocity, tFirst, tLast))
{
return result;
}
}
}
result.intersect = true;
result.contactTime = tFirst;
return result;
}
private:
// The triangle is <V[0],V[1],V[2]>. The line is t*direction, where
// the origin is (0,0,0) and the 'direction' is not zero but not
@@ -213,6 +330,143 @@ namespace gte
}
return tExtreme;
}
// This is the constant velocity separating axis test.
static bool TestOverlap(T const& tMax, T const& speed,
std::array<T, 2> const& extreme0, std::array<T, 2> const& extreme1,
T& tFirst, T& tLast)
{
T const zero = static_cast<T>(0);
if (extreme1[1] < extreme0[0])
{
// The interval extreme1 is on the left of the interval
// extreme0.
if (speed <= zero)
{
// The interval extreme1 is moving away from the interval
// extreme0.
return false;
}
// Compute the first time of contact on this axis.
T t = (extreme0[0] - extreme1[1]) / speed;
if (t > tFirst)
{
tFirst = t;
}
if (tFirst > tMax)
{
// The intersection occurs after the specified maximum
// time.
return false;
}
// Compute the last time of contact on this axis.
t = (extreme0[1] - extreme1[0]) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are not
// intersecting.
return false;
}
}
else if (extreme0[1] < extreme1[0])
{
// The interval extreme1 is on the right of the interval
// extreme0.
if (speed >= zero)
{
// The interval extreme1 is moving away from the interval
// extreme0.
return false;
}
// Compute the first time of contact on this axis.
T t = (extreme0[1] - extreme1[0]) / speed;
if (t > tFirst)
{
tFirst = t;
}
if (tFirst > tMax)
{
// The intersection occurs after the specified maximum
// time.
return false;
}
// Compute the last time of contact on this axis.
t = (extreme0[0] - extreme1[1]) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are not
// intersecting.
return false;
}
}
else
{
// The intervals extreme0 and extreme1 are currently
// overlapping.
if (speed > zero)
{
// Compute the last time of contact on this axis.
T t = (extreme0[1] - extreme1[0]) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are
// not intersecting.
return false;
}
}
else if (speed < zero)
{
// Compute the last time of contact on this axis.
T t = (extreme0[0] - extreme1[1]) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are
// not intersecting.
return false;
}
}
}
return true;
}
// A projection wrapper to set up for the separating axis test.
static bool TestOverlap(Triangle3<T> const& triangle0,
Triangle3<T> const& triangle1, Vector3<T> const& direction,
T const& tMax, Vector3<T> const& velocity, T& tFirst, T& tLast)
{
auto extreme0 = ScaleProjectOntoLine(triangle0, direction);
auto extreme1 = ScaleProjectOntoLine(triangle1, direction);
T speed = Dot(direction, velocity);
return TestOverlap(tMax, speed, extreme0, extreme1, tFirst, tLast);
}
};
template <typename T>
@@ -224,14 +478,19 @@ namespace gte
Result()
:
intersect(false),
contactTime(static_cast<T>(0)),
intersection{}
{
}
// The contact time is 0 for stationary triangles. It is
// nonnegative for moving triangles.
bool intersect;
T contactTime;
std::vector<Vector3<T>> intersection;
};
// The query is for stationary triangles.
Result operator()(Triangle3<T> const& inTriangle0, Triangle3<T> const& inTriangle1)
{
Result result{};
@@ -376,6 +635,135 @@ namespace gte
return result;
}
// The query is for triangles moving with constant linear velocity
// during the time interval [0,tMax].
Result operator()(T const& tMax,
Triangle3<T> const& inTriangle0, Vector3<T> const& velocity0,
Triangle3<T> const& inTriangle1, Vector3<T> const& velocity1)
{
Result result{};
// The query determines the interval [tFirst,tLast] over which
// the triangle are intersecting. Start with time interval
// [0,+infinity).
T tFirst = static_cast<T>(0);
T tLast = std::numeric_limits<T>::max();
// Compute the velocity of inTriangle1 relative to inTriangle0.
Vector3<T> relVelocity = velocity1 - velocity0;
// Translate the triangles so that triangle0.v[0] becomes (0,0,0).
T const zero = static_cast<T>(0);
Vector3<T> const& origin = inTriangle0.v[0];
Triangle3<T> triangle0(
Vector3<T>{ zero, zero, zero },
inTriangle0.v[1] - origin,
inTriangle0.v[2] - origin);
Triangle3<T> triangle1(
inTriangle1.v[0] - origin,
inTriangle1.v[1] - origin,
inTriangle1.v[2] - origin);
// Get edge directions and a normal vector for triangle0.
std::array<Vector3<T>, 3> E0
{
triangle0.v[1] - triangle0.v[0],
triangle0.v[2] - triangle0.v[1],
triangle0.v[0] - triangle0.v[2]
};
Vector3<T> N0 = Cross(E0[0], E0[1]);
// Find overlap using the separating axis test in the N0
// direction.
ContactSide side = ContactSide::CS_NONE;
Configuration tcfg0{}, tcfg1{};
if (!FindOverlap(triangle0, triangle1, N0, tMax, relVelocity,
side, tcfg0, tcfg1, tFirst, tLast))
{
return result;
}
// Get edge directions and a normal vector for triangle1.
std::array<Vector3<T>, 3> E1
{
triangle1.v[1] - triangle1.v[0],
triangle1.v[2] - triangle1.v[1],
triangle1.v[0] - triangle1.v[2]
};
Vector3<T> N1 = Cross(E1[0], E1[1]);
if (std::fabs(Dot(N0, N1)) < static_cast<T>(1))
{
// The triangles are not parallel.
// Test for overlap using the separating axis test in the
// N1 direction.
if (!FindOverlap(triangle0, triangle1, N1, tMax,
relVelocity, side, tcfg0, tcfg1, tFirst, tLast))
{
return result;
}
// Test for overlap using the separating axis test in the
// directions E0[i0]xE1[i1].
for (size_t i1 = 0; i1 < 3; ++i1)
{
for (size_t i0 = 0; i0 < 3; ++i0)
{
Vector3<T> direction = UnitCross(E0[i0], E1[i1]);
if (!FindOverlap(triangle0, triangle1, direction,
tMax, relVelocity, side, tcfg0, tcfg1, tFirst, tLast))
{
return result;
}
}
}
}
else
{
// The triangles are coplanar.
// Test for overlap using the separating axis test in the
// directions N0xE0[i0].
for (size_t i0 = 0; i0 < 3; ++i0)
{
Vector3<T> direction = UnitCross(N0, E0[i0]);
if (!FindOverlap(triangle0, triangle1, direction,
tMax, relVelocity, side, tcfg0, tcfg1, tFirst, tLast))
{
return result;
}
}
// Test for overlap using the separating axis test in the
// directions N1xE1[i1].
for (size_t i1 = 0; i1 < 3; ++i1)
{
Vector3<T> direction = UnitCross(N1, E1[i1]);
if (!FindOverlap(triangle0, triangle1, direction,
tMax, relVelocity, side, tcfg0, tcfg1, tFirst, tLast))
{
return result;
}
}
}
// Move the triangles to the first contact before computing
// the contact set.
for (size_t i = 0; i < 3; ++i)
{
triangle0.v[i] = inTriangle0.v[i] + tFirst * velocity0;
triangle1.v[i] = inTriangle1.v[i] + tFirst * velocity1;
}
auto stationary = this->operator()(triangle0, triangle1);
result.intersect = true;
result.contactTime = tFirst;
result.intersection = std::move(stationary.intersection);
return result;
}
private:
// Compute the point, segment or polygon of intersection of coplanar
// triangles. The intersection is computed by projecting the triangles
@@ -618,5 +1006,339 @@ namespace gte
trg[lookup[2]] = -(normal[lookup[0]] * trg[lookup[0]] +
normal[lookup[1]] * trg[lookup[1]]) / normal[lookup[2]];
}
// Support for the query for moving triangles.
enum class ProjectionMap
{
// Initial value for construction of Configuration.
PM_INVALID,
// 3 vertices project to the same point (min = max).
PM_3,
// 2 vertices project to a point (min) and 1 vertex projects to
// a point (max).
PM_21,
// 1 vertex projects to a point (min) and 2 vertices project to
// a point (max).
PM_12,
// 1 vertex projects to a point (min), 1 vertex projects to a
// point (max) and 1 vertex projects to a point strictly between
// the min and max points.
PM_111
};
struct Configuration
{
Configuration()
:
map(ProjectionMap::PM_INVALID),
index{ 0, 0, 0, 0, 0, 0, 0, 0 },
min(static_cast<T>(0)),
max(static_cast<T>(0))
{
}
// This is how the vertices map to the projection interval.
ProjectionMap map;
// The sorted indices of the vertices.
std::array<int32_t, 8> index;
// The projection interval [min,max].
T min, max;
};
enum class ContactSide
{
CS_LEFT,
CS_RIGHT,
CS_NONE
};
// The triangle is <V[0],V[1],V[2]>. The line is t*direction, where
// the origin is (0,0,0) and the 'direction' is not zero but not
// necessarily unit length. The projections of the triangle vertices
// onto the line are t[i] = Dot(direction, V[i]). Return the
// configuration of the triangle that lead to the extreme interval.
static void ScaleProjectOntoLine(Triangle3<T> const& triangle,
Vector3<T> const& direction, Configuration& cfg)
{
// Find the projections of the triangle vertices onto the
// potential separating axis.
T d0 = Dot(direction, triangle.v[0]);
T d1 = Dot(direction, triangle.v[1]);
T d2 = Dot(direction, triangle.v[2]);
// Explicit sort of vertices to construct a Configuration object.
if (d0 <= d1)
{
if (d1 <= d2) // d0 <= d1 <= d2
{
if (d0 != d1)
{
if (d1 != d2)
{
cfg.map = ProjectionMap::PM_111;
}
else
{
cfg.map = ProjectionMap::PM_12;
}
}
else // d0 = d1
{
if (d1 != d2)
{
cfg.map = ProjectionMap::PM_21;
}
else
{
cfg.map = ProjectionMap::PM_3;
}
}
cfg.index[0] = 0;
cfg.index[1] = 1;
cfg.index[2] = 2;
cfg.min = d0;
cfg.max = d2;
}
else if (d0 <= d2) // d0 <= d2 < d1
{
if (d0 != d2)
{
cfg.map = ProjectionMap::PM_111;
cfg.index[0] = 0;
cfg.index[1] = 2;
cfg.index[2] = 1;
}
else
{
cfg.map = ProjectionMap::PM_21;
cfg.index[0] = 2;
cfg.index[1] = 0;
cfg.index[2] = 1;
}
cfg.min = d0;
cfg.max = d1;
}
else // d2 < d0 <= d1
{
if (d0 != d1)
{
cfg.map = ProjectionMap::PM_111;
}
else
{
cfg.map = ProjectionMap::PM_12;
}
cfg.index[0] = 2;
cfg.index[1] = 0;
cfg.index[2] = 1;
cfg.min = d2;
cfg.max = d1;
}
}
else if (d2 <= d1) // d2 <= d1 < d0
{
if (d2 != d1)
{
cfg.map = ProjectionMap::PM_111;
cfg.index[0] = 2;
cfg.index[1] = 1;
cfg.index[2] = 0;
}
else
{
cfg.map = ProjectionMap::PM_21;
cfg.index[0] = 1;
cfg.index[1] = 2;
cfg.index[2] = 0;
}
cfg.min = d2;
cfg.max = d0;
}
else if (d2 <= d0) // d1 < d2 <= d0
{
if (d2 != d0)
{
cfg.map = ProjectionMap::PM_111;
}
else
{
cfg.map = ProjectionMap::PM_12;
}
cfg.index[0] = 1;
cfg.index[1] = 2;
cfg.index[2] = 0;
cfg.min = d1;
cfg.max = d0;
}
else // d1 < d0 < d2
{
cfg.map = ProjectionMap::PM_111;
cfg.index[0] = 1;
cfg.index[1] = 0;
cfg.index[2] = 2;
cfg.min = d1;
cfg.max = d2;
}
}
// This is the constant velocity separating axis test. The cfg0 and
// cfg1 inputs are the configurations for the triangles at time 0.
// The tcfg0 and tcfg1 are the configurations at contact time.
static bool FindOverlap(T const& tMax, T const& speed,
Configuration const& cfg0, Configuration const& cfg1,
ContactSide& side, Configuration& tcfg0, Configuration& tcfg1,
T& tFirst, T& tLast)
{
T const zero = static_cast<T>(0);
if (cfg1.max < cfg0.min)
{
// The cfg1 interval is on the left of the cfg0 interval.
if (speed <= zero)
{
// The cfg1 interval is moving away from the cfg0
// interval.
return false;
}
// Compute the first time of contact on this axis.
T t = (cfg0.min - cfg1.max) / speed;
if (t > tFirst)
{
// Time t is the new maximum first time of contact.
tFirst = t;
side = ContactSide::CS_LEFT;
tcfg0 = cfg0;
tcfg1 = cfg1;
}
if (tFirst > tMax)
{
// The intersection occurs after the specified maximum
// time.
return false;
}
// Compute the last time of contact on this axis.
t = (cfg0.max - cfg1.min) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are
// not intersecting.
return false;
}
}
else if (cfg0.max < cfg1.min)
{
// The cfg1 interval is on the right of the cfg0 interval.
if (speed >= zero)
{
// The cfg1 interval is moving away from the cfg0
// interval.
return false;
}
// Compute the first time of contact on this axis.
T t = (cfg0.max - cfg1.min) / speed;
if (t > tFirst)
{
// Time t is the new maximum first time of contact.
tFirst = t;
side = ContactSide::CS_RIGHT;
tcfg0 = cfg0;
tcfg1 = cfg1;
}
if (tFirst > tMax)
{
// The intersection occurs after the specified maximum
// time.
return false;
}
// Compute the last time of contact on this axis.
t = (cfg0.min - cfg1.max) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are
// not intersecting.
return false;
}
}
else
{
// The intervals for cfg0 and cfg1 are currently
// overlapping.
if (speed > zero)
{
// Compute the last time of contact on this axis.
T t = (cfg0.max - cfg1.min) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are
// not intersecting.
return false;
}
}
else if (speed < zero)
{
// Compute the last time of contact on this axis.
T t = (cfg0.min - cfg1.max) / speed;
if (t < tLast)
{
tLast = t;
}
if (tFirst > tLast)
{
// The time interval is invalid, so the objects are
// not intersecting.
return false;
}
}
}
return true;
}
// A projection wrapper to set up for the separating axis test.
static bool FindOverlap(Triangle3<T> const& triangle0,
Triangle3<T> const& triangle1, Vector3<T> const& direction,
T const& tMax, Vector3<T> const& velocity, ContactSide& side,
Configuration& tcfg0, Configuration& tcfg1, T& tFirst, T& tLast)
{
Configuration cfg0{}, cfg1{};
ScaleProjectOntoLine(triangle0, direction, cfg0);
ScaleProjectOntoLine(triangle1, direction, cfg1);
T speed = Dot(direction, velocity);
return FindOverlap(tMax, speed, cfg0, cfg1, side, tcfg0, tcfg1,
tFirst, tLast);
}
};
}
@@ -0,0 +1,84 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Debug Static",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/DebugStatic/${workspaceFolderBasename}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Launch Release Static",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/ReleaseStatic/${workspaceFolderBasename}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Launch Debug Shared",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/DebugShared/${workspaceFolderBasename}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Launch Release Shared",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/ReleaseShared/${workspaceFolderBasename}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
@@ -0,0 +1,3 @@
{
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}
@@ -0,0 +1,56 @@
if(COMMAND cmake_policy)
# Allow VERSION in the project() statement.
cmake_policy(SET CMP0048 NEW)
endif()
project(CollisionsBoundTree)
cmake_minimum_required(VERSION 3.8)
option(BUILD_RELEASE_LIB "Build release library" OFF)
option(BUILD_SHARED_LIB "Build shared library" OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_definitions(-DGTE_USE_LINUX -DGTE_USE_ROW_MAJOR -DGTE_USE_MAT_VEC -DGTE_USE_OPENGL -DGTE_DISABLE_PCH)
add_compile_options(-c -Wall -Werror)
if(BUILD_RELEASE_LIB)
add_compile_definitions(NDEBUG)
add_compile_options(-O3)
else()
add_compile_definitions(_DEBUG)
add_compile_options(-g)
endif()
set(GTE_ROOT ${PROJECT_SOURCE_DIR}/../../..)
set(GTE_INC_DIR ${GTE_ROOT})
set(GTE_LIB_PREFIX ${GTE_ROOT}/lib/${CMAKE_BUILD_TYPE})
set(GTE_EXE_PREFIX ${PROJECT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE})
if(BUILD_SHARED_LIB)
set(GTE_LIB_DIR ${GTE_LIB_PREFIX}Shared)
set(GTE_EXE_DIR ${GTE_EXE_PREFIX}Shared)
else()
set(GTE_LIB_DIR ${GTE_LIB_PREFIX}Static)
set(GTE_EXE_DIR ${GTE_EXE_PREFIX}Static)
endif()
set(EXECUTABLE_OUTPUT_PATH ${GTE_EXE_DIR} CACHE PATH "Executable directory" FORCE)
SET(EXECUTABLE_OUTPUT_PATH ${GTE_EXE_DIR})
include_directories(${GTE_INC_DIR})
add_executable(${PROJECT_NAME}
${PROJECT_NAME}Main.cpp
${PROJECT_NAME}Window3.cpp)
find_package(PNG REQUIRED)
find_package(Threads REQUIRED)
target_link_directories(${PROJECT_NAME} PUBLIC ${GTE_LIB_DIR})
target_link_libraries(${PROJECT_NAME}
gtapplications
gtmathematicsgpu
gtgraphics
GL
EGL
X11
PNG::PNG
Threads::Threads)
@@ -0,0 +1,35 @@
#!/bin/bash
# usage: ./CMakeSample.sh BUILD_TYPE LIBRARY_TYPE
# where BUILD_TYPE is in {Debug,Release}
# and where LIBRARY_TYPE is in {Static,Shared}
BUILD_TYPE=$1
LIBRARY_TYPE=$2
GCC=gcc
GXX=g++
if [[ ! "${BUILD_TYPE}" = "Debug" && ! "${BUILD_TYPE}" = "Release" ]]; then
echo "Invalid build type: ${BUILD_TYPE}, must be in {Debug, Release}"
exit 1
fi
if [[ ! "${LIBRARY_TYPE}" = "Static" && ! "${LIBRARY_TYPE}" = "Shared" ]]; then
echo "Invalid library type: ${LIBRARY_TYPE}, must be in {Static, Shared}"
exit 2
fi
if [ "${BUILD_TYPE}" = "Debug" ]; then
if [ "${LIBRARY_TYPE}" = "Static" ]; then
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_RELEASE_LIB:BOOL=FALSE -DBUILD_SHARED_LIB:BOOL=FALSE -DCMAKE_C_COMPILER:FILEPATH=${GCC} -DCMAKE_CXX_COMPILER:FILEPATH=${GXX} -B./build -G "Unix Makefiles"
else
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_RELEASE_LIB:BOOL=FALSE -DBUILD_SHARED_LIB:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=${GCC} -DCMAKE_CXX_COMPILER:FILEPATH=${GXX} -B./build -G "Unix Makefiles"
fi
cmake --build ./build --config Debug --target all -- -j 10
else
if [ "${LIBRARY_TYPE}" = "Static" ]; then
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_RELEASE_LIB:BOOL=TRUE -DBUILD_SHARED_LIB:BOOL=FALSE -DCMAKE_C_COMPILER:FILEPATH=${GCC} -DCMAKE_CXX_COMPILER:FILEPATH=${GXX} -B./build -G "Unix Makefiles"
else
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_RELEASE_LIB:BOOL=TRUE -DBUILD_SHARED_LIB:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=${GCC} -DCMAKE_CXX_COMPILER:FILEPATH=${GXX} -B./build -G "Unix Makefiles"
fi
cmake --build ./build --config Release --target all -- -j 10
fi
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
@@ -0,0 +1,79 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.156
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CollisionsBoundTreeDX11.v16", "CollisionsBoundTreeDX11.v16.vcxproj", "{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Required", "Required", "{377A6F9A-334C-4348-B6C5-36745A813CFC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTMathematics.v16", "..\..\..\GTMathematics.v16.vcxproj", "{3F553568-76EF-48F0-88DD-270482C058B9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphics.v16", "..\..\..\GTGraphics.v16.vcxproj", "{ED37722A-40DE-4B07-9A4A-65E978D43643}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphicsDX11.v16", "..\..\..\GTGraphicsDX11.v16.vcxproj", "{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTApplicationsDX11.v16", "..\..\..\GTApplicationsDX11.v16.vcxproj", "{85367BB5-0DE5-477A-B880-0005612F8D1C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Debug|x64.ActiveCfg = Debug|x64
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Debug|x64.Build.0 = Debug|x64
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Debug|x86.ActiveCfg = Debug|Win32
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Debug|x86.Build.0 = Debug|Win32
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Release|x64.ActiveCfg = Release|x64
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Release|x64.Build.0 = Release|x64
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Release|x86.ActiveCfg = Release|Win32
{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}.Release|x86.Build.0 = Release|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x64.ActiveCfg = Debug|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x64.Build.0 = Debug|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x86.ActiveCfg = Debug|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x86.Build.0 = Debug|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x64.ActiveCfg = Release|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x64.Build.0 = Release|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x86.ActiveCfg = Release|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x86.Build.0 = Release|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x64.ActiveCfg = Debug|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x64.Build.0 = Debug|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x86.ActiveCfg = Debug|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x86.Build.0 = Debug|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x64.ActiveCfg = Release|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x64.Build.0 = Release|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x86.ActiveCfg = Release|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x86.Build.0 = Release|Win32
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Debug|x64.ActiveCfg = Debug|x64
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Debug|x64.Build.0 = Debug|x64
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Debug|x86.ActiveCfg = Debug|Win32
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Debug|x86.Build.0 = Debug|Win32
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Release|x64.ActiveCfg = Release|x64
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Release|x64.Build.0 = Release|x64
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Release|x86.ActiveCfg = Release|Win32
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}.Release|x86.Build.0 = Release|Win32
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Debug|x64.ActiveCfg = Debug|x64
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Debug|x64.Build.0 = Debug|x64
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Debug|x86.ActiveCfg = Debug|Win32
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Debug|x86.Build.0 = Debug|Win32
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Release|x64.ActiveCfg = Release|x64
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Release|x64.Build.0 = Release|x64
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Release|x86.ActiveCfg = Release|Win32
{85367BB5-0DE5-477A-B880-0005612F8D1C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3F553568-76EF-48F0-88DD-270482C058B9} = {377A6F9A-334C-4348-B6C5-36745A813CFC}
{ED37722A-40DE-4B07-9A4A-65E978D43643} = {377A6F9A-334C-4348-B6C5-36745A813CFC}
{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC} = {377A6F9A-334C-4348-B6C5-36745A813CFC}
{85367BB5-0DE5-477A-B880-0005612F8D1C} = {377A6F9A-334C-4348-B6C5-36745A813CFC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7AD89D60-3C88-4439-AD7C-A9E0BE5548DB}
EndGlobalSection
EndGlobal
@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{DB8CF558-1CF0-4A85-9DB9-260D3F4E6D66}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CollisionsBoundTree.v16</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp" />
<ClCompile Include="CollisionsBoundTreeMain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\GTApplicationsDX11.v16.vcxproj">
<Project>{85367BB5-0DE5-477A-B880-0005612F8D1C}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphics.v16.vcxproj">
<Project>{ED37722A-40DE-4B07-9A4A-65E978D43643}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphicsDX11.v16.vcxproj">
<Project>{B24EA8FC-D596-42A1-AA46-72DEF1BE24BC}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CollisionsBoundTreeMain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
@@ -0,0 +1,79 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CollisionsBoundTreeDX11.v17", "CollisionsBoundTreeDX11.v17.vcxproj", "{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Required", "Required", "{78C66877-008D-4CD1-B7B4-EF8199EA6494}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTMathematics.v17", "..\..\..\GTMathematics.v17.vcxproj", "{0CADDB12-31D9-4F60-A8C0-678D1773DA03}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphics.v17", "..\..\..\GTGraphics.v17.vcxproj", "{B15CB711-F650-4063-9C7C-E7A5F88139A2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphicsDX11.v17", "..\..\..\GTGraphicsDX11.v17.vcxproj", "{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTApplicationsDX11.v17", "..\..\..\GTApplicationsDX11.v17.vcxproj", "{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Debug|x64.ActiveCfg = Debug|x64
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Debug|x64.Build.0 = Debug|x64
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Debug|x86.ActiveCfg = Debug|Win32
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Debug|x86.Build.0 = Debug|Win32
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Release|x64.ActiveCfg = Release|x64
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Release|x64.Build.0 = Release|x64
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Release|x86.ActiveCfg = Release|Win32
{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}.Release|x86.Build.0 = Release|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x64.ActiveCfg = Debug|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x64.Build.0 = Debug|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x86.ActiveCfg = Debug|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x86.Build.0 = Debug|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x64.ActiveCfg = Release|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x64.Build.0 = Release|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x86.ActiveCfg = Release|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x86.Build.0 = Release|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x64.ActiveCfg = Debug|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x64.Build.0 = Debug|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x86.ActiveCfg = Debug|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x86.Build.0 = Debug|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x64.ActiveCfg = Release|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x64.Build.0 = Release|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x86.ActiveCfg = Release|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x86.Build.0 = Release|Win32
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Debug|x64.ActiveCfg = Debug|x64
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Debug|x64.Build.0 = Debug|x64
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Debug|x86.ActiveCfg = Debug|Win32
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Debug|x86.Build.0 = Debug|Win32
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Release|x64.ActiveCfg = Release|x64
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Release|x64.Build.0 = Release|x64
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Release|x86.ActiveCfg = Release|Win32
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}.Release|x86.Build.0 = Release|Win32
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Debug|x64.ActiveCfg = Debug|x64
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Debug|x64.Build.0 = Debug|x64
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Debug|x86.ActiveCfg = Debug|Win32
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Debug|x86.Build.0 = Debug|Win32
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Release|x64.ActiveCfg = Release|x64
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Release|x64.Build.0 = Release|x64
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Release|x86.ActiveCfg = Release|Win32
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0CADDB12-31D9-4F60-A8C0-678D1773DA03} = {78C66877-008D-4CD1-B7B4-EF8199EA6494}
{B15CB711-F650-4063-9C7C-E7A5F88139A2} = {78C66877-008D-4CD1-B7B4-EF8199EA6494}
{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004} = {78C66877-008D-4CD1-B7B4-EF8199EA6494}
{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA} = {78C66877-008D-4CD1-B7B4-EF8199EA6494}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {55738B5B-AA0C-457C-9C1E-7FF45EF0E532}
EndGlobalSection
EndGlobal
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{6019BCA2-785C-4DC2-9521-3AAFA77F30CD}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CollisionsBoundTree.v17</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\DX11\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<StackCommitSize>
</StackCommitSize>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<StackCommitSize>
</StackCommitSize>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<StackCommitSize>
</StackCommitSize>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_DIRECTX;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>d3d11.lib;d3dcompiler.lib;dxgi.lib;dxguid.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
<StackCommitSize>
</StackCommitSize>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp" />
<ClCompile Include="CollisionsBoundTreeMain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\GTApplicationsDX11.v17.vcxproj">
<Project>{8BB237C2-2D3A-41AD-9B98-A35BA75D5DEA}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphics.v17.vcxproj">
<Project>{B15CB711-F650-4063-9C7C-E7A5F88139A2}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphicsDX11.v17.vcxproj">
<Project>{00DEFF42-0F7C-4A7C-9C1F-59322B9E9004}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CollisionsBoundTreeMain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
@@ -0,0 +1,79 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.156
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CollisionsBoundTreeGL45.v16", "CollisionsBoundTreeGL45.v16.vcxproj", "{981D5FE9-8129-47B4-A57E-43887330349E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Required", "Required", "{B6FD851C-9D65-4F75-A3BA-04958B583D26}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTMathematics.v16", "..\..\..\GTMathematics.v16.vcxproj", "{3F553568-76EF-48F0-88DD-270482C058B9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphics.v16", "..\..\..\GTGraphics.v16.vcxproj", "{ED37722A-40DE-4B07-9A4A-65E978D43643}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphicsGL45.v16", "..\..\..\GTGraphicsGL45.v16.vcxproj", "{93806879-D052-48B1-AFAF-BF190FC67B7F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTApplicationsGL45.v16", "..\..\..\GTApplicationsGL45.v16.vcxproj", "{EA72EE75-14B3-448F-828A-231FE02D0B38}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{981D5FE9-8129-47B4-A57E-43887330349E}.Debug|x64.ActiveCfg = Debug|x64
{981D5FE9-8129-47B4-A57E-43887330349E}.Debug|x64.Build.0 = Debug|x64
{981D5FE9-8129-47B4-A57E-43887330349E}.Debug|x86.ActiveCfg = Debug|Win32
{981D5FE9-8129-47B4-A57E-43887330349E}.Debug|x86.Build.0 = Debug|Win32
{981D5FE9-8129-47B4-A57E-43887330349E}.Release|x64.ActiveCfg = Release|x64
{981D5FE9-8129-47B4-A57E-43887330349E}.Release|x64.Build.0 = Release|x64
{981D5FE9-8129-47B4-A57E-43887330349E}.Release|x86.ActiveCfg = Release|Win32
{981D5FE9-8129-47B4-A57E-43887330349E}.Release|x86.Build.0 = Release|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x64.ActiveCfg = Debug|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x64.Build.0 = Debug|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x86.ActiveCfg = Debug|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Debug|x86.Build.0 = Debug|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x64.ActiveCfg = Release|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x64.Build.0 = Release|x64
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x86.ActiveCfg = Release|Win32
{3F553568-76EF-48F0-88DD-270482C058B9}.Release|x86.Build.0 = Release|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x64.ActiveCfg = Debug|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x64.Build.0 = Debug|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x86.ActiveCfg = Debug|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Debug|x86.Build.0 = Debug|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x64.ActiveCfg = Release|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x64.Build.0 = Release|x64
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x86.ActiveCfg = Release|Win32
{ED37722A-40DE-4B07-9A4A-65E978D43643}.Release|x86.Build.0 = Release|Win32
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Debug|x64.ActiveCfg = Debug|x64
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Debug|x64.Build.0 = Debug|x64
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Debug|x86.ActiveCfg = Debug|Win32
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Debug|x86.Build.0 = Debug|Win32
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Release|x64.ActiveCfg = Release|x64
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Release|x64.Build.0 = Release|x64
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Release|x86.ActiveCfg = Release|Win32
{93806879-D052-48B1-AFAF-BF190FC67B7F}.Release|x86.Build.0 = Release|Win32
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Debug|x64.ActiveCfg = Debug|x64
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Debug|x64.Build.0 = Debug|x64
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Debug|x86.ActiveCfg = Debug|Win32
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Debug|x86.Build.0 = Debug|Win32
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Release|x64.ActiveCfg = Release|x64
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Release|x64.Build.0 = Release|x64
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Release|x86.ActiveCfg = Release|Win32
{EA72EE75-14B3-448F-828A-231FE02D0B38}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3F553568-76EF-48F0-88DD-270482C058B9} = {B6FD851C-9D65-4F75-A3BA-04958B583D26}
{ED37722A-40DE-4B07-9A4A-65E978D43643} = {B6FD851C-9D65-4F75-A3BA-04958B583D26}
{93806879-D052-48B1-AFAF-BF190FC67B7F} = {B6FD851C-9D65-4F75-A3BA-04958B583D26}
{EA72EE75-14B3-448F-828A-231FE02D0B38} = {B6FD851C-9D65-4F75-A3BA-04958B583D26}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BE9BCE65-F3BE-40FF-8A89-34B2D064E847}
EndGlobalSection
EndGlobal
@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{981D5FE9-8129-47B4-A57E-43887330349E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CollisionsBoundTree.v16</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp" />
<ClCompile Include="CollisionsBoundTreeMain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\GTApplicationsGL45.v16.vcxproj">
<Project>{EA72EE75-14B3-448F-828A-231FE02D0B38}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphics.v16.vcxproj">
<Project>{ED37722A-40DE-4B07-9A4A-65E978D43643}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphicsGL45.v16.vcxproj">
<Project>{93806879-D052-48B1-AFAF-BF190FC67B7F}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CollisionsBoundTreeMain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
@@ -0,0 +1,79 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CollisionsBoundTreeGL45.v17", "CollisionsBoundTreeGL45.v17.vcxproj", "{E44111B8-2EDB-4C21-9A75-D7E44372DA46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Required", "Required", "{A86317B4-57B3-42D8-9C32-D7672162E48E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTMathematics.v17", "..\..\..\GTMathematics.v17.vcxproj", "{0CADDB12-31D9-4F60-A8C0-678D1773DA03}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphics.v17", "..\..\..\GTGraphics.v17.vcxproj", "{B15CB711-F650-4063-9C7C-E7A5F88139A2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTGraphicsGL45.v17", "..\..\..\GTGraphicsGL45.v17.vcxproj", "{7373CB9F-6595-4FA4-9500-88985A74F0E7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTApplicationsGL45.v17", "..\..\..\GTApplicationsGL45.v17.vcxproj", "{C67471F4-761E-4292-A811-B1FA78E60C21}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Debug|x64.ActiveCfg = Debug|x64
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Debug|x64.Build.0 = Debug|x64
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Debug|x86.ActiveCfg = Debug|Win32
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Debug|x86.Build.0 = Debug|Win32
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Release|x64.ActiveCfg = Release|x64
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Release|x64.Build.0 = Release|x64
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Release|x86.ActiveCfg = Release|Win32
{E44111B8-2EDB-4C21-9A75-D7E44372DA46}.Release|x86.Build.0 = Release|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x64.ActiveCfg = Debug|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x64.Build.0 = Debug|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x86.ActiveCfg = Debug|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Debug|x86.Build.0 = Debug|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x64.ActiveCfg = Release|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x64.Build.0 = Release|x64
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x86.ActiveCfg = Release|Win32
{0CADDB12-31D9-4F60-A8C0-678D1773DA03}.Release|x86.Build.0 = Release|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x64.ActiveCfg = Debug|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x64.Build.0 = Debug|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x86.ActiveCfg = Debug|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Debug|x86.Build.0 = Debug|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x64.ActiveCfg = Release|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x64.Build.0 = Release|x64
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x86.ActiveCfg = Release|Win32
{B15CB711-F650-4063-9C7C-E7A5F88139A2}.Release|x86.Build.0 = Release|Win32
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Debug|x64.ActiveCfg = Debug|x64
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Debug|x64.Build.0 = Debug|x64
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Debug|x86.ActiveCfg = Debug|Win32
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Debug|x86.Build.0 = Debug|Win32
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Release|x64.ActiveCfg = Release|x64
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Release|x64.Build.0 = Release|x64
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Release|x86.ActiveCfg = Release|Win32
{7373CB9F-6595-4FA4-9500-88985A74F0E7}.Release|x86.Build.0 = Release|Win32
{C67471F4-761E-4292-A811-B1FA78E60C21}.Debug|x64.ActiveCfg = Debug|x64
{C67471F4-761E-4292-A811-B1FA78E60C21}.Debug|x64.Build.0 = Debug|x64
{C67471F4-761E-4292-A811-B1FA78E60C21}.Debug|x86.ActiveCfg = Debug|Win32
{C67471F4-761E-4292-A811-B1FA78E60C21}.Debug|x86.Build.0 = Debug|Win32
{C67471F4-761E-4292-A811-B1FA78E60C21}.Release|x64.ActiveCfg = Release|x64
{C67471F4-761E-4292-A811-B1FA78E60C21}.Release|x64.Build.0 = Release|x64
{C67471F4-761E-4292-A811-B1FA78E60C21}.Release|x86.ActiveCfg = Release|Win32
{C67471F4-761E-4292-A811-B1FA78E60C21}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0CADDB12-31D9-4F60-A8C0-678D1773DA03} = {A86317B4-57B3-42D8-9C32-D7672162E48E}
{B15CB711-F650-4063-9C7C-E7A5F88139A2} = {A86317B4-57B3-42D8-9C32-D7672162E48E}
{7373CB9F-6595-4FA4-9500-88985A74F0E7} = {A86317B4-57B3-42D8-9C32-D7672162E48E}
{C67471F4-761E-4292-A811-B1FA78E60C21} = {A86317B4-57B3-42D8-9C32-D7672162E48E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9514466A-4476-4868-9843-D034EBD4F637}
EndGlobalSection
EndGlobal
@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{E44111B8-2EDB-4C21-9A75-D7E44372DA46}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CollisionsBoundTree.v17</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>_Output\GL45\$(PlatformToolset)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>GTE_USE_MSWINDOWS;GTE_USE_ROW_MAJOR;GTE_USE_MAT_VEC;GTE_USE_OPENGL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\.</AdditionalIncludeDirectories>
<DisableSpecificWarnings>6262;26812</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeaderFile />
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>opengl32.lib;Windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp" />
<ClCompile Include="CollisionsBoundTreeMain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\GTApplicationsGL45.v17.vcxproj">
<Project>{C67471F4-761E-4292-A811-B1FA78E60C21}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphics.v17.vcxproj">
<Project>{B15CB711-F650-4063-9C7C-E7A5F88139A2}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\GTGraphicsGL45.v17.vcxproj">
<Project>{7373CB9F-6595-4FA4-9500-88985A74F0E7}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CollisionsBoundTreeWindow3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CollisionsBoundTreeMain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CollisionsBoundTreeWindow3.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
@@ -0,0 +1,25 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#include "CollisionsBoundTreeWindow3.h"
#include <iostream>
int main()
{
try
{
Window::Parameters parameters(L"CollisionsBoundTreeWindow3", 0, 0, 768, 768);
auto window = TheWindowSystem.Create<CollisionsBoundTreeWindow3>(parameters);
TheWindowSystem.MessagePump(window, TheWindowSystem.DEFAULT_ACTION);
TheWindowSystem.Destroy(window);
}
catch (std::exception const& e)
{
std::cout << e.what() << std::endl;
}
return 0;
}
@@ -0,0 +1,318 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#include "CollisionsBoundTreeWindow3.h"
#include <Mathematics/Rotation.h>
#include <Graphics/MeshFactory.h>
#include <Graphics/Texture2Effect.h>
CollisionsBoundTreeWindow3::CollisionsBoundTreeWindow3(Parameters& parameters)
:
Window3(parameters),
mNoCullState{},
mNoCullWireState{},
mCylinder0{},
mCylinder1{},
mCylinderMesh0{},
mCylinderMesh1{},
mGroup{},
mBlueUV{ 0.25f, 0.25f },
mRedUV{ 0.25f, 0.75f },
mCyanUV{ 0.75f, 0.25f },
mYellowUV{ 0.75f, 0.75f }
{
mNoCullState = std::make_shared<RasterizerState>();
mNoCullState->cull = RasterizerState::Cull::NONE;
mNoCullWireState = std::make_shared<RasterizerState>();
mNoCullWireState->cull = RasterizerState::Cull::NONE;
mNoCullWireState->fill = RasterizerState::Fill::WIREFRAME;
mEngine->SetRasterizerState(mNoCullState);
InitializeCamera(60.0f, GetAspectRatio(), 1.0f, 1000.0f, 0.001f, 0.001f,
{ 4.0f, 0.0f, 0.0f }, { -1.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 1.0f});
CreateScene();
}
void CollisionsBoundTreeWindow3::OnIdle()
{
mTimer.Measure();
if (mCameraRig.Move())
{
mPVWMatrices.Update();
}
mEngine->ClearBuffers();
mEngine->Draw(mCylinder0);
mEngine->Draw(mCylinder1);
mEngine->Draw(8, mYSize - 8, { 0.0f, 0.0f, 0.0f, 1.0f }, mTimer.GetFPS());
mEngine->DisplayColorBuffer(0);
mTimer.UpdateFrameCount();
}
bool CollisionsBoundTreeWindow3::OnCharPress(uint8_t key, int32_t x, int32_t y)
{
if (Transform(key))
{
return true;
}
switch (key)
{
case 'w':
case 'W':
if (mEngine->GetRasterizerState() == mNoCullState)
{
mEngine->SetRasterizerState(mNoCullWireState);
}
else
{
mEngine->SetRasterizerState(mNoCullState);
}
return true;
}
return Window3::OnCharPress(key, x, y);
}
void CollisionsBoundTreeWindow3::CreateScene()
{
// Create a texture image to be used by both cylinders.
auto texture = std::make_shared<Texture2>(DF_R8G8B8A8_UNORM, 2, 2);
auto* texels = texture->Get<uint32_t>();
texels[0] = 0xFFFF0000; // blue
texels[1] = 0xFFFFFF00; // cyan
texels[2] = 0xFF0000FF; // red
texels[3] = 0xFF00FFFF; // yellow
VertexFormat vformat{};
vformat.Bind(VASemantic::POSITION, DF_R32G32B32_FLOAT, 0);
vformat.Bind(VASemantic::TEXCOORD, DF_R32G32_FLOAT, 0);
MeshFactory mf{};
mf.SetVertexFormat(vformat);
mCylinder0 = mf.CreateCylinderClosed(8, 16, 1.0f, 2.0f);
auto const& vbuffer0 = mCylinder0->GetVertexBuffer();
vbuffer0->SetUsage(Resource::DYNAMIC_UPDATE);
auto* vertices0 = vbuffer0->Get<Vertex>();
uint32_t const numVertices0 = vbuffer0->GetNumElements();
for (uint32_t i = 0; i < numVertices0; ++i)
{
vertices0[i].tcoord = mBlueUV;
}
auto effect0 = std::make_shared<Texture2Effect>(mProgramFactory, texture,
SamplerState::Filter::MIN_L_MAG_L_MIP_P, SamplerState::Mode::CLAMP,
SamplerState::Mode::CLAMP);
mCylinder0->SetEffect(effect0);
mPVWMatrices.Subscribe(mCylinder0);
mTrackBall.Attach(mCylinder0);
mCylinder1 = mf.CreateCylinderClosed(16, 8, 0.25f, 4.0f);
auto const& vbuffer1 = mCylinder1->GetVertexBuffer();
auto* vertices1 = vbuffer1->Get<Vertex>();
vbuffer1->SetUsage(Resource::DYNAMIC_UPDATE);
uint32_t const numVertices1 = vbuffer1->GetNumElements();
for (uint32_t i = 0; i < numVertices1; ++i)
{
vertices1[i].tcoord = mRedUV;
}
auto effect1 = std::make_shared<Texture2Effect>(mProgramFactory, texture,
SamplerState::Filter::MIN_L_MAG_L_MIP_P, SamplerState::Mode::CLAMP,
SamplerState::Mode::CLAMP);
mCylinder1->SetEffect(effect1);
mPVWMatrices.Subscribe(mCylinder1);
mTrackBall.Attach(mCylinder1);
mTrackBall.Update();
mPVWMatrices.Update();
// Set up the collision system. Record0 handles the collision response.
// Record1 is not given a callback so that 'double processing' of the
// events does not occur.
Vector3<float> velocity{ 0.0f, 0.0f, 0.0f };
auto ResponseFunction =
[this](CRecord& record0, int32_t t0, CRecord& record1, int32_t t1,
float contactTime)
{
Response(record0, t0, record1, t1, contactTime);
};
mCylinderMesh0 = std::make_shared<Mesh>(mCylinder0);
auto tree0 = std::make_shared<CTree>(mCylinderMesh0, 1, false);
auto tiCallback0 = std::make_shared<CRecord::TICallback>(ResponseFunction);
std::shared_ptr<CRecord::FICallback> fiCallback0{};
auto record0 = std::make_shared<CRecord>(tree0, velocity, tiCallback0, fiCallback0);
mCylinderMesh1 = std::make_shared<Mesh>(mCylinder1);
auto tree1 = std::make_shared<CTree>(mCylinderMesh1, 1, false);
std::shared_ptr<CRecord::TICallback> tiCallback1{};
std::shared_ptr<CRecord::FICallback> fiCallback1{};
auto record1 = std::make_shared<CRecord>(tree1, velocity, tiCallback1, fiCallback1);
mGroup = std::make_shared<CGroup>();
mGroup->Insert(record0);
mGroup->Insert(record1);
ResetColors();
mGroup->TestIntersection();
}
bool CollisionsBoundTreeWindow3::Transform(uint8_t key)
{
// Move the tall/thin cylinder. After each motion, reset the texture
// coordinates to the "no intersection" state, then allow the collision
// system test for intersection. Any intersecting triangles have their
// texture coordinates changed to the "intersection" state.
float constexpr trnSpeed = 0.1f;
float constexpr rotSpeed = 0.1f;
Matrix4x4<float> rot{}, incr{};
AxisAngle<4, float> aa{};
Vector3<float> trn{};
switch (key)
{
case 'x':
trn = mCylinder1->localTransform.GetTranslation();
trn[0] -= trnSpeed;
mCylinder1->localTransform.SetTranslation(trn);
break;
case 'X':
trn = mCylinder1->localTransform.GetTranslation();
trn[0] += trnSpeed;
mCylinder1->localTransform.SetTranslation(trn);
break;
case 'y':
trn = mCylinder1->localTransform.GetTranslation();
trn[1] -= trnSpeed;
mCylinder1->localTransform.SetTranslation(trn);
break;
case 'Y':
trn = mCylinder1->localTransform.GetTranslation();
trn[1] += trnSpeed;
mCylinder1->localTransform.SetTranslation(trn);
break;
case 'z':
trn = mCylinder1->localTransform.GetTranslation();
trn[2] -= trnSpeed;
mCylinder1->localTransform.SetTranslation(trn);
break;
case 'Z':
trn = mCylinder1->localTransform.GetTranslation();
trn[2] += trnSpeed;
mCylinder1->localTransform.SetTranslation(trn);
break;
case 'r':
rot = mCylinder1->localTransform.GetRotation();
aa.axis = { 1.0f, 0.0f, 0.0f, 0.0f };
aa.angle = rotSpeed;
incr = Rotation<4, float>(aa);
mCylinder1->localTransform.SetRotation(incr * rot);
break;
case 'R':
rot = mCylinder1->localTransform.GetRotation();
aa.axis = { 1.0f, 0.0f, 0.0f, 0.0f };
aa.angle = -rotSpeed;
incr = Rotation<4, float>(aa);
mCylinder1->localTransform.SetRotation(incr * rot);
break;
case 'a':
rot = mCylinder1->localTransform.GetRotation();
aa.axis = { 0.0f, 1.0f, 0.0f, 0.0f };
aa.angle = rotSpeed;
incr = Rotation<4, float>(aa);
mCylinder1->localTransform.SetRotation(incr * rot);
break;
case 'A':
rot = mCylinder1->localTransform.GetRotation();
aa.axis = { 0.0f, 1.0f, 0.0f, 0.0f };
aa.angle = -rotSpeed;
incr = Rotation<4, float>(aa);
mCylinder1->localTransform.SetRotation(incr * rot);
break;
case 'p':
rot = mCylinder1->localTransform.GetRotation();
aa.axis = { 0.0f, 0.0f, 1.0f, 0.0f };
aa.angle = rotSpeed;
incr = Rotation<4, float>(aa);
mCylinder1->localTransform.SetRotation(incr * rot);
break;
case 'P':
rot = mCylinder1->localTransform.GetRotation();
aa.axis = { 0.0f, 0.0f, 1.0f, 0.0f };
aa.angle = -rotSpeed;
incr = Rotation<4, float>(aa);
mCylinder1->localTransform.SetRotation(incr * rot);
break;
default:
return false;
}
// Activate the collision system.
mCylinder1->Update();
ResetColors();
mGroup->TestIntersection();
mTrackBall.Update();
mPVWMatrices.Update();
return true;
}
void CollisionsBoundTreeWindow3::ResetColors()
{
auto const& vbuffer0 = mCylinder0->GetVertexBuffer();
auto* vertices0 = vbuffer0->Get<Vertex>();
uint32_t const numVertices0 = vbuffer0->GetNumElements();
for (uint32_t i = 0; i < numVertices0; ++i)
{
vertices0[i].tcoord = mBlueUV;
}
mEngine->Update(mCylinder0->GetVertexBuffer());
auto const& vbuffer1 = mCylinder1->GetVertexBuffer();
auto* vertices1 = vbuffer1->Get<Vertex>();
uint32_t const numVertices1 = vbuffer1->GetNumElements();
for (uint32_t i = 0; i < numVertices1; ++i)
{
vertices1[i].tcoord = mRedUV;
}
mEngine->Update(mCylinder1->GetVertexBuffer());
}
void CollisionsBoundTreeWindow3::Response(CRecord& record0, int32_t t0,
CRecord& record1, int32_t t1, float contactTime)
{
// The contact time is not used in this application.
(void)contactTime;
// Mesh0 triangles that are intersecting change from blue to cyan.
auto const& mesh0 = record0.GetMesh();
std::array<int32_t, 3> indices0{};
mesh0->GetTriangle(t0, indices0);
auto const& vbuffer0 = mCylinder0->GetVertexBuffer();
auto* vertices0 = vbuffer0->Get<Vertex>();
for (size_t j = 0; j < 3; ++j)
{
vertices0[indices0[j]].tcoord = mCyanUV;
}
mEngine->Update(vbuffer0);
// Mesh1 triangles that are intersecting change from red to yellow.
auto const& mesh1 = record1.GetMesh();
std::array<int32_t, 3> indices1{};
mesh1->GetTriangle(t1, indices1);
auto const& vbuffer1 = mCylinder1->GetVertexBuffer();
auto* vertices1 = vbuffer1->Get<Vertex>();
for (size_t j = 0; j < 3; ++j)
{
vertices1[indices1[j]].tcoord = mYellowUV;
}
mEngine->Update(vbuffer1);
}
@@ -0,0 +1,49 @@
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.2.2022.03.20
#pragma once
#include <Applications/Window3.h>
#include <Graphics/BoundingSphere.h>
#include <Graphics/CollisionGroup.h>
#include <Graphics/CollisionMesh.h>
using namespace gte;
class CollisionsBoundTreeWindow3 : public Window3
{
public:
CollisionsBoundTreeWindow3(Parameters& parameters);
virtual void OnIdle() override;
virtual bool OnCharPress(uint8_t key, int32_t x, int32_t y) override;
private:
using Bound = BoundingSphere<float>;
using Mesh = CollisionMesh;
using CTree = BoundTree<Mesh, Bound>;
using CRecord = CollisionRecord<Mesh, Bound>;
using CGroup = CollisionGroup<Mesh, Bound>;
struct Vertex
{
Vector3<float> position;
Vector2<float> tcoord;
};
void CreateScene();
bool Transform(uint8_t key);
void ResetColors();
void Response(CRecord& record0, int32_t t0, CRecord& record1,
int32_t t1, float contactTime);
std::shared_ptr<RasterizerState> mNoCullState;
std::shared_ptr<RasterizerState> mNoCullWireState;
std::shared_ptr<Visual> mCylinder0, mCylinder1;
std::shared_ptr<Mesh> mCylinderMesh0, mCylinderMesh1;
std::shared_ptr<CGroup> mGroup;
Vector2<float> mBlueUV, mRedUV, mCyanUV, mYellowUV;
};
@@ -0,0 +1,44 @@
{
"build_type": {
"default": "debug",
"description": "The CMake build type to use",
"choices": {
"debug": {
"short": "Debug",
"long": "Emit debug information without performing optimizations",
"buildType": "Debug",
"settings": {
"BUILD_RELEASE_LIB": false
}
},
"release": {
"short": "Release",
"long": "Enable optimizations, omit debug info",
"buildType": "Release",
"settings": {
"BUILD_RELEASE_LIB": true
}
}
}
},
"library_type": {
"default": "static",
"description": "Selects the library type to build for",
"choices": {
"static": {
"short": "Static",
"long": "Builds the static library",
"settings": {
"BUILD_SHARED_LIB": false
}
},
"shared": {
"short": "Shared",
"long": "Builds the shared library",
"settings": {
"BUILD_SHARED_LIB": true
}
}
}
}
}