Small Body Geophysical Analysis Tool (SBGAT)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SBGATFilter Class Reference

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>

Inheritance diagram for SBGATFilter:
Inheritance graph
[legend]
Collaboration diagram for SBGATFilter:
Collaboration graph
[legend]

Public Member Functions

 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
 

Static Public Member Functions

static SBGATFilterNew ()
 

Protected Member Functions

 SBGATFilter ()
 
 ~SBGATFilter () override
 
void Clear ()
 
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 

Protected Attributes

double ** facet_normals
 
double ** vertices
 
double scaleFactor = 1
 
double density
 
int ** edges
 
int ** facets
 
int ** edge_facets_ids
 
bool is_in_meters = true
 
int N_facets
 
int N_edges
 
int N_vertices
 
double bounds [6]
 

Private Member Functions

 SBGATFilter (const SBGATFilter &)=delete
 
void operator= (const SBGATFilter &)=delete
 

Detailed Description

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

Definition at line 38 of file SBGATFilter.hpp.

Constructor & Destructor Documentation

◆ SBGATFilter() [1/2]

SBGATFilter::SBGATFilter ( )
protected

Definition at line 60 of file SBGATFilter.cpp.

◆ ~SBGATFilter()

SBGATFilter::~SBGATFilter ( )
overrideprotected

Definition at line 72 of file SBGATFilter.cpp.

◆ SBGATFilter() [2/2]

SBGATFilter::SBGATFilter ( const SBGATFilter )
privatedelete

Member Function Documentation

◆ Clear()

void SBGATFilter::Clear ( )
protected

Definition at line 287 of file SBGATFilter.cpp.

◆ 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]xminminimum x-bound of the shape (m)
[in]xmaxmaximum x-bound of the shape (m)
[in]yminminimum y-bound of the shape (m)
[in]ymaxmaximum y-bound of the shape (m)
[in]zminminimum z-bound of the shape (m)
[in]zmaxmaximum 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
eedge index
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
ffacet index
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]ffacet index
[out]nnormal 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]eedge index
[out]f0index of first facet
[out]f1index 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]ffacet index
[out]v0first vertex index
[out]v1second vertex index
[out]v2third 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]eedge index
[out]v0first vertex index
[out]v1second 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
ffacet index
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
posfield point
eedge 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
posfield point
eedge 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
posfield point
ffacet 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
posfield point
ffacet 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]ffacet index
[out]r0first vertex coordinates
[out]r1first vertex coordinates
[out]r2first 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]eedge index
[out]r0first vertex coordinates
[out]r1first vertex coordinates

Definition at line 370 of file SBGATFilter.cpp.

◆ New()

static SBGATFilter* SBGATFilter::New ( )
static

Constructs with initial values of zero.

◆ operator=()

void SBGATFilter::operator= ( const SBGATFilter )
privatedelete

◆ PrintHeader()

void SBGATFilter::PrintHeader ( std::ostream &  os,
vtkIndent  indent 
)
override

Definition at line 268 of file SBGATFilter.cpp.

◆ PrintSelf()

void SBGATFilter::PrintSelf ( std::ostream &  os,
vtkIndent  indent 
)
override

Definition at line 277 of file SBGATFilter.cpp.

◆ PrintTrailer()

void SBGATFilter::PrintTrailer ( std::ostream &  os,
vtkIndent  indent 
)
override

Definition at line 271 of file SBGATFilter.cpp.

◆ RequestData()

int SBGATFilter::RequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
overrideprotected

Definition at line 83 of file SBGATFilter.cpp.

◆ SetDensity()

void SBGATFilter::SetDensity ( const double  density)
inline

Sets polyhedron density

Parameters
densitybulk 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   
)

Member Data Documentation

◆ bounds

double SBGATFilter::bounds[6]
protected

Definition at line 278 of file SBGATFilter.hpp.

◆ density

double SBGATFilter::density
protected

Definition at line 265 of file SBGATFilter.hpp.

◆ edge_facets_ids

int** SBGATFilter::edge_facets_ids
protected

Definition at line 269 of file SBGATFilter.hpp.

◆ edges

int** SBGATFilter::edges
protected

Definition at line 267 of file SBGATFilter.hpp.

◆ facet_normals

double** SBGATFilter::facet_normals
protected

Definition at line 261 of file SBGATFilter.hpp.

◆ facets

int** SBGATFilter::facets
protected

Definition at line 268 of file SBGATFilter.hpp.

◆ is_in_meters

bool SBGATFilter::is_in_meters = true
protected

Definition at line 272 of file SBGATFilter.hpp.

◆ N_edges

int SBGATFilter::N_edges
protected

Definition at line 275 of file SBGATFilter.hpp.

◆ N_facets

int SBGATFilter::N_facets
protected

Definition at line 274 of file SBGATFilter.hpp.

◆ N_vertices

int SBGATFilter::N_vertices
protected

Definition at line 276 of file SBGATFilter.hpp.

◆ scaleFactor

double SBGATFilter::scaleFactor = 1
protected

Definition at line 264 of file SBGATFilter.hpp.

◆ vertices

double** SBGATFilter::vertices
protected

Definition at line 262 of file SBGATFilter.hpp.


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