Public Member Functions | Public Attributes
IceMaths::IndexedTriangle Class Reference

#include <OPC_IceHook.h>

List of all members.

Public Member Functions

float Angle (const IndexedTriangle &tri, const Point *verts) const
float Area (const Point *verts) const
bool BackfaceCulling (const Point *verts, const Point &source) const
void Center (const Point *verts, Point &center) const
void CenteredNormal (const Point *verts, Point &normal) const
float Compacity (const Point *verts) const
CubeIndex ComputeCubeIndex (const Point *verts) const
float ComputeOcclusionPotential (const Point *verts, const Point &view) const
void ComputePoint (const Point *verts, float u, float v, Point &pt, udword *nearvtx=null) const
void DenormalizedNormal (const Point *verts, Point &normal) const
bool Equal (const IndexedTriangle &tri) const
ubyte FindEdge (udword vref0, udword vref1) const
void Flip ()
void GetVRefs (ubyte edgenb, udword &vref0, udword &vref1, udword &vref2) const
bool HasVertex (udword ref) const
bool HasVertex (udword ref, udword *index) const
inline_ IndexedTriangle ()
 Constructor.
inline_ IndexedTriangle (udword r0, udword r1, udword r2)
 Constructor.
inline_ IndexedTriangle (const IndexedTriangle &triangle)
 Copy constructor.
bool IsDegenerate () const
bool IsVisible (const Point *verts, const Point &source) const
float MaxEdgeLength (const Point *verts) const
float MinEdgeLength (const Point *verts) const
void Normal (const Point *verts, Point &normal) const
udword OppositeVertex (udword vref0, udword vref1) const
inline_ udword OppositeVertex (ubyte edgenb) const
float Perimeter (const Point *verts) const
inline_ Plane PlaneEquation (const Point *verts) const
void RandomPoint (const Point *verts, Point &random) const
bool ReplaceVertex (udword oldref, udword newref)
inline_ ~IndexedTriangle ()
 Destructor.

Public Attributes

udword mVRef [3]
 Vertex-references.

Detailed Description

Definition at line 24 of file OPC_IceHook.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 28 of file OPC_IceHook.h.

Constructor.

Definition at line 30 of file OPC_IceHook.h.

Copy constructor.

Definition at line 32 of file OPC_IceHook.h.

Destructor.

Definition at line 39 of file OPC_IceHook.h.


Member Function Documentation

float IndexedTriangle::Angle ( const IndexedTriangle tri,
const Point verts 
) const

Computes the angle between two triangles.

Parameters:
tri[in] the other triangle
verts[in] the list of indexed vertices
Returns:
the angle in radians

Definition at line 516 of file IceIndexedTriangle.cpp.

float IndexedTriangle::Area ( const Point verts) const

Computes the triangle area.

Parameters:
verts[in] the list of indexed vertices
Returns:
the area

Definition at line 44 of file IceIndexedTriangle.cpp.

bool IndexedTriangle::BackfaceCulling ( const Point verts,
const Point source 
) const

Computes backface culling.

Parameters:
verts[in] the list of indexed vertices
source[in] source point (in local space) from which culling must be computed
Returns:
true if the triangle is visible from the source point

Definition at line 217 of file IceIndexedTriangle.cpp.

void IndexedTriangle::Center ( const Point verts,
Point center 
) const

Computes the triangle center.

Parameters:
verts[in] the list of indexed vertices
center[out] the computed center

Definition at line 127 of file IceIndexedTriangle.cpp.

void IndexedTriangle::CenteredNormal ( const Point verts,
Point normal 
) const

Computes the centered normal

Parameters:
verts[in] the list of indexed vertices
normal[out] the computed centered normal

Definition at line 144 of file IceIndexedTriangle.cpp.

float IndexedTriangle::Compacity ( const Point verts) const

Computes the triangle compacity.

Parameters:
verts[in] the list of indexed vertices
Returns:
the compacity

Definition at line 78 of file IceIndexedTriangle.cpp.

float IndexedTriangle::ComputeOcclusionPotential ( const Point verts,
const Point view 
) const

Computes the occlusion potential of the triangle.

Parameters:
verts[in] the list of indexed vertices
source[in] source point (in local space) from which occlusion potential must be computed
Returns:
the occlusion potential

Definition at line 249 of file IceIndexedTriangle.cpp.

void IndexedTriangle::ComputePoint ( const Point verts,
float  u,
float  v,
Point pt,
udword nearvtx = null 
) const

Computes a point on the triangle according to the stabbing information.

Parameters:
verts[in] the list of indexed vertices
u,v[in] point's barycentric coordinates
pt[out] point on triangle
nearvtx[out] index of nearest vertex

Definition at line 450 of file IceIndexedTriangle.cpp.

void IndexedTriangle::DenormalizedNormal ( const Point verts,
Point normal 
) const

Computes the triangle denormalized normal.

