Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
CharacterVsCharacterCollision Class Referenceabstract

#include <CharacterVirtual.h>

Inheritance diagram for CharacterVsCharacterCollision:
NonCopyable CharacterVsCharacterCollisionSimple

Public Member Functions

virtual ~CharacterVsCharacterCollision ()=default
 
virtual void CollideCharacter (const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const =0
 
virtual void CastCharacter (const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const =0
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Detailed Description

Interface class that allows a CharacterVirtual to check collision with other CharacterVirtual instances. Since CharacterVirtual instances are not registered anywhere, it is up to the application to test collision against relevant characters. The characters could be stored in a tree structure to make this more efficient.

Constructor & Destructor Documentation

◆ ~CharacterVsCharacterCollision()

virtual CharacterVsCharacterCollision::~CharacterVsCharacterCollision ( )
virtualdefault

Member Function Documentation

◆ CastCharacter()

virtual void CharacterVsCharacterCollision::CastCharacter ( const CharacterVirtual inCharacter,
RMat44Arg  inCenterOfMassTransform,
Vec3Arg  inDirection,
const ShapeCastSettings inShapeCastSettings,
RVec3Arg  inBaseOffset,
CastShapeCollector ioCollector 
) const
pure virtual

Cast a character against other CharacterVirtuals.

Parameters
inCharacterThe character to cast.
inCenterOfMassTransformCenter of mass transform for this character.
inDirectionDirection and length to cast in.
inShapeCastSettingsSettings for the shape cast.
inBaseOffsetAll hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin
ioCollectorCollision collector that receives the collision results.

Implemented in CharacterVsCharacterCollisionSimple.

◆ CollideCharacter()

virtual void CharacterVsCharacterCollision::CollideCharacter ( const CharacterVirtual inCharacter,
RMat44Arg  inCenterOfMassTransform,
const CollideShapeSettings inCollideShapeSettings,
RVec3Arg  inBaseOffset,
CollideShapeCollector ioCollector 
) const
pure virtual

Collide a character against other CharacterVirtuals.

Parameters
inCharacterThe character to collide.
inCenterOfMassTransformCenter of mass transform for this character.
inCollideShapeSettingsSettings for the collision check.
inBaseOffsetAll hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. GetPosition() since floats are most accurate near the origin
ioCollectorCollision collector that receives the collision results.

Implemented in CharacterVsCharacterCollisionSimple.


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