Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
EPAConvexHullBuilder::TriangleQueue Class Reference

Specialized triangles list that keeps them sorted on closest distance to origin. More...

#include <EPAConvexHullBuilder.h>

Inheritance diagram for EPAConvexHullBuilder::TriangleQueue:
StaticArray< Triangle *, cMaxTriangles >

Public Member Functions

void push_back (Triangle *inT)
 Add triangle to the list.
TrianglePeekClosest ()
 Peek the next closest triangle without removing it.
TrianglePopClosest ()
 Get next closest triangle.
Public Member Functions inherited from StaticArray< Triangle *, cMaxTriangles >
 StaticArray ()=default
 Default constructor.
 StaticArray (std::initializer_list< Triangle * > inList)
 Constructor from initializer list.
 StaticArray (const StaticArray< Triangle *, N > &inRHS)
 Copy constructor.
 ~StaticArray ()
 Destruct all elements.
void clear ()
 Destruct all elements and set length to zero.
void push_back (const Triangle *&inElement)
 Add element to the back of the array.
void emplace_back (A &&... inElement)
 Construct element at the back of the array.
void pop_back ()
 Remove element from the back of the array.
bool empty () const
 Returns true if there are no elements in the array.
size_type size () const
 Returns amount of elements in the array.
size_type capacity () const
 Returns maximum amount of elements the array can hold.
void resize (size_type inNewSize)
 Resize array to new length.
const_iterator begin () const
 Iterators.
const_iterator end () const
iterator begin ()
iterator end ()
const Triangle ** data () const
Triangle ** data ()
Triangle *& operator[] (size_type inIdx)
 Access element.
const Triangle *& operator[] (size_type inIdx) const
Triangle *& at (size_type inIdx)
 Access element.
const Triangle *& at (size_type inIdx) const
const Triangle *& front () const
 First element in the array.
Triangle *& front ()
const Triangle *& back () const
 Last element in the array.
Triangle *& back ()
void erase (const_iterator inIter)
 Remove one element from the array.
void erase (const_iterator inBegin, const_iterator inEnd)
 Remove multiple element from the array.
StaticArray< Triangle *, N > & operator= (const StaticArray< Triangle *, N > &inRHS)
 Assignment operator.
StaticArray< Triangle *, N > & operator= (const StaticArray< Triangle *, M > &inRHS)
 Assignment operator with static array of different max length.
bool operator== (const StaticArray< Triangle *, N > &inRHS) const
 Comparing arrays.
bool operator!= (const StaticArray< Triangle *, N > &inRHS) const
uint64 GetHash () const
 Get hash for this array.

Static Public Member Functions

static bool sTriangleSorter (const Triangle *inT1, const Triangle *inT2)
 Function to sort triangles on closest distance to origin.

Additional Inherited Members

Public Types inherited from StaticArray< Triangle *, cMaxTriangles >
using value_type
using size_type
using const_iterator
using iterator
Static Public Attributes inherited from StaticArray< Triangle *, cMaxTriangles >
static constexpr uint Capacity
Protected Attributes inherited from StaticArray< Triangle *, cMaxTriangles >
size_type mSize
Storage mElements [N]

Detailed Description

Specialized triangles list that keeps them sorted on closest distance to origin.

Member Function Documentation

◆ PeekClosest()

Triangle * EPAConvexHullBuilder::TriangleQueue::PeekClosest ( )
inline

Peek the next closest triangle without removing it.

◆ PopClosest()

Triangle * EPAConvexHullBuilder::TriangleQueue::PopClosest ( )
inline

Get next closest triangle.

◆ push_back()

void EPAConvexHullBuilder::TriangleQueue::push_back ( Triangle * inT)
inline

Add triangle to the list.

◆ sTriangleSorter()

bool EPAConvexHullBuilder::TriangleQueue::sTriangleSorter ( const Triangle * inT1,
const Triangle * inT2 )
inlinestatic

Function to sort triangles on closest distance to origin.


The documentation for this class was generated from the following file: