Jolt Physics
A multi core friendly Game Physics Engine
|
#include <CharacterVirtual.h>
Public Member Functions | |
void | Add (CharacterVirtual *inCharacter) |
Add a character to the list of characters to check collision against. More... | |
void | Remove (const CharacterVirtual *inCharacter) |
Remove a character from the list of characters to check collision against. More... | |
virtual void | CollideCharacter (const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, const CollideShapeSettings &inCollideShapeSettings, RVec3Arg inBaseOffset, CollideShapeCollector &ioCollector) const override |
virtual void | CastCharacter (const CharacterVirtual *inCharacter, RMat44Arg inCenterOfMassTransform, Vec3Arg inDirection, const ShapeCastSettings &inShapeCastSettings, RVec3Arg inBaseOffset, CastShapeCollector &ioCollector) const override |
Public Member Functions inherited from CharacterVsCharacterCollision | |
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 |
Public Attributes | |
Array< CharacterVirtual * > | mCharacters |
The list of characters to check collision against. More... | |
Simple collision checker that loops over all registered characters. Note that this is not thread safe, so make sure that only one CharacterVirtual is checking collision at a time.
|
inline |
Add a character to the list of characters to check collision against.
|
overridevirtual |
Cast a character against other CharacterVirtuals.
inCharacter | The character to cast. |
inCenterOfMassTransform | Center of mass transform for this character. |
inDirection | Direction and length to cast in. |
inShapeCastSettings | Settings for the shape cast. |
inBaseOffset | All 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 |
ioCollector | Collision collector that receives the collision results. |
Implements CharacterVsCharacterCollision.
|
overridevirtual |
Collide a character against other CharacterVirtuals.
inCharacter | The character to collide. |
inCenterOfMassTransform | Center of mass transform for this character. |
inCollideShapeSettings | Settings for the collision check. |
inBaseOffset | All 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 |
ioCollector | Collision collector that receives the collision results. |
Implements CharacterVsCharacterCollision.
JPH_NAMESPACE_BEGIN void CharacterVsCharacterCollisionSimple::Remove | ( | const CharacterVirtual * | inCharacter | ) |
Remove a character from the list of characters to check collision against.
Array<CharacterVirtual *> CharacterVsCharacterCollisionSimple::mCharacters |
The list of characters to check collision against.