Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Public Attributes | List of all members
om::physics::collision::CollisionPoint Class Reference

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...
 

Detailed Description

A class that stores information about a point of collision between two shapes.

Constructor & Destructor Documentation

om::physics::collision::CollisionPoint::CollisionPoint ( const SIMDFloat4 &  newPoint1,
const SIMDFloat4 &  newPoint2,
const SIMDFloat4 &  newNormal,
const SIMDFloat4 &  newDistance,
PhysicsMaterial *  newMaterial1,
PhysicsMaterial *  newMaterial2,
UInt32  newPrimitive1 = 0,
UInt32  newPrimitive2 = 0 
)
inline

Create a new collision point with the specified normal direction, distance, and intersection points.

Member Function Documentation

CollisionPoint om::physics::collision::CollisionPoint::reverse ( ) const
inline

Return a copy of this collision point with the colliding objects reversed.

Member Data Documentation

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.


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