Overture  Version 25
Public Member Functions | Public Attributes | List of all members
Triangle Class Reference

#include <TriangleClass.h>

Public Member Functions

 Triangle ()
 
 Triangle (const real x1[3], const real x2[3], const real x3[3])
 
 Triangle (const RealArray &x1, const RealArray &x2, const RealArray &x3)
 
 Triangle (const realArray &grid, const int &i1, const int &i2, const int &i3, const int &choice=0, const int &axis=axis3)
 
 ~Triangle ()
 
real area () const
 
void setVertices (const real x1_[3], const real x2_[3], const real x3_[3])
 
void setVertices (const RealArray &x1, const RealArray &x2, const RealArray &x3)
 
void setVertices (const realArray &grid, const int &i1, const int &i2, const int &i3, const int &choice=0, const int &axis=axis3)
 
bool intersects (Triangle &triangle, real xi1[3], real xi2[3]) const
 
bool intersects (Triangle &triangle, RealArray &xi1, RealArray &xi2) const
 
bool intersects (real x[3], real xi[3]) const
 
bool intersects (RealArray &x, RealArray &xi) const
 
bool intersects (real x[3], real xi[3], real b0[3], real b1[3], real b2[3]) const
 
bool intersects (RealArray &x, RealArray &xi, real b0[3], real b1[3], real b2[3]) const
 
int getRelativeCoordinates (const real x[3], real &alpha1, real &alpha2, const bool &shouldBeInside=TRUE) const
 
void display (const aString &label=blankString) const
 
double tetrahedralVolume (const real a[], const real b[], const real c[], const real d[]) const
 
void computeNormal ()
 

Public Attributes

real x1 [3]
 
real x2 [3]
 
real x3 [3]
 
real normal [4]
 

Constructor & Destructor Documentation

Triangle::Triangle ( )

References computeNormal(), x1, x2, and x3.

Triangle::Triangle ( const real  x1[3],
const real  x2[3],
const real  x3[3] 
)

References setVertices(), x1, x2, and x3.

Triangle::Triangle ( const RealArray x1,
const RealArray x2,
const RealArray x3 
)

References setVertices().

Triangle::Triangle ( const realArray grid,
const int &  i1,
const int &  i2,
const int &  i3,
const int &  choice = 0,
const int &  axis = axis3 
)

References setVertices().

Triangle::~Triangle ( )

Member Function Documentation

real Triangle::area ( ) const

References SQRT, x1, x2, and x3.

void Triangle::computeNormal ( )

References normal, SQR, SQRT, x1, x2, and x3.

Referenced by setVertices(), and Triangle().

void Triangle::display ( const aString label = blankString) const
int Triangle::getRelativeCoordinates ( const real  x[3],
real alpha1,
real alpha2,
const bool &  shouldBeInside = TRUE 
) const
bool Triangle::intersects ( Triangle triangle,
real  xi1[3],
real  xi2[3] 
) const
bool Triangle::intersects ( Triangle triangle,
RealArray xi1,
RealArray xi2 
) const
bool Triangle::intersects ( real  x[3],
real  xi[3] 
) const
bool Triangle::intersects ( RealArray x,
RealArray xi 
) const

References x.

bool Triangle::intersects ( real  x[3],
real  xi[3],
real  b0[3],
real  b1[3],
real  b2[3] 
) const
bool Triangle::intersects ( RealArray x,
RealArray xi,
real  b0[3],
real  b1[3],
real  b2[3] 
) const

References x.

void Triangle::setVertices ( const real  x1_[3],
const real  x2_[3],
const real  x3_[3] 
)
void Triangle::setVertices ( const RealArray x1,
const RealArray x2,
const RealArray x3 
)

References setVertices().

void Triangle::setVertices ( const realArray grid,
const int &  i1,
const int &  i2,
const int &  i3,
const int &  choice = 0,
const int &  axis = axis3 
)

References assert, axis2, axis3, computeNormal(), x1, x2, and x3.

double Triangle::tetrahedralVolume ( const real  a[],
const real  b[],
const real  c[],
const real  d[] 
) const

References c.

Member Data Documentation

real Triangle::normal[4]

Referenced by computeNormal(), and intersects().

real Triangle::x1[3]
real Triangle::x2[3]
real Triangle::x3[3]

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