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

Collision detection helper that collides a convex object vs one or more triangles. More...

#include <CollideConvexVsTriangles.h>

Public Member Functions

 CollideConvexVsTriangles (const ConvexShape *inShape1, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeID &inSubShapeID1, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector)
 
void Collide (Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2)
 

Protected Attributes

const CollideShapeSettingsmCollideShapeSettings
 Settings for this collision operation. More...
 
CollideShapeCollectormCollector
 The collector that will receive the results. More...
 
const ConvexShapemShape1
 The shape that we're colliding with. More...
 
Vec3 mScale1
 The scale of the shape (in shape local space) of the shape we're colliding with. More...
 
Vec3 mScale2
 The scale of the shape (in shape local space) of the shape we're colliding against. More...
 
Mat44 mTransform1
 Transform of the shape we're colliding with. More...
 
Mat44 mTransform2To1
 Transform that takes a point in space of the colliding shape to the shape we're colliding with. More...
 
AABox mBoundsOf1
 Bounds of the colliding shape in local space. More...
 
AABox mBoundsOf1InSpaceOf2
 Bounds of the colliding shape in space of shape we're colliding with. More...
 
SubShapeID mSubShapeID1
 Sub shape ID of colliding shape. More...
 
float mScaleSign2
 Sign of the scale of object 2, -1 if object is inside out, 1 if not. More...
 
ConvexShape::SupportBuffer mBufferExCvxRadius
 Buffer that holds the support function data excluding convex radius. More...
 
ConvexShape::SupportBuffer mBufferIncCvxRadius
 Buffer that holds the support function data including convex radius. More...
 
const ConvexShape::SupportmShape1ExCvxRadius = nullptr
 Actual support function object excluding convex radius. More...
 
const ConvexShape::SupportmShape1IncCvxRadius = nullptr
 Actual support function object including convex radius. More...
 

Detailed Description

Collision detection helper that collides a convex object vs one or more triangles.

Constructor & Destructor Documentation

◆ CollideConvexVsTriangles()

JPH_NAMESPACE_BEGIN CollideConvexVsTriangles::CollideConvexVsTriangles ( const ConvexShape inShape1,
Vec3Arg  inScale1,
Vec3Arg  inScale2,
Mat44Arg  inCenterOfMassTransform1,
Mat44Arg  inCenterOfMassTransform2,
const SubShapeID inSubShapeID1,
const CollideShapeSettings inCollideShapeSettings,
CollideShapeCollector ioCollector 
)

Constructor

Parameters
inShape1The convex shape to collide against triangles
inScale1Local space scale for the convex object
inScale2Local space scale for the triangles
inCenterOfMassTransform1Transform that takes the center of mass of 1 into world space
inCenterOfMassTransform2Transform that takes the center of mass of 2 into world space
inSubShapeID1Sub shape ID of the convex object
inCollideShapeSettingsSettings for the collide shape query
ioCollectorThe collector that will receive the results

Member Function Documentation

◆ Collide()

void CollideConvexVsTriangles::Collide ( Vec3Arg  inV0,
Vec3Arg  inV1,
Vec3Arg  inV2,
uint8  inActiveEdges,
const SubShapeID inSubShapeID2 
)

Collide convex object with a single triangle

Parameters
inV0,inV1,inV2CCW triangle vertices
inActiveEdgesbit 0 = edge v0..v1 is active, bit 1 = edge v1..v2 is active, bit 2 = edge v2..v0 is active An active edge is an edge that is not connected to another triangle in such a way that it is impossible to collide with the edge
inSubShapeID2The sub shape ID for the triangle

Member Data Documentation

◆ mBoundsOf1

AABox CollideConvexVsTriangles::mBoundsOf1
protected

Bounds of the colliding shape in local space.

◆ mBoundsOf1InSpaceOf2

AABox CollideConvexVsTriangles::mBoundsOf1InSpaceOf2
protected

Bounds of the colliding shape in space of shape we're colliding with.

◆ mBufferExCvxRadius

ConvexShape::SupportBuffer CollideConvexVsTriangles::mBufferExCvxRadius
protected

Buffer that holds the support function data excluding convex radius.

◆ mBufferIncCvxRadius

ConvexShape::SupportBuffer CollideConvexVsTriangles::mBufferIncCvxRadius
protected

Buffer that holds the support function data including convex radius.

◆ mCollector

CollideShapeCollector& CollideConvexVsTriangles::mCollector
protected

The collector that will receive the results.

◆ mCollideShapeSettings

const CollideShapeSettings& CollideConvexVsTriangles::mCollideShapeSettings
protected

Settings for this collision operation.

◆ mScale1

Vec3 CollideConvexVsTriangles::mScale1
protected

The scale of the shape (in shape local space) of the shape we're colliding with.

◆ mScale2

Vec3 CollideConvexVsTriangles::mScale2
protected

The scale of the shape (in shape local space) of the shape we're colliding against.

◆ mScaleSign2

float CollideConvexVsTriangles::mScaleSign2
protected

Sign of the scale of object 2, -1 if object is inside out, 1 if not.

◆ mShape1

const ConvexShape* CollideConvexVsTriangles::mShape1
protected

The shape that we're colliding with.

◆ mShape1ExCvxRadius

const ConvexShape::Support* CollideConvexVsTriangles::mShape1ExCvxRadius = nullptr
protected

Actual support function object excluding convex radius.

◆ mShape1IncCvxRadius

const ConvexShape::Support* CollideConvexVsTriangles::mShape1IncCvxRadius = nullptr
protected

Actual support function object including convex radius.

◆ mSubShapeID1

SubShapeID CollideConvexVsTriangles::mSubShapeID1
protected

Sub shape ID of colliding shape.

◆ mTransform1

Mat44 CollideConvexVsTriangles::mTransform1
protected

Transform of the shape we're colliding with.

◆ mTransform2To1

Mat44 CollideConvexVsTriangles::mTransform2To1
protected

Transform that takes a point in space of the colliding shape to the shape we're colliding with.


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