A generic class serving a a shape container and providing a few useful methods to access the shape's underlying facets, vertices and edges Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen.
More...
#include <SBGATFilter.hpp>
|
| vtkTypeMacro (SBGATFilter, vtkPolyDataAlgorithm) |
|
void | PrintSelf (std::ostream &os, vtkIndent indent) override |
|
void | PrintHeader (std::ostream &os, vtkIndent indent) override |
|
void | PrintTrailer (std::ostream &os, vtkIndent indent) override |
|
void | SetScaleMeters () |
|
void | SetScaleKiloMeters () |
|
double | GetScaleFactor () const |
|
void | SetDensity (const double density) |
|
double | GetDensity () const |
|
void | GetVerticesInFacet (const int &f, double *r0, double *r1, double *r2) const |
|
arma::vec::fixed< 3 > | GetFacetCenter (const int &f) const |
|
void | GetVerticesOnEdge (const int &e, double *r0, double *r1) const |
|
void | GetFacetNormal (const int &f, double *n) const |
|
void | GetIndicesOfAdjacentFacets (const int &e, int &f0, int &f1) const |
|
void | GetIndicesVerticesOnEdge (const int &e, int &v0, int &v1) const |
|
void | GetIndicesVerticesInFacet (const int &f, int &v0, int &v1, int &v2) const |
|
arma::vec::fixed< 3 > | GetNonNormalizedFacetNormal (const int &f) const |
|
arma::vec::fixed< 3 > | GetRe (const arma::vec::fixed< 3 > &pos, const int &e) const |
|
arma::vec::fixed< 3 > | GetRe (const double *pos, const int &e) const |
|
arma::vec::fixed< 3 > | GetRf (const arma::vec::fixed< 3 > &pos, const int &f) const |
|
arma::vec::fixed< 3 > | GetRf (const double *pos, const int &f) const |
|
void | GetBoundingBox (double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) const |
|
double | GetEdgeLength (const int &e) const |
|
int | GetN_facets () const |
|
int | GetN_edges () const |
|
int | GetN_vertices () const |
|
bool | GetIsInMeters () const |
|
bool | GetIsInKiloMeters () const |
|
A generic class serving a a shape container and providing a few useful methods to access the shape's underlying facets, vertices and edges Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen.
- Author
- Benjamin Bercovici
- Date
- February 2019
- Copyright
- MIT License, Benjamin Bercovici and Jay McMahon, (c) Ken Martin, Will Schroeder, Bill Lorensen
Definition at line 38 of file SBGATFilter.hpp.
◆ SBGATFilter() [1/2]
SBGATFilter::SBGATFilter |
( |
| ) |
|
|
protected |
◆ ~SBGATFilter()
SBGATFilter::~SBGATFilter |
( |
| ) |
|
|
overrideprotected |
◆ SBGATFilter() [2/2]
◆ Clear()
void SBGATFilter::Clear |
( |
| ) |
|
|
protected |
◆ GetBoundingBox()
void SBGATFilter::GetBoundingBox |
( |
double & |
xmin, |
|
|
double & |
xmax, |
|
|
double & |
ymin, |
|
|
double & |
ymax, |
|
|
double & |
zmin, |
|
|
double & |
zmax |
|
) |
| const |
|
inline |
Return the bounding box (xmin,xmax,ymin,ymax,zmin,zmax) (m)
- Parameters
-
[in] | xmin | minimum x-bound of the shape (m) |
[in] | xmax | maximum x-bound of the shape (m) |
[in] | ymin | minimum y-bound of the shape (m) |
[in] | ymax | maximum y-bound of the shape (m) |
[in] | zmin | minimum z-bound of the shape (m) |
[in] | zmax | maximum z-bound of the shape (m) |
Definition at line 202 of file SBGATFilter.hpp.
◆ GetDensity()
double SBGATFilter::GetDensity |
( |
| ) |
const |
|
inline |
Get polyhedron density
- Returns
- density bulk density of polyhedron (kg/m^3)
Definition at line 81 of file SBGATFilter.hpp.
◆ GetEdgeLength()
double SBGATFilter::GetEdgeLength |
( |
const int & |
e | ) |
const |
Return length of considered edge in meters
- Parameters
-
- Returns
- edge length(m )
Definition at line 386 of file SBGATFilter.cpp.
◆ GetFacetCenter()
arma::vec::fixed< 3 > SBGATFilter::GetFacetCenter |
( |
const int & |
f | ) |
const |
Return coordinates of point at center of facet
- Parameters
-
- Returns
- coordinates of f-th facet center
Definition at line 404 of file SBGATFilter.cpp.
◆ GetFacetNormal()
void SBGATFilter::GetFacetNormal |
( |
const int & |
f, |
|
|
double * |
n |
|
) |
| const |
|
inline |
Return normal of facet f
- Parameters
-
[in] | f | facet index |
[out] | n | normal at facet |
Definition at line 117 of file SBGATFilter.hpp.
◆ GetIndicesOfAdjacentFacets()
void SBGATFilter::GetIndicesOfAdjacentFacets |
( |
const int & |
e, |
|
|
int & |
f0, |
|
|
int & |
f1 |
|
) |
| const |
Return the indices of the two facets adjacent to the specified edge
- Parameters
-
[in] | e | edge index |
[out] | f0 | index of first facet |
[out] | f1 | index of second facet |
Definition at line 397 of file SBGATFilter.cpp.
◆ GetIndicesVerticesInFacet()
void SBGATFilter::GetIndicesVerticesInFacet |
( |
const int & |
f, |
|
|
int & |
v0, |
|
|
int & |
v1, |
|
|
int & |
v2 |
|
) |
| const |
|
inline |
Return the indices of the vertices forming the prescribed facet
- Parameters
-
[in] | f | facet index |
[out] | v0 | first vertex index |
[out] | v1 | second vertex index |
[out] | v2 | third vertex index |
Definition at line 144 of file SBGATFilter.hpp.
◆ GetIndicesVerticesOnEdge()
void SBGATFilter::GetIndicesVerticesOnEdge |
( |
const int & |
e, |
|
|
int & |
v0, |
|
|
int & |
v1 |
|
) |
| const |
|
inline |
Return the indices of the vertices forming the prescribed edge
- Parameters
-
[in] | e | edge index |
[out] | v0 | first vertex index |
[out] | v1 | second vertex index |
Definition at line 135 of file SBGATFilter.hpp.
◆ GetIsInKiloMeters()
bool SBGATFilter::GetIsInKiloMeters |
( |
| ) |
const |
|
inline |
Return true if the input shape has its coordinates expressed in kilometers, false otherwise
Definition at line 247 of file SBGATFilter.hpp.
◆ GetIsInMeters()
bool SBGATFilter::GetIsInMeters |
( |
| ) |
const |
|
inline |
Return true if the input shape has its coordinates expressed in meters, false otherwise
Definition at line 241 of file SBGATFilter.hpp.
◆ GetN_edges()
int SBGATFilter::GetN_edges |
( |
| ) |
const |
|
inline |
Return number of edges in shape
- Returns
- number of edges
Definition at line 229 of file SBGATFilter.hpp.
◆ GetN_facets()
int SBGATFilter::GetN_facets |
( |
| ) |
const |
|
inline |
Return number of facets in shape
- Returns
- number of facets
Definition at line 224 of file SBGATFilter.hpp.
◆ GetN_vertices()
int SBGATFilter::GetN_vertices |
( |
| ) |
const |
|
inline |
Return number of vertices in shape
- Returns
- number of vertices
Definition at line 235 of file SBGATFilter.hpp.
◆ GetNonNormalizedFacetNormal()
arma::vec::fixed< 3 > SBGATFilter::GetNonNormalizedFacetNormal |
( |
const int & |
f | ) |
const |
Return the non-normalized facet normal at this facet
- Parameters
-
- Returns
- non-normalized facet normal
Definition at line 333 of file SBGATFilter.cpp.
◆ GetRe() [1/2]
arma::vec::fixed< 3 > SBGATFilter::GetRe |
( |
const arma::vec::fixed< 3 > & |
pos, |
|
|
const int & |
e |
|
) |
| const |
Return the vector from the field point to the first vertex on the designated edge
- Parameters
-
pos | field point |
e | edge index |
- Returns
- the vector from the field point to the first vertex on the designated edge
Definition at line 417 of file SBGATFilter.cpp.
◆ GetRe() [2/2]
arma::vec::fixed< 3 > SBGATFilter::GetRe |
( |
const double * |
pos, |
|
|
const int & |
e |
|
) |
| const |
Return the vector from the field point to the first vertex on the designated edge
- Parameters
-
pos | field point |
e | edge index |
- Returns
- the vector from the field point to the first vertex on the designated edge
Definition at line 422 of file SBGATFilter.cpp.
◆ GetRf() [1/2]
arma::vec::fixed< 3 > SBGATFilter::GetRf |
( |
const arma::vec::fixed< 3 > & |
pos, |
|
|
const int & |
f |
|
) |
| const |
Return the vector from the field point to the first vertex on the designated facet
- Parameters
-
pos | field point |
f | facet index |
- Returns
- the vector from the field point to the first vertex on the designated facet
Definition at line 435 of file SBGATFilter.cpp.
◆ GetRf() [2/2]
arma::vec::fixed< 3 > SBGATFilter::GetRf |
( |
const double * |
pos, |
|
|
const int & |
f |
|
) |
| const |
Return the vector from the field point to the first vertex on the designated facet
- Parameters
-
pos | field point |
f | facet index |
- Returns
- the vector from the field point to the first vertex on the designated facet
Definition at line 440 of file SBGATFilter.cpp.
◆ GetScaleFactor()
double SBGATFilter::GetScaleFactor |
( |
| ) |
const |
|
inline |
Return the shape's scale factor
- Returns
- scale factor
Definition at line 66 of file SBGATFilter.hpp.
◆ GetVerticesInFacet()
void SBGATFilter::GetVerticesInFacet |
( |
const int & |
f, |
|
|
double * |
r0, |
|
|
double * |
r1, |
|
|
double * |
r2 |
|
) |
| const |
Return coordinates of the three vertices forming a facet
- Parameters
-
[in] | f | facet index |
[out] | r0 | first vertex coordinates |
[out] | r1 | first vertex coordinates |
[out] | r2 | first vertex coordinates |
Definition at line 347 of file SBGATFilter.cpp.
◆ GetVerticesOnEdge()
void SBGATFilter::GetVerticesOnEdge |
( |
const int & |
e, |
|
|
double * |
r0, |
|
|
double * |
r1 |
|
) |
| const |
Return coordinates of the two vertices forming an edge
- Parameters
-
[in] | e | edge index |
[out] | r0 | first vertex coordinates |
[out] | r1 | first vertex coordinates |
Definition at line 370 of file SBGATFilter.cpp.
◆ New()
Constructs with initial values of zero.
◆ operator=()
◆ PrintHeader()
void SBGATFilter::PrintHeader |
( |
std::ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
override |
◆ PrintSelf()
void SBGATFilter::PrintSelf |
( |
std::ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
override |
◆ PrintTrailer()
void SBGATFilter::PrintTrailer |
( |
std::ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
override |
◆ RequestData()
int SBGATFilter::RequestData |
( |
vtkInformation * |
request, |
|
|
vtkInformationVector ** |
inputVector, |
|
|
vtkInformationVector * |
outputVector |
|
) |
| |
|
overrideprotected |
◆ SetDensity()
void SBGATFilter::SetDensity |
( |
const double |
density | ) |
|
|
inline |
Sets polyhedron density
- Parameters
-
density | bulk density of polyhedron (kg/m^3) |
Definition at line 72 of file SBGATFilter.hpp.
◆ SetScaleKiloMeters()
void SBGATFilter::SetScaleKiloMeters |
( |
| ) |
|
|
inline |
Sets the scale factor to 1000, indicative that the polydata has its coordinates expressed in kilometers
Definition at line 60 of file SBGATFilter.hpp.
◆ SetScaleMeters()
void SBGATFilter::SetScaleMeters |
( |
| ) |
|
|
inline |
Sets the scale factor to 1, indicative that the polydata has its coordinates expressed in meters
Definition at line 55 of file SBGATFilter.hpp.
◆ vtkTypeMacro()
SBGATFilter::vtkTypeMacro |
( |
SBGATFilter |
, |
|
|
vtkPolyDataAlgorithm |
|
|
) |
| |
◆ bounds
double SBGATFilter::bounds[6] |
|
protected |
◆ density
double SBGATFilter::density |
|
protected |
◆ edge_facets_ids
int** SBGATFilter::edge_facets_ids |
|
protected |
◆ edges
◆ facet_normals
double** SBGATFilter::facet_normals |
|
protected |
◆ facets
int** SBGATFilter::facets |
|
protected |
◆ is_in_meters
bool SBGATFilter::is_in_meters = true |
|
protected |
◆ N_edges
◆ N_facets
int SBGATFilter::N_facets |
|
protected |
◆ N_vertices
int SBGATFilter::N_vertices |
|
protected |
◆ scaleFactor
double SBGATFilter::scaleFactor = 1 |
|
protected |
◆ vertices
double** SBGATFilter::vertices |
|
protected |
The documentation for this class was generated from the following files:
- /Users/bbercovici/GDrive/CUBoulder/Research/code/SBGAT/SbgatCore/include/SbgatCore/SBGATFilter.hpp
- /Users/bbercovici/GDrive/CUBoulder/Research/code/SBGAT/SbgatCore/source/SBGATFilter.cpp