Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
CompoundShape::CastRayVisitor Struct Reference

#include <CompoundShapeVisitors.h>

Public Member Functions

JPH_INLINE CastRayVisitor (const RayCast &inRay, const CompoundShape *inShape, const SubShapeIDCreator &inSubShapeIDCreator, RayCastResult &ioHit)
 
JPH_INLINE bool ShouldAbort () const
 Returns true when collision detection should abort because it's not possible to find a better hit. More...
 
JPH_INLINE Vec4 TestBounds (Vec4Arg inBoundsMinX, Vec4Arg inBoundsMinY, Vec4Arg inBoundsMinZ, Vec4Arg inBoundsMaxX, Vec4Arg inBoundsMaxY, Vec4Arg inBoundsMaxZ) const
 Test ray against 4 bounding boxes and returns the distance where the ray enters the bounding box. More...
 
JPH_INLINE void VisitShape (const SubShape &inSubShape, uint32 inSubShapeIndex)
 Test the ray against a single subshape. More...
 

Public Attributes

RayInvDirection mInvDirection
 
const RayCastmRay
 
RayCastResultmHit
 
SubShapeIDCreator mSubShapeIDCreator
 
uint mSubShapeBits
 
bool mReturnValue = false
 

Constructor & Destructor Documentation

◆ CastRayVisitor()

JPH_INLINE CompoundShape::CastRayVisitor::CastRayVisitor ( const RayCast inRay,
const CompoundShape inShape,
const SubShapeIDCreator inSubShapeIDCreator,
RayCastResult ioHit 
)
inline

Member Function Documentation

◆ ShouldAbort()

JPH_INLINE bool CompoundShape::CastRayVisitor::ShouldAbort ( ) const
inline

Returns true when collision detection should abort because it's not possible to find a better hit.

◆ TestBounds()

JPH_INLINE Vec4 CompoundShape::CastRayVisitor::TestBounds ( Vec4Arg  inBoundsMinX,
Vec4Arg  inBoundsMinY,
Vec4Arg  inBoundsMinZ,
Vec4Arg  inBoundsMaxX,
Vec4Arg  inBoundsMaxY,
Vec4Arg  inBoundsMaxZ 
) const
inline

Test ray against 4 bounding boxes and returns the distance where the ray enters the bounding box.

◆ VisitShape()

JPH_INLINE void CompoundShape::CastRayVisitor::VisitShape ( const SubShape inSubShape,
uint32  inSubShapeIndex 
)
inline

Test the ray against a single subshape.

Member Data Documentation

◆ mHit

RayCastResult& CompoundShape::CastRayVisitor::mHit

◆ mInvDirection

RayInvDirection CompoundShape::CastRayVisitor::mInvDirection

◆ mRay

const RayCast& CompoundShape::CastRayVisitor::mRay

◆ mReturnValue

bool CompoundShape::CastRayVisitor::mReturnValue = false

◆ mSubShapeBits

uint CompoundShape::CastRayVisitor::mSubShapeBits

◆ mSubShapeIDCreator

SubShapeIDCreator CompoundShape::CastRayVisitor::mSubShapeIDCreator

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