NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
NEM::GEO::Face Struct Reference

Detailed Description

Definition at line 93 of file convexContainer.H.

Public Member Functions

NEM::MTH::Vector normal () const
 

Public Attributes

std::vector< NEM::MTH::Vectorv
 

Member Function Documentation

◆ normal()

NEM::MTH::Vector NEM::GEO::Face::normal ( ) const
inline

Definition at line 96 of file convexContainer.H.

References NEM::MTH::Vector::cross(), NEM::MTH::Vector::norm(), NEM::MTH::Vector::x, NEM::MTH::Vector::y, and NEM::MTH::Vector::z.

97  {
98  assert(v.size() > 2);
99  NEM::MTH::Vector dir1 = v[1] - v[0];
100  NEM::MTH::Vector dir2 = v[2] - v[0];
101  NEM::MTH::Vector n = dir1.cross(dir2);
102  double d = n.norm();
103  return NEM::MTH::Vector{n.x / d, n.y / d, n.z / d};
104  }
double norm() const
std::vector< NEM::MTH::Vector > v
Vector cross(Vector p) const

Member Data Documentation

◆ v

std::vector<NEM::MTH::Vector> NEM::GEO::Face::v

Definition at line 94 of file convexContainer.H.

Referenced by NEM::GEO::convexContainer::computeConvexHull().


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