Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
TriangleSplitterLongestAxis.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
8
10
13{
14public:
16 TriangleSplitterLongestAxis(const VertexList &inVertices, const IndexedTriangleList &inTriangles);
17
18 // See TriangleSplitter::GetStats
19 virtual void GetStats(Stats &outStats) const override
20 {
21 outStats.mSplitterName = "TriangleSplitterLongestAxis";
22 }
23
24 // See TriangleSplitter::Split
25 virtual bool Split(const Range &inTriangles, Range &outLeft, Range &outRight) override;
26};
27
#define JPH_EXPORT
Definition: Core.h:227
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
Array< Float3 > VertexList
Definition: Float3.h:43
Array< IndexedTriangle > IndexedTriangleList
Definition: IndexedTriangle.h:109
A class that splits a triangle list into two parts for building a tree.
Definition: TriangleSplitter.h:14
virtual bool Split(const Range &inTriangles, Range &outLeft, Range &outRight)=0
Splitter using center of bounding box with longest axis.
Definition: TriangleSplitterLongestAxis.h:13
virtual void GetStats(Stats &outStats) const override
Get stats of splitter.
Definition: TriangleSplitterLongestAxis.h:19
Definition: TriangleSplitter.h:23
const char * mSplitterName
Definition: TriangleSplitter.h:24