#include <Opcode.h>
Definition at line 31 of file Opcode.h.
inline_ Opcode::Triangle::Triangle |
( |
) | |
|
|
inline |
Constructor.
Definition at line 35 of file Opcode.h.
Constructor.
Definition at line 37 of file Opcode.h.
Copy constructor.
Definition at line 39 of file Opcode.h.
inline_ Opcode::Triangle::~Triangle |
( |
) | |
|
|
inline |
Destructor.
Definition at line 46 of file Opcode.h.
float Triangle::Area |
( |
) | |
const |
Computes the triangle area.
- Returns
- the area
Definition at line 57 of file IceTriangle.cpp.
62 return ((p0 - p1)^(p0 - p2)).
Magnitude() * 0.5f;
void Triangle::Center |
( |
Point & |
center) | |
const |
Computes the triangle center.
- Parameters
-
center | [out] the computed center |
Definition at line 128 of file IceTriangle.cpp.
Referenced by Inflate().
133 center = (p0 + p1 + p2)*
INV3;
float Triangle::Compacity |
( |
) | |
const |
Computes the triangle compacity.
- Returns
- the compacity
Definition at line 87 of file IceTriangle.cpp.
90 if(P==0.0f)
return 0.0f;
91 return (4.0f*
PI*
Area()/(P*P));
void Opcode::Triangle::ComputeMoment |
( |
Moment & |
m) | |
|
Computes a point on the triangle according to the stabbing information.
- Parameters
-
u,v | [in] point's barycentric coordinates |
pt | [out] point on triangle |
nearvtx | [out] index of nearest vertex |
Definition at line 252 of file IceTriangle.cpp.
262 mVerts[1].SquareDistance(pt),
263 mVerts[2].SquareDistance(pt));
266 *nearvtx =
d.SmallestAxis();
void Triangle::DenormalizedNormal |
( |
Point & |
normal) | |
const |
Computes the triangle denormalized normal.
- Parameters
-
normal | [out] the computed normal |
Definition at line 114 of file IceTriangle.cpp.
119 normal = ((p0 - p1)^(p0 - p2));
void Triangle::Inflate |
( |
float |
fat_coeff, |
|
|
bool |
constant_border |
|
) |
| |
float Triangle::MaxEdgeLength |
( |
) | |
const |
Computes the triangle's largest edge length.
- Returns
- the largest edge length
Definition at line 232 of file IceTriangle.cpp.
238 if(Length01 > Max) Max = Length01;
239 if(Length02 > Max) Max = Length02;
240 if(Length12 > Max) Max = Length12;
float Triangle::MinEdgeLength |
( |
) | |
const |
Computes the triangle moment.
- Parameters
-
m | [out] the moment Computes the triangle's smallest edge length. |
- Returns
- the smallest edge length
Definition at line 214 of file IceTriangle.cpp.
220 if(Length01 < Min) Min = Length01;
221 if(Length02 < Min) Min = Length02;
222 if(Length12 < Min) Min = Length12;
void Triangle::Normal |
( |
Point & |
normal) | |
const |
Computes the triangle normal.
- Parameters
-
normal | [out] the computed normal |
Definition at line 100 of file IceTriangle.cpp.
105 normal = ((p0 - p1)^(p0 - p2)).Normalize();
float Triangle::Perimeter |
( |
) | |
const |
Computes the triangle perimeter.
- Returns
- the perimeter
Definition at line 71 of file IceTriangle.cpp.
Point Opcode::Triangle::mVerts[3] |
The documentation for this class was generated from the following files: