15 #ifndef G3D_Triangle_h
16 #define G3D_Triangle_h
114 for (
int i = 0; i < 3; ++i) {
115 if (_vertex[i] != other.
_vertex[i]) {
bool operator==(const Triangle &other) const
Definition: Triangle.h:113
static size_t hashCode(const G3D::Triangle &key)
Definition: Triangle.h:152
Triangle()
Definition: Triangle.cpp:54
float _area
Definition: Triangle.h:53
Point3 center() const
Definition: Triangle.cpp:103
float edgeMagnitude[3]
Definition: Triangle.h:43
Definition: HashTrait.h:105
Plane _plane
Definition: Triangle.h:44
static Vector3 & ignore()
Definition: Vector3.cpp:114
Axis
Definition: Vector3.h:122
void getRandomSurfacePoint(Point3 &P, Vector3 &N=Vector3::ignore()) const
Definition: Triangle.h:102
Definition: CollisionDetection.h:94
double distance(double x, double y)
Definition: g3dmath.h:731
Vector3 edgeDirection[3]
Definition: Triangle.h:42
~Triangle()
Definition: Triangle.cpp:64
const Vector3 & edge02() const
Definition: Triangle.h:81
void getBounds(class AABox &) const
Definition: Triangle.cpp:124
void serialize(class BinaryOutput &b)
Definition: Triangle.cpp:73
static void getBounds(const G3D::Triangle &t, G3D::AABox &out)
Definition: Triangle.h:157
float area() const
Definition: Triangle.cpp:88
size_t hashCode() const
Definition: Vector3.cpp:155
Vector3::Axis _primaryAxis
Definition: Triangle.h:45
#define debugAssert(exp)
Definition: debugAssert.h:160
void deserialize(class BinaryInput &b)
Definition: Triangle.cpp:80
size_t hashCode() const
Definition: Triangle.h:123
const Vector3 & edge01() const
Definition: Triangle.h:76
Definition: BoundsTrait.h:17
Vector3 _vertex[3]
Definition: Triangle.h:39
Vector3 _edge01
Definition: Triangle.h:48
Vector3 _edge02
Definition: Triangle.h:51
const Plane & plane() const
Definition: Triangle.cpp:98
const Vector3 & normal() const
Definition: Triangle.cpp:93
Definition: BinaryOutput.h:52
Point3 randomPoint() const
Definition: Triangle.cpp:107
bool intersect(const class Ray &ray, float &distance, float baryCoord[3]) const
Intersect the ray at distance less than distance.
Definition: Triangle.cpp:137
uint8 const P[]
Definition: AuthenticationPackets.cpp:225
const Point3 & vertex(int n) const
Definition: Triangle.h:70
Definition: Triangle.h:34
void init(const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
Definition: Triangle.cpp:25
Vector3::Axis primaryAxis() const
Definition: Triangle.h:87