![]() |
Om
1.0.0
A universal framework for multimedia simulation
|
A class that stores information about a point of collision between two shapes. More...
#include <omPhysicsCollisionPoint.h>
Public Member Functions | |
| CollisionPoint (const SIMDFloat4 &newPoint1, const SIMDFloat4 &newPoint2, const SIMDFloat4 &newNormal, const SIMDFloat4 &newDistance, PhysicsMaterial *newMaterial1, PhysicsMaterial *newMaterial2, UInt32 newPrimitive1=0, UInt32 newPrimitive2=0) | |
| Create a new collision point with the specified normal direction, distance, and intersection points. More... | |
| CollisionPoint | reverse () const |
| Return a copy of this collision point with the colliding objects reversed. More... | |
Public Attributes | |
| SIMDFloat4 | point1 |
| The point of intersection on the first shape in world space. More... | |
| SIMDFloat4 | point2 |
| The point of intersection on the second shape in world space. More... | |
| SIMDFloat4 | normal |
| The unit-length separation direction of this collision point in world space. More... | |
| SIMDFloat4 | distance |
| The signed distance between the shapes, always negative if intersecting. More... | |
| PhysicsMaterial * | material1 |
| A pointer to the material of the first shape at the collision point. More... | |
| PhysicsMaterial * | material2 |
| A pointer to the material of the second shape at the collision point. More... | |
| UInt32 | primitive1 |
| The ID of the collider primitive (e.g. triangle) that is in collision on the first shape. More... | |
| UInt32 | primitive2 |
| The ID of the collider primitive (e.g. triangle) that is in collision on the second shape. More... | |
A class that stores information about a point of collision between two shapes.
|
inline |
Create a new collision point with the specified normal direction, distance, and intersection points.
|
inline |
Return a copy of this collision point with the colliding objects reversed.
| SIMDFloat4 om::physics::collision::CollisionPoint::point1 |
The point of intersection on the first shape in world space.
| SIMDFloat4 om::physics::collision::CollisionPoint::point2 |
The point of intersection on the second shape in world space.
| SIMDFloat4 om::physics::collision::CollisionPoint::normal |
The unit-length separation direction of this collision point in world space.
By convention, the normal direction points from the first shape to the second.
| SIMDFloat4 om::physics::collision::CollisionPoint::distance |
The signed distance between the shapes, always negative if intersecting.
| PhysicsMaterial* om::physics::collision::CollisionPoint::material1 |
A pointer to the material of the first shape at the collision point.
| PhysicsMaterial* om::physics::collision::CollisionPoint::material2 |
A pointer to the material of the second shape at the collision point.
| UInt32 om::physics::collision::CollisionPoint::primitive1 |
The ID of the collider primitive (e.g. triangle) that is in collision on the first shape.
| UInt32 om::physics::collision::CollisionPoint::primitive2 |
The ID of the collider primitive (e.g. triangle) that is in collision on the second shape.
1.8.11