Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
CollideSphereVsTriangles.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
10
12
14
17{
18public:
28 CollideSphereVsTriangles(const SphereShape *inShape1, Vec3Arg inScale1, Vec3Arg inScale2, Mat44Arg inCenterOfMassTransform1, Mat44Arg inCenterOfMassTransform2, const SubShapeID &inSubShapeID1, const CollideShapeSettings &inCollideShapeSettings, CollideShapeCollector &ioCollector);
29
35 void Collide(Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2, uint8 inActiveEdges, const SubShapeID &inSubShapeID2);
36
37protected:
46 float mRadius;
48};
49
std::uint8_t uint8
Definition Core.h:454
#define JPH_EXPORT
Definition Core.h:236
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
Settings to be passed with a collision query.
Definition CollideShape.h:94
Collision detection helper that collides a sphere vs one or more triangles.
Definition CollideSphereVsTriangles.h:17
float mRadius
Radius of the sphere.
Definition CollideSphereVsTriangles.h:46
Vec3 mSphereCenterIn2
The center of the sphere in the space of 2.
Definition CollideSphereVsTriangles.h:43
float mScaleSign2
Sign of the scale of object 2, -1 if object is inside out, 1 if not.
Definition CollideSphereVsTriangles.h:45
CollideShapeCollector & mCollector
The collector that will receive the results.
Definition CollideSphereVsTriangles.h:39
Mat44 mTransform2
Transform of the shape we're colliding against.
Definition CollideSphereVsTriangles.h:42
const SphereShape * mShape1
The shape that we're colliding with.
Definition CollideSphereVsTriangles.h:40
SubShapeID mSubShapeID1
Sub shape ID of colliding shape.
Definition CollideSphereVsTriangles.h:44
float mRadiusPlusMaxSeparationSq
(Radius + Max SeparationDistance)^2
Definition CollideSphereVsTriangles.h:47
const CollideShapeSettings & mCollideShapeSettings
Settings for this collision operation.
Definition CollideSphereVsTriangles.h:38
Vec3 mScale2
The scale of the shape (in shape local space) of the shape we're colliding against.
Definition CollideSphereVsTriangles.h:41
Virtual interface that allows collecting multiple collision results.
Definition CollisionCollector.h:45
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Definition SphereShape.h:32
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition SubShapeID.h:23
Definition Vec3.h:17