Definition of a Triangle. More...
#include <CCPUMeshSurfaceEmitter.h>
Classes | |
struct | PositionAndNormal |
The struct is used to return both the position and the normal. More... | |
Public Member Functions | |
PUTriangle (void) | |
Constructor. More... | |
void | calculateSquareSurface (void) |
Calculate the (square) surface of the triangle. More... | |
local | calculateSquareSurface () |
Calculate the (square) surface of the triangle. More... | |
void | calculateSurfaceNormal (void) |
Calculate the surface normal of the triangle. More... | |
void | calculateEdgeNormals (void) |
Calculate the edge normals of the 3 edges. More... | |
const Vec3 | getRandomTrianglePosition (void) |
Determine a random position on this triangle. More... | |
const PositionAndNormal | getRandomEdgePositionAndNormal (void) |
Determine a random position including its normal on a one of the edges. More... | |
local | getRandomEdgePositionAndNormal () |
Determine a random position including its normal on a one of the edges. More... | |
const PositionAndNormal | getRandomVertexAndNormal (void) |
Determine a random vertex including its normal of this triangle. More... | |
local | getRandomVertexAndNormal () |
Determine a random vertex including its normal of this triangle. More... | |
Public Attributes | |
float | squareSurface |
Public attributes. More... | |
Vec3 | surfaceNormal |
Vec3 | v1 |
Vec3 | v2 |
Vec3 | v3 |
Vec3 | vn1 |
Vec3 | vn2 |
Vec3 | vn3 |
Vec3 | en1 |
Vec3 | en2 |
Vec3 | en3 |
Definition of a Triangle.
|
inline |
Constructor.
|
inline |
Constructor.
|
inline |
Constructor.
void calculateEdgeNormals | ( | void | ) |
Calculate the edge normals of the 3 edges.
var calculateEdgeNormals | ( | ) |
Calculate the edge normals of the 3 edges.
local calculateEdgeNormals | ( | ) |
Calculate the edge normals of the 3 edges.
void calculateSquareSurface | ( | void | ) |
Calculate the (square) surface of the triangle.
var calculateSquareSurface | ( | ) |
Calculate the (square) surface of the triangle.
local calculateSquareSurface | ( | ) |
Calculate the (square) surface of the triangle.
void calculateSurfaceNormal | ( | void | ) |
Calculate the surface normal of the triangle.
var calculateSurfaceNormal | ( | ) |
Calculate the surface normal of the triangle.
local calculateSurfaceNormal | ( | ) |
Calculate the surface normal of the triangle.
const PositionAndNormal getRandomEdgePositionAndNormal |
( | void | ) |
Determine a random position including its normal on a one of the edges.
var getRandomEdgePositionAndNormal | ( | ) |
Determine a random position including its normal on a one of the edges.
local getRandomEdgePositionAndNormal |
( | ) |
Determine a random position including its normal on a one of the edges.
const Vec3 getRandomTrianglePosition |
( | void | ) |
Determine a random position on this triangle.
var getRandomTrianglePosition | ( | ) |
Determine a random position on this triangle.
local getRandomTrianglePosition | ( | ) |
Determine a random position on this triangle.
const PositionAndNormal getRandomVertexAndNormal |
( | void | ) |
Determine a random vertex including its normal of this triangle.
var getRandomVertexAndNormal | ( | ) |
Determine a random vertex including its normal of this triangle.
local getRandomVertexAndNormal | ( | ) |
Determine a random vertex including its normal of this triangle.
Vec3 en1 |
var en1 |
local en1 |
Vec3 en2 |
var en2 |
local en2 |
Vec3 en3 |
var en3 |
local en3 |
float squareSurface |
Public attributes.
var squareSurface |
Public attributes.
local squareSurface |
Public attributes.
Vec3 surfaceNormal |
var surfaceNormal |
local surfaceNormal |
Vec3 v1 |
var v1 |
local v1 |
Vec3 v2 |
var v2 |
local v2 |
Vec3 v3 |
var v3 |
local v3 |
Vec3 vn1 |
var vn1 |
local vn1 |
Vec3 vn2 |
var vn2 |
local vn2 |
Vec3 vn3 |
var vn3 |
local vn3 |