#include <Polytope.h>
| Public Member Functions | |
| Polytope (const std::vector< Point< 2 > > &vertex_points) | |
| Constructor for a 2D polygon.  More... | |
| Polytope (const std::vector< Point< 3 > > &vertex_points, const std::vector< std::vector< int > > &face_vertices) | |
| Constructor for a 3D polyhedron.  More... | |
| ~Polytope ()=default | |
| const std::vector< Point< D > > & | points () const | 
| Points for all the vertices of the polytope.  More... | |
| const std::vector< int > & | face_vertices (int const face_id) const | 
| Indices of vertices of the polytope's face in counter-clockwise order (i.e. so that the normal to the face is pointing outside of the polytope)  More... | |
| std::vector< Point< D > > | face_points (int const face_id) const | 
| Coordinates of vertices of the polytope's face in counter-clockwise order (i.e. so that the normal to the face is pointing outside of the polytope)  More... | |
| const std::vector< std::vector< int > > & | face_vertices () const | 
| Indices of vertices for all the faces of the polytope.  More... | |
| Point< D > | vertex_point (int const vertex_id) const | 
| Coordinates of a polytope's vertex.  More... | |
| int | num_vertices () const | 
| Number of material poly's vertices.  More... | |
| int | num_faces () const | 
| Number of material poly's faces.  More... | |
| std::vector< double > | face_moments (int face_id) const | 
| Moments for a face of the polytope.  More... | |
| Vector< D > | face_normal (int face_id) const | 
| Effective normal to a face of the polytope.  More... | |
| std::vector< double > | moments () const | 
| Moments for the polytope.  More... | |
| template<> | |
| std::vector< double > | face_moments (int const face_id) const | 
| Moments for a face of the polygon.  More... | |
| template<> | |
| std::vector< double > | face_moments (int const face_id) const | 
| Moments for a face of the polyhedron. Non-triangular faces are assumed to be non-flat and are split into triangles using their geometric center.  More... | |
| template<> | |
| Vector< 2 > | face_normal (int face_id) const | 
| Normal to a face of the polygon.  More... | |
| template<> | |
| Vector< 3 > | face_normal (int face_id) const | 
| Effective normal to a face of the polyhedron. Non-triangular faces are assumed to be non-flat and effective normal is computed using face centroid for triangulation.  More... | |
| template<> | |
| std::vector< double > | moments () const | 
| Moments for the polygon.  More... | |
| template<> | |
| std::vector< double > | moments () const | 
| Moments for the polyhedron. Non-triangular faces are assumed to be non-flat and are split into triangles using their centroid.  More... | |
Constructor & Destructor Documentation
◆ Polytope() [1/2]
| 
 | inlineexplicit | 
Constructor for a 2D polygon.
- Parameters
- 
  vertex_points Vector of coordinates of the polygon's vertices listed counter-clockwise 
◆ Polytope() [2/2]
| 
 | inline | 
Constructor for a 3D polyhedron.
- Parameters
- 
  vertex_points Vector of coordinates of the polyhedron's vertices face_vertices Faces of the polyhedron, every face is given by IDs of its vertices in counter-clockwise order (i.e. so that the normal to the face is pointing outside of the polyhedron) 
◆ ~Polytope()
| 
 | default | 
Destructor
Member Function Documentation
◆ face_moments() [1/3]
| std::vector<double> Wonton::Polytope< D >::face_moments | ( | int | face_id | ) | const | 
Moments for a face of the polytope.
- Parameters
- 
  face_id ID of the face of the polytope 
- Returns
- Vector of moments; moments[0] is the size, moments[i+1]/moments[0] is i-th coordinate of the centroid
◆ face_moments() [2/3]
| 
 | inline | 
Moments for a face of the polygon.
- Parameters
- 
  face_id ID of the face of the polygon 
- Returns
- Vector of moments; moments[0] is the size, moments[i+1]/moments[0] is i-th coordinate of the centroid
◆ face_moments() [3/3]
| 
 | inline | 
Moments for a face of the polyhedron. Non-triangular faces are assumed to be non-flat and are split into triangles using their geometric center.
- Parameters
- 
  face_id ID of the face of the polyhedron 
- Returns
- Vector of moments; moments[0] is the size, moments[i+1]/moments[0] is i-th coordinate of the centroid
◆ face_normal() [1/3]
| Vector<D> Wonton::Polytope< D >::face_normal | ( | int | face_id | ) | const | 
Effective normal to a face of the polytope.
- Parameters
- 
  face_id ID of the face of the polytope 
- Returns
- Normal vector
◆ face_normal() [2/3]
| 
 | inline | 
Normal to a face of the polygon.
- Parameters
- 
  face_id ID of the face of the polygon 
- Returns
- Unit normal vector
◆ face_normal() [3/3]
| 
 | inline | 
Effective normal to a face of the polyhedron. Non-triangular faces are assumed to be non-flat and effective normal is computed using face centroid for triangulation.
- Parameters
- 
  face_id ID of the face of the polyhedron 
- Returns
- Normal vector, might be non-unitary
◆ face_points()
| 
 | inline | 
Coordinates of vertices of the polytope's face in counter-clockwise order (i.e. so that the normal to the face is pointing outside of the polytope)
- Parameters
- 
  face_id ID of the face of the polytope 
- Returns
- Vector of coordinates of face's vertices
◆ face_vertices() [1/2]
| 
 | inline | 
Indices of vertices of the polytope's face in counter-clockwise order (i.e. so that the normal to the face is pointing outside of the polytope)
- Parameters
- 
  face_id ID of the face of the polytope 
- Returns
- Vector of indices of the face's vertices
◆ face_vertices() [2/2]
| 
 | inline | 
Indices of vertices for all the faces of the polytope.
- Returns
- Vector of vectors of indices of faces' vertices
◆ moments() [1/3]
| std::vector<double> Wonton::Polytope< D >::moments | ( | ) | const | 
Moments for the polytope.
- Returns
- Vector of moments; moments[0] is the size, moments[i+1]/moments[0] is i-th coordinate of the centroid
◆ moments() [2/3]
| 
 | inline | 
Moments for the polygon.
- Parameters
- 
  moments Computed moments: moments[0] is area, moments[i+1]/moments[0] is i-th coordinate of the centroid, i=1,2 
◆ moments() [3/3]
| 
 | inline | 
Moments for the polyhedron. Non-triangular faces are assumed to be non-flat and are split into triangles using their centroid.
- Parameters
- 
  moments Computed moments, moments[0] is volume, moments[i+1]/moments[0] is i-th coordinate of the centroid, i=1,2,3 
◆ num_faces()
| 
 | inline | 
Number of material poly's faces.
- Returns
- Number of faces
◆ num_vertices()
| 
 | inline | 
Number of material poly's vertices.
- Returns
- Number of vertices
◆ points()
| 
 | inline | 
Points for all the vertices of the polytope.
- Returns
- Vector of vertex points
◆ vertex_point()
| 
 | inline | 
Coordinates of a polytope's vertex.
- Parameters
- 
  vertex_id ID of a vertex of the polytope 
- Returns
- Coordinates of that vertex
The documentation for this class was generated from the following file:
- /home/wonton/wonton/wonton/support/Polytope.h