STLTriangle Class Reference

Test of the STL reader. The files used is STL file with containing 12 triange that a 1 by 1 by 1 square and was created in autocad. More...

#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)
 
 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

Test of the STL reader. The files used is STL file with containing 12 triange that a 1 by 1 by 1 square and was created in autocad.

Constructor & Destructor Documentation

◆ STLTriangle() [1/4]

STLTriangle::STLTriangle ( )
inline
41 {};

◆ STLTriangle() [2/4]

STLTriangle::STLTriangle ( const Vec3D  newNormal,
const Vec3D  newVertex1,
const Vec3D  newVertex2,
const Vec3D  newVertex3 
)
inline
44  {
45  normal=newNormal;
46  vertex1=newVertex1;
47  vertex2=newVertex2;
48  vertex3=newVertex3;
49  }
Vec3D vertex2
Definition: BinaryReaderSTL1by1by1bySquareUnitTest.cpp:62
Vec3D vertex3
Definition: BinaryReaderSTL1by1by1bySquareUnitTest.cpp:63
Vec3D vertex1
Definition: BinaryReaderSTL1by1by1bySquareUnitTest.cpp:61
Vec3D normal
Definition: BinaryReaderSTL1by1by1bySquareUnitTest.cpp:60

References normal, vertex1, vertex2, and vertex3.

◆ STLTriangle() [3/4]

STLTriangle::STLTriangle ( )
inline
35  {};

◆ STLTriangle() [4/4]

STLTriangle::STLTriangle ( const Vec3D  newNormal,
const Vec3D  newVertex1,
const Vec3D  newVertex2,
const Vec3D  newVertex3 
)
inline
38  {
39  normal = newNormal;
40  vertex1 = newVertex1;
41  vertex2 = newVertex2;
42  vertex3 = newVertex3;
43  }

References normal, vertex1, vertex2, and vertex3.

Member Function Documentation

◆ isEqualTo() [1/2]

bool STLTriangle::isEqualTo ( const STLTriangle  answer,
double  toll 
)
inline
52  {
53  if (!normal.isEqualTo(answer.normal,toll)) return false;
54  if (!vertex1.isEqualTo(answer.vertex1,toll)) return false;
55  if (!vertex2.isEqualTo(answer.vertex2,toll)) return false;
56  if (!vertex3.isEqualTo(answer.vertex3,toll)) return false;
57  return true;
58  }
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

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

◆ isEqualTo() [2/2]

bool STLTriangle::isEqualTo ( const STLTriangle  answer,
double  toll 
)
inline
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  }

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

Member Data Documentation

◆ normal

Vec3D STLTriangle::normal

◆ vertex1

Vec3D STLTriangle::vertex1

◆ vertex2

Vec3D STLTriangle::vertex2

◆ vertex3

Vec3D STLTriangle::vertex3

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