Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Public Attributes | List of all members
Mezzanine::Triangle3D Class Reference

A geometry math class for expressing a triangle in 3D space. More...

#include <triangle.h>

+ Collaboration diagram for Mezzanine::Triangle3D:

Public Member Functions

 Triangle3D ()
 Blank constructor.
 
 Triangle3D (const Vector3 &A, const Vector3 &B, const Vector3 &C)
 Descriptive constructor. More...
 
LineSegment3D GetOverlap (const Triangle3D &Other) const
 Gets the overlap of two triangles. More...
 
Vector3operator[] (const Whole &Index)
 Gets the point in this triangle corresponding to the specified index.

Exceptions
Ifthe index passed in is greater than 2, a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 
const Vector3operator[] (const Whole &Index) const
 Gets the point in this triangle corresponding to the specified index.

Exceptions
Ifthe index passed in is greater than 2, a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 

Public Attributes

Vector3 PointA
 The first point in space making the triangle.
 
Vector3 PointB
 The second point in space making the triangle.
 
Vector3 PointC
 The third point in space making the triangle.
 

Detailed Description

A geometry math class for expressing a triangle in 3D space.

Definition at line 96 of file triangle.h.

Constructor & Destructor Documentation

Mezzanine::Triangle3D::Triangle3D ( const Vector3 A,
const Vector3 B,
const Vector3 C 
)

Descriptive constructor.

Parameters
AThe first point in space making the triangle.
BThe second point in space making the triangle.
CThe third point in space making the triangle.

Definition at line 168 of file triangle.cpp.

Member Function Documentation

LineSegment3D Mezzanine::Triangle3D::GetOverlap ( const Triangle3D Other) const

Gets the overlap of two triangles.

Parameters
OtherThe other triangle to compare with.
Returns
Returns a line segment expressing the length where the two triangles overlap, or a zero'd out line segment if there is no overlap.

Definition at line 177 of file triangle.cpp.

Vector3 & Mezzanine::Triangle3D::operator[] ( const Whole Index)

Gets the point in this triangle corresponding to the specified index.

Exceptions
Ifthe index passed in is greater than 2, a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
IndexThe index of the point to retrieve.
Returns
Returns a reference to a Vector2 containing the position of the specified point.

Definition at line 288 of file triangle.cpp.

const Vector3 & Mezzanine::Triangle3D::operator[] ( const Whole Index) const

Gets the point in this triangle corresponding to the specified index.

Exceptions
Ifthe index passed in is greater than 2, a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
IndexThe index of the point to retrieve.
Returns
Returns a const reference to a Vector2 containing the position of the specified point.

Definition at line 301 of file triangle.cpp.


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