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)
 
 Triangle (const Float3 &inV1, const Float3 &inV2, const Float3 &inV3, uint32 inMaterialIndex)
 
 Triangle (Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3)
 
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...
 

Detailed Description

A simple triangle and its material.

Constructor & Destructor Documentation

◆ Triangle() [1/4]

JPH_OVERRIDE_NEW_DELETE Triangle::Triangle ( )
default

Constructor.

◆ Triangle() [2/4]

Triangle::Triangle ( const Float3 inV1,
const Float3 inV2,
const Float3 inV3 
)
inline

◆ Triangle() [3/4]

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

◆ Triangle() [4/4]

Triangle::Triangle ( Vec3Arg  inV1,
Vec3Arg  inV2,
Vec3Arg  inV3 
)
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.

◆ mV

Float3 Triangle::mV[3]

Vertices.


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