Parameters:
verts[in] the list of indexed vertices
normal[out] the computed normal

Definition at line 110 of file IceIndexedTriangle.cpp.

Checks a triangle is the same as another one.

Parameters:
tri[in] the other triangle
Returns:
true if same triangle

Definition at line 542 of file IceIndexedTriangle.cpp.

ubyte IndexedTriangle::FindEdge ( udword  vref0,
udword  vref1 
) const

Finds an edge in a tri, given two vertex references.

Parameters:
vref0[in] the edge's first vertex reference
vref1[in] the edge's second vertex reference
Returns:
the edge number between 0 and 2, or 0xff if input refs are wrong.

Definition at line 334 of file IceIndexedTriangle.cpp.

Flips the winding order.

Definition at line 32 of file IceIndexedTriangle.cpp.

void IndexedTriangle::GetVRefs ( ubyte  edgenb,
udword vref0,
udword vref1,
udword vref2 
) const

Gets the three sorted vertex references according to an edge number. edgenb = 0 => edge 0-1, returns references 0, 1, 2 edgenb = 1 => edge 0-2, returns references 0, 2, 1 edgenb = 2 => edge 1-2, returns references 1, 2, 0

Parameters:
edgenb[in] the edge number, 0, 1 or 2
vref0[out] the returned first vertex reference
vref1[out] the returned second vertex reference
vref2[out] the returned third vertex reference

Definition at line 377 of file IceIndexedTriangle.cpp.

bool IndexedTriangle::HasVertex ( udword  ref) const

Checks whether the input vertex reference belongs to the triangle or not.

Parameters:
ref[in] the vertex reference to look for
Returns:
true if the triangle contains the vertex reference

Definition at line 302 of file IceIndexedTriangle.cpp.

bool IndexedTriangle::HasVertex ( udword  ref,
udword index 
) const

Checks whether the input vertex reference belongs to the triangle or not.

Parameters:
ref[in] the vertex reference to look for
index[out] the corresponding index in the triangle
Returns:
true if the triangle contains the vertex reference

Definition at line 318 of file IceIndexedTriangle.cpp.

Checks whether the triangle is degenerate or not. A degenerate triangle has two common vertex references. This is a zero-area triangle.

Returns:
true if the triangle is degenerate

Definition at line 287 of file IceIndexedTriangle.cpp.

bool IndexedTriangle::IsVisible ( const Point verts,
const Point source 
) const

Computes backface culling.

Parameters:
verts[in] the list of indexed vertices
source[in] source point (in local space) from which culling must be computed
Returns:
true if the triangle is visible from the source point

Definition at line 189 of file IceIndexedTriangle.cpp.

float IndexedTriangle::MaxEdgeLength ( const Point verts) const

Computes the triangle's largest edge length.

Parameters:
verts[in] the list of indexed vertices
Returns:
the largest edge length

Definition at line 427 of file IceIndexedTriangle.cpp.

float IndexedTriangle::MinEdgeLength ( const Point verts) const

Computes the triangle's smallest edge length.

Parameters:
verts[in] the list of indexed vertices
Returns:
the smallest edge length

Definition at line 406 of file IceIndexedTriangle.cpp.

void IndexedTriangle::Normal ( const Point verts,
Point normal 
) const

Computes the triangle normal.

Parameters:
verts[in] the list of indexed vertices
normal[out] the computed normal

Definition at line 93 of file IceIndexedTriangle.cpp.

udword IndexedTriangle::OppositeVertex ( udword  vref0,
udword  vref1 
) const

Gets the last reference given the first two.

Parameters:
vref0[in] the first vertex reference
vref1[in] the second vertex reference
Returns:
the last reference, or INVALID_ID if input refs are wrong.

Definition at line 353 of file IceIndexedTriangle.cpp.

Definition at line 62 of file OPC_IceHook.h.

float IndexedTriangle::Perimeter ( const Point verts) const

Computes the triangle perimeter.

Parameters:
verts[in] the list of indexed vertices
Returns:
the perimeter

Definition at line 60 of file IceIndexedTriangle.cpp.

Definition at line 68 of file OPC_IceHook.h.

void IndexedTriangle::RandomPoint ( const Point verts,
Point random 
) const

Computes a random point within the triangle.

Parameters:
verts[in] the list of indexed vertices
normal[out] the computed centered normal

Definition at line 162 of file IceIndexedTriangle.cpp.

bool IndexedTriangle::ReplaceVertex ( udword  oldref,
udword  newref 
)

Replaces a vertex reference with another one.

Parameters:
oldref[in] the vertex reference to replace
newref[in] the new vertex reference
Returns:
true if success, else false if the input vertex reference doesn't belong to the triangle

Definition at line 273 of file IceIndexedTriangle.cpp.


Member Data Documentation

Vertex-references.

Definition at line 41 of file OPC_IceHook.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:44:02