Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
CollideSoftBodyVertexIterator Class Reference

#include <CollideSoftBodyVertexIterator.h>

Public Member Functions

 CollideSoftBodyVertexIterator ()=default
 Default constructor. More...
 
 CollideSoftBodyVertexIterator (const CollideSoftBodyVertexIterator &)=default
 
 CollideSoftBodyVertexIterator (const StridedPtr< const Vec3 > &inPosition, const StridedPtr< const float > &inInvMass, const StridedPtr< Plane > &inCollisionPlane, const StridedPtr< float > &inLargestPenetration, const StridedPtr< int > &inCollidingShapeIndex)
 Construct using (strided) pointers. More...
 
 CollideSoftBodyVertexIterator (SoftBodyVertex *inVertices)
 Construct using a soft body vertex. More...
 
CollideSoftBodyVertexIteratoroperator= (const CollideSoftBodyVertexIterator &)=default
 Default assignment. More...
 
bool operator!= (const CollideSoftBodyVertexIterator &inRHS) const
 
CollideSoftBodyVertexIteratoroperator++ ()
 Next vertex. More...
 
CollideSoftBodyVertexIterator operator+ (int inOffset) const
 
Vec3 GetPosition () const
 Get the position of the current vertex. More...
 
float GetInvMass () const
 Get the inverse mass of the current vertex. More...
 
bool UpdatePenetration (float inLargestPenetration) const
 
void SetCollision (const Plane &inCollisionPlane, int inCollidingShapeIndex) const
 Update the collision of the current vertex. More...
 

Detailed Description

Class that allows iterating over the vertices of a soft body. It tracks the largest penetration and allows storing the resulting collision in a different structure than the soft body vertex itself.

Constructor & Destructor Documentation

◆ CollideSoftBodyVertexIterator() [1/4]

CollideSoftBodyVertexIterator::CollideSoftBodyVertexIterator ( )
default

Default constructor.

◆ CollideSoftBodyVertexIterator() [2/4]

CollideSoftBodyVertexIterator::CollideSoftBodyVertexIterator ( const CollideSoftBodyVertexIterator )
default

◆ CollideSoftBodyVertexIterator() [3/4]

CollideSoftBodyVertexIterator::CollideSoftBodyVertexIterator ( const StridedPtr< const Vec3 > &  inPosition,
const StridedPtr< const float > &  inInvMass,
const StridedPtr< Plane > &  inCollisionPlane,
const StridedPtr< float > &  inLargestPenetration,
const StridedPtr< int > &  inCollidingShapeIndex 
)
inline

Construct using (strided) pointers.

◆ CollideSoftBodyVertexIterator() [4/4]

CollideSoftBodyVertexIterator::CollideSoftBodyVertexIterator ( SoftBodyVertex inVertices)
inlineexplicit

Construct using a soft body vertex.

Member Function Documentation

◆ GetInvMass()

float CollideSoftBodyVertexIterator::GetInvMass ( ) const
inline

Get the inverse mass of the current vertex.

◆ GetPosition()

Vec3 CollideSoftBodyVertexIterator::GetPosition ( ) const
inline

Get the position of the current vertex.

◆ operator!=()

bool CollideSoftBodyVertexIterator::operator!= ( const CollideSoftBodyVertexIterator inRHS) const
inline

Equality operator. Note: Only used to determine end iterator, so we only compare position.

◆ operator+()

CollideSoftBodyVertexIterator CollideSoftBodyVertexIterator::operator+ ( int  inOffset) const
inline

Add an offset Note: Only used to determine end iterator, so we only set position.

◆ operator++()

CollideSoftBodyVertexIterator & CollideSoftBodyVertexIterator::operator++ ( )
inline

Next vertex.

◆ operator=()

CollideSoftBodyVertexIterator & CollideSoftBodyVertexIterator::operator= ( const CollideSoftBodyVertexIterator )
default

Default assignment.

◆ SetCollision()

void CollideSoftBodyVertexIterator::SetCollision ( const Plane inCollisionPlane,
int  inCollidingShapeIndex 
) const
inline

Update the collision of the current vertex.

◆ UpdatePenetration()

bool CollideSoftBodyVertexIterator::UpdatePenetration ( float  inLargestPenetration) const
inline

Update penetration of the current vertex

Returns
Returns true if the vertex has the largest penetration so far, this means you need to follow up by calling SetCollision

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