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

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

#include <CastConvexVsTriangles.h>

Public Member Functions

 CastConvexVsTriangles (const ShapeCast &inShapeCast, const ShapeCastSettings &inShapeCastSettings, Vec3Arg inScale, Mat44Arg inCenterOfMassTransform2, const SubShapeIDCreator &inSubShapeIDCreator1, CastShapeCollector &ioCollector)
 
void Cast (Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2)
 

Protected Attributes

const ShapeCastmShapeCast
 
const ShapeCastSettingsmShapeCastSettings
 
const Mat44mCenterOfMassTransform2
 
Vec3 mScale
 
SubShapeIDCreator mSubShapeIDCreator1
 
CastShapeCollectormCollector
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CastConvexVsTriangles()

JPH_NAMESPACE_BEGIN CastConvexVsTriangles::CastConvexVsTriangles ( const ShapeCast inShapeCast,
const ShapeCastSettings inShapeCastSettings,
Vec3Arg  inScale,
Mat44Arg  inCenterOfMassTransform2,
const SubShapeIDCreator inSubShapeIDCreator1,
CastShapeCollector ioCollector 
)

Constructor

Parameters
inShapeCastThe shape to cast against the triangles and its start and direction
inShapeCastSettingsSettings for performing the cast
inScaleLocal space scale for the shape to cast against (scales relative to its center of mass).
inCenterOfMassTransform2Is the center of mass transform of shape 2 (excluding scale), this is used to provide a transform to the shape cast result so that local quantities can be transformed into world space.
inSubShapeIDCreator1Class that tracks the current sub shape ID for the casting shape
ioCollectorThe collector that receives the results.

Member Function Documentation

◆ Cast()

void CastConvexVsTriangles::Cast ( Vec3Arg  inV0,
Vec3Arg  inV1,
Vec3Arg  inV2,
uint8  inActiveEdges,
const SubShapeID inSubShapeID2 
)

Cast 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

◆ mCenterOfMassTransform2

const Mat44& CastConvexVsTriangles::mCenterOfMassTransform2
protected

◆ mCollector

CastShapeCollector& CastConvexVsTriangles::mCollector
protected

◆ mScale

Vec3 CastConvexVsTriangles::mScale
protected

◆ mShapeCast

const ShapeCast& CastConvexVsTriangles::mShapeCast
protected

◆ mShapeCastSettings

const ShapeCastSettings& CastConvexVsTriangles::mShapeCastSettings
protected

◆ mSubShapeIDCreator1

SubShapeIDCreator CastConvexVsTriangles::mSubShapeIDCreator1
protected

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