Rasterfarm-SDK
Loading...
Searching...
No Matches
Triangle Class Reference

#include <triangle.h>

Public Types

enum  Type : uint {
  DEGENERATE = 0 ,
  ACUTE ,
  OBTUSE ,
  RIGHT ,
  DEGENERATE = 0 ,
  ACUTE ,
  OBTUSE ,
  RIGHT
}
 
enum  Type : uint {
  DEGENERATE = 0 ,
  ACUTE ,
  OBTUSE ,
  RIGHT ,
  DEGENERATE = 0 ,
  ACUTE ,
  OBTUSE ,
  RIGHT
}
 

Public Member Functions

 Triangle ()
 
 Triangle (const Vertex2f vertex[3])
 
 Triangle (const Vertex2f &a, const Vertex2f &b, const Vertex2f &c)
 
 Triangle (const Vector2fArray &vertex)
 
 operator Vertex2fArray () const
 
const Vertex2foperator[] (uint index) const
 
Vertex2foperator[] (uint index)
 
Vertex2f centroid () const
 
bool isNullArea (float precision=0.0f) const
 
Vertex2fArray getVertices () const
 
Type getType () const
 
float getArea () const
 
float getBoundingRadius () const
 
Array< float, 3 > barycentric (const Vertex2f &point)
 
Vertex2f getVertex (uint index)
 
 Triangle ()
 
 Triangle (const Vertex3f vertex[3])
 
 Triangle (const Vertex3f &a, const Vertex3f &b, const Vertex3f &c)
 
 Triangle (const Vector3fArray &vertex)
 
 operator Vertex3fArray () const
 
const Vertex3foperator[] (uint index) const
 
Vertex3foperator[] (uint index)
 
 operator Primitive2D::Triangle ()
 
Vertex3fArray getVertices () const
 
Vector4f getPlaneEquation () const
 
Vertex3f centroid () const
 
bool isNullArea (float precision=0.0f) const
 
Type getType () const
 
float getArea () const
 
float getBoundingRadius () const
 
Array< float, 3 > barycentric (const Vertex3f &point)
 
Vertex3f getVertex (uint index)
 
Vertex3f normal () const
 

Static Public Member Functions

static Pair< Triangle, TriangledivideOrthagonal (const Triangle &t)
 

Protected Attributes

Vertex2f vertex [3]
 
Vertex3f vertex [3]
 

Member Enumeration Documentation

◆ Type [1/2]

enum Triangle::Type : uint
Enumerator
DEGENERATE 
ACUTE 
OBTUSE 
RIGHT 
DEGENERATE 
ACUTE 
OBTUSE 
RIGHT 

◆ Type [2/2]

enum Triangle::Type : uint
Enumerator
DEGENERATE 
ACUTE 
OBTUSE 
RIGHT 
DEGENERATE 
ACUTE 
OBTUSE 
RIGHT 

Constructor & Destructor Documentation

◆ Triangle() [1/8]

Triangle::Triangle ( )

◆ Triangle() [2/8]

Triangle::Triangle ( const Vertex2f vertex[3])

◆ Triangle() [3/8]

Triangle::Triangle ( const Vertex2f & a,
const Vertex2f & b,
const Vertex2f & c )

◆ Triangle() [4/8]

Triangle::Triangle ( const Vector2fArray & vertex)

◆ Triangle() [5/8]

Triangle::Triangle ( )

◆ Triangle() [6/8]

Triangle::Triangle ( const Vertex3f vertex[3])

◆ Triangle() [7/8]

Triangle::Triangle ( const Vertex3f & a,
const Vertex3f & b,
const Vertex3f & c )

◆ Triangle() [8/8]

Triangle::Triangle ( const Vector3fArray & vertex)

Member Function Documentation

◆ barycentric() [1/2]

Array< float, 3 > Triangle::barycentric ( const Vertex2f & point)
Returns
The barycentric coordinates for the given point.

◆ barycentric() [2/2]

Array< float, 3 > Triangle::barycentric ( const Vertex3f & point)
Returns
The barycentric coordinates for the given point.

◆ centroid() [1/2]

Vertex2f Triangle::centroid ( ) const

◆ centroid() [2/2]

Vertex3f Triangle::centroid ( ) const

◆ divideOrthagonal()

static Pair< Triangle, Triangle > Triangle::divideOrthagonal ( const Triangle & t)
static

Divides a Triangle into 2 orthagonal Triangles.

◆ getArea() [1/2]

float Triangle::getArea ( ) const

◆ getArea() [2/2]

float Triangle::getArea ( ) const

◆ getBoundingRadius() [1/2]

float Triangle::getBoundingRadius ( ) const

◆ getBoundingRadius() [2/2]

float Triangle::getBoundingRadius ( ) const

◆ getPlaneEquation()

Vector4f Triangle::getPlaneEquation ( ) const

◆ getType() [1/2]

Type Triangle::getType ( ) const

◆ getType() [2/2]

Type Triangle::getType ( ) const

◆ getVertex() [1/2]

Vertex2f Triangle::getVertex ( uint index)
inline

◆ getVertex() [2/2]

Vertex3f Triangle::getVertex ( uint index)
inline

◆ getVertices() [1/2]

Vertex2fArray Triangle::getVertices ( ) const
inline

◆ getVertices() [2/2]

Vertex3fArray Triangle::getVertices ( ) const
inline

◆ isNullArea() [1/2]

bool Triangle::isNullArea ( float precision = 0.0f) const
Parameters
Defaultis no-precision.

◆ isNullArea() [2/2]

bool Triangle::isNullArea ( float precision = 0.0f) const
Parameters
Defaultis no-precision.

◆ normal()

Vertex3f Triangle::normal ( ) const

◆ operator Primitive2D::Triangle()

Triangle::operator Primitive2D::Triangle ( )

◆ operator Vertex2fArray()

Triangle::operator Vertex2fArray ( ) const
inline

◆ operator Vertex3fArray()

Triangle::operator Vertex3fArray ( ) const
inline

◆ operator[]() [1/4]

Vertex2f & Triangle::operator[] ( uint index)
inline

◆ operator[]() [2/4]

Vertex3f & Triangle::operator[] ( uint index)
inline

◆ operator[]() [3/4]

const Vertex2f & Triangle::operator[] ( uint index) const
inline

◆ operator[]() [4/4]

const Vertex3f & Triangle::operator[] ( uint index) const
inline

Member Data Documentation

◆ vertex [1/2]

Vertex2f Triangle::vertex[3]
protected

◆ vertex [2/2]

Vertex3f Triangle::vertex[3]
protected

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