Kaim::Triangle3i Class Reference

Kaim::Triangle3i Class Reference

#include <triangle3i.h>

Class Description

This class represents a triangle in three-dimensional space, whose dimensions are stored using integer values.

This class is used primarily during NavData generation.

Public Member Functions

void Set (const Vec3i &_a, const Vec3i &_b, const Vec3i &_c)
 
Vec3ioperator[] (KyInt32 i)
 
const Vec3ioperator[] (KyInt32 i) const
 
KyUInt32 IsInside2d (const Vec2i &M) const
 
bool IsInside2d_NoFlat (const Vec2i &M) const
 
bool IsStrictlyInside2d (const Vec2i &M) const
 

Public Data Members

Vec3i A
 
Vec3i B
 
Vec3i C
 

Member Function Documentation

KyUInt32 Kaim::Triangle3i::IsInside2d ( const Vec2i M) const
inline

Returns true if the (X,Y) coordinates of the specified point lie inside the (X,Y) extents of the triangle, or exactly on one edge of the triangle.

bool Kaim::Triangle3i::IsInside2d_NoFlat ( const Vec2i M) const
inline

Returns true if the (X,Y) coordinates of the specified point lie inside the (X,Y) extents of the triangle, or exactly on one edge of the triangle.

This method assumes that the plane of the triangle is not horizontal.

bool Kaim::Triangle3i::IsStrictlyInside2d ( const Vec2i M) const
inline

Returns true if the (X,Y) coordinates of the specified point lie strictly inside the (X,Y) extents of the triangle.

Vec3i& Kaim::Triangle3i::operator[] ( KyInt32  i)
inline

Retrieves the coordinates of the specified corner of the triangle. Use only [0], [1], or [2].

const Vec3i& Kaim::Triangle3i::operator[] ( KyInt32  i) const
inline

Retrieves the coordinates of the specified corner of the triangle. Use only [0], [1], or [2].

void Kaim::Triangle3i::Set ( const Vec3i _a,
const Vec3i _b,
const Vec3i _c 
)
inline

Sets the coordinates of the three points that make up the triangle.

Parameters
_aThe coordinates of the first corner of the triangle.
_bThe coordinates of the second corner of the triangle.
_cThe coordinates of the third corner of the triangle.

Member Data Documentation

Vec3i Kaim::Triangle3i::A

The position of the first corner of the triangle.

Vec3i Kaim::Triangle3i::B

The position of the second corner of the triangle.

Vec3i Kaim::Triangle3i::C

The position of the third corner of the triangle.


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