Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Triangle Class Reference

A simple triangle and its material. More...

#include <Triangle.h>

Public Member Functions

JPH_OVERRIDE_NEW_DELETE Triangle ()=default
 Constructor. More...
 
 Triangle (const Float3 &inV1, const Float3 &inV2, const Float3 &inV3, uint32 inMaterialIndex=0, uint32 inUserData=0)
 
 Triangle (Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, uint32 inMaterialIndex=0, uint32 inUserData=0)
 
Vec3 GetCentroid () const
 Get center of triangle. More...
 

Public Attributes

Float3 mV [3]
 Vertices. More...
 
uint32 mMaterialIndex = 0
 Follows mV[3] so that we can read mV as 4 vectors. More...
 
uint32 mUserData = 0
 User data that can be used for anything by the application, e.g. for tracking the original index of the triangle. More...
 

Detailed Description

A simple triangle and its material.

Constructor & Destructor Documentation

◆ Triangle() [1/3]

JPH_OVERRIDE_NEW_DELETE Triangle::Triangle ( )
default

Constructor.

◆ Triangle() [2/3]

Triangle::Triangle ( const Float3 inV1,
const Float3 inV2,
const Float3 inV3,
uint32  inMaterialIndex = 0,
uint32  inUserData = 0 
)
inline

◆ Triangle() [3/3]

Triangle::Triangle ( Vec3Arg  inV1,
Vec3Arg  inV2,
Vec3Arg  inV3,
uint32  inMaterialIndex = 0,
uint32  inUserData = 0 
)
inline

Member Function Documentation

◆ GetCentroid()

Vec3 Triangle::GetCentroid ( ) const
inline

Get center of triangle.

Member Data Documentation

◆ mMaterialIndex

uint32 Triangle::mMaterialIndex = 0

Follows mV[3] so that we can read mV as 4 vectors.

◆ mUserData

uint32 Triangle::mUserData = 0

User data that can be used for anything by the application, e.g. for tracking the original index of the triangle.

◆ mV

Float3 Triangle::mV[3]

Vertices.


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