MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
STLTriangle Class Reference

#include <STLTriangle.h>

Public Member Functions

 STLTriangle ()
 
 STLTriangle (const Vec3D newNormal, const Vec3D newVertex1, const Vec3D newVertex2, const Vec3D newVertex3)
 
bool isEqualTo (const STLTriangle answer, double toll)
 

Public Attributes

Vec3D normal
 
Vec3D vertex1
 
Vec3D vertex2
 
Vec3D vertex3
 

Detailed Description

Definition at line 31 of file STLTriangle.h.

Constructor & Destructor Documentation

STLTriangle::STLTriangle ( )
inline

Definition at line 34 of file STLTriangle.h.

35  {};
STLTriangle::STLTriangle ( const Vec3D  newNormal,
const Vec3D  newVertex1,
const Vec3D  newVertex2,
const Vec3D  newVertex3 
)
inline

Definition at line 37 of file STLTriangle.h.

References normal, vertex1, vertex2, and vertex3.

38  {
39  normal = newNormal;
40  vertex1 = newVertex1;
41  vertex2 = newVertex2;
42  vertex3 = newVertex3;
43  }
Vec3D vertex3
Definition: STLTriangle.h:57
Vec3D vertex1
Definition: STLTriangle.h:55
Vec3D vertex2
Definition: STLTriangle.h:56
Vec3D normal
Definition: STLTriangle.h:54

Member Function Documentation

bool STLTriangle::isEqualTo ( const STLTriangle  answer,
double  toll 
)
inline

Definition at line 45 of file STLTriangle.h.

References Vec3D::isEqualTo(), normal, vertex1, vertex2, and vertex3.

46  {
47  if (!normal.isEqualTo(answer.normal, toll)) return false;
48  if (!vertex1.isEqualTo(answer.vertex1, toll)) return false;
49  if (!vertex2.isEqualTo(answer.vertex2, toll)) return false;
50  if (!vertex3.isEqualTo(answer.vertex3, toll)) return false;
51  return true;
52  }
Vec3D vertex3
Definition: STLTriangle.h:57
Vec3D vertex1
Definition: STLTriangle.h:55
Vec3D vertex2
Definition: STLTriangle.h:56
Vec3D normal
Definition: STLTriangle.h:54
bool isEqualTo(const Vec3D &other, double tol) const
Checks if the length this Vec3D is equal the length of other with a certain tolerance.
Definition: Vector.cc:294

Member Data Documentation

Vec3D STLTriangle::normal

Definition at line 54 of file STLTriangle.h.

Referenced by isEqualTo(), WallHandler::readTriangleWall(), and STLTriangle().

Vec3D STLTriangle::vertex1

Definition at line 55 of file STLTriangle.h.

Referenced by isEqualTo(), WallHandler::readTriangleWall(), and STLTriangle().

Vec3D STLTriangle::vertex2

Definition at line 56 of file STLTriangle.h.

Referenced by isEqualTo(), WallHandler::readTriangleWall(), and STLTriangle().

Vec3D STLTriangle::vertex3

Definition at line 57 of file STLTriangle.h.

Referenced by isEqualTo(), WallHandler::readTriangleWall(), and STLTriangle().


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