All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
hpp::affordance::Triangle Struct Reference

Helper class to save triangle information. More...

#include <hpp/affordance/affordance-extraction.hh>

Collaboration diagram for hpp::affordance::Triangle:
[legend]

Public Member Functions

 Triangle ()
 
 Triangle (const TrianglePoints &inPoints)
 Constructor that takes in a TrianglePoints object. More...
 
void TriangleArea (TrianglePoints &tri)
 Computes the area of a triangle. More...
 
void TriangleNormal (TrianglePoints &tri)
 Computes the normal vector of a triangle based on the global position of its vertices. More...
 

Public Attributes

TrianglePoints points
 The global position of a triangles vertices. More...
 
double area
 The area of a triangle. More...
 
fcl::Vec3f normal
 The normal vector of a triangle. More...
 

Detailed Description

Helper class to save triangle information.

Constructor & Destructor Documentation

hpp::affordance::Triangle::Triangle ( )
inline
hpp::affordance::Triangle::Triangle ( const TrianglePoints inPoints)
inline

Constructor that takes in a TrianglePoints object.

References points, TriangleArea(), and TriangleNormal().

Member Function Documentation

void hpp::affordance::Triangle::TriangleArea ( TrianglePoints tri)
inline

Computes the area of a triangle.

Parameters
triThe global position of a triangles vertices

References area, hpp::affordance::TrianglePoints::p1, hpp::affordance::TrianglePoints::p2, and hpp::affordance::TrianglePoints::p3.

Referenced by Triangle().

void hpp::affordance::Triangle::TriangleNormal ( TrianglePoints tri)
inline

Computes the normal vector of a triangle based on the global position of its vertices.

The normal is subject to convention!

Parameters
triThe global position of a triangles vertices

References normal, hpp::affordance::TrianglePoints::p1, hpp::affordance::TrianglePoints::p2, and hpp::affordance::TrianglePoints::p3.

Referenced by Triangle().

Member Data Documentation

double hpp::affordance::Triangle::area

The area of a triangle.

Referenced by TriangleArea().

fcl::Vec3f hpp::affordance::Triangle::normal

The normal vector of a triangle.

Referenced by TriangleNormal().

TrianglePoints hpp::affordance::Triangle::points

The global position of a triangles vertices.

Referenced by Triangle().