![]() |
GranOO
3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
|
#include <Polyhedron.hpp>
Public Member Functions | |
Polyhedron () | |
Polyhedron (std::string fileName, const Geom::Frame &frame) | |
Polyhedron (const Polyhedron &polyhedron, const Geom::Frame &frame) | |
Polyhedron (const Geom::Frame &frame) | |
Polyhedron (const Polyhedron &s) | |
virtual | ~Polyhedron () |
void | read_xml_element (const TiXmlElement *element) |
virtual std::ostream & | write_ascii (std::ostream &out) const |
virtual std::istream & | read_ascii (std::istream &in) |
virtual void | to_vtk (vtkUnstructuredGrid *data) |
std::string | info () const |
void | to_vtk (const unsigned int shift, unsigned int *conn, unsigned int *cell_type, double *point) const |
unsigned int | vtk_conn_number () const |
void | make_equal_to (const Polyhedron &) |
void | update_bounding_box () |
void | update_bounding_sphere () |
double | get_greatest_dimension () const |
AABB | aabb () const |
void | set_input_file (std::stringstream &stringStream, bool update=true, bool translate_to_centroid=true) |
void | set_input_file (const std::string &offFile, bool update=true, bool translate_to_centroid=true) |
void | set_output_file (const std::string &offFile) |
void | set_input_offset_file (const std::string &offFile) |
double | get_volume () const |
void | compute_inertia_tensor (double density, Geom::Tensor &) const |
Geom::Point | farthest_point_along (const Geom::Vector &) const |
bool | basefacet_from_normal (const Geom::Vector &normal, unsigned int &basefacetIndex) const |
Geom::Point | basefacet_center (const unsigned int basefacetIndex) const |
double | area_of_facet_crossed_by_vector (const Geom::Point &, const Geom::Vector &, unsigned int &, Geom::Vector &) const |
Geom::Point | initial_centroid () const |
PolyhedronCore & | get_polyhedron_core () |
const PolyhedronCore & | get_polyhedron_core () const |
const std::map< std::string, std::vector< int > > & | get_facet_map () const |
void | draw_gl () const |
void | draw_gl_edge () const |
void | scale (double ratio) |
unsigned int | get_number_of_vertex () const |
unsigned int | get_number_of_facet () const |
Interference | locate (const Geom::Point &) const |
Interference | locate (const Geom::Point &, double radius) const |
bool | overlap (const Sphere &, double margin, std::vector< std::string > &facet) const |
double | compute_distance (const Geom::Point &) |
bool | collide_inside (const Geom::Point &p1, double radius, Collision::Data &info) const |
bool | collide_outside (const Geom::Point &p1, double radius, Collision::Data &info) const |
std::ostream & | to_povray (std::ostream &out, const Core::Color &) const |
![]() | |
Volume (const Geom::Frame &frame) | |
virtual | ~Volume () |
bool | is_surface () const |
bool | is_volume () const |
const Box & | get_bounding_box () const |
const Sphere & | get_bounding_sphere () const |
Box & | get_bounding_box () |
Sphere & | get_bounding_sphere () |
void | update_bounding_shape () |
bool | is_bounding_shape () const |
template<Interference T> | |
bool | overlap (const Sphere &, Geom::Vector &normal, double &penetration) const |
Interference | locate (const Sphere &) const |
bool | collide_inside (const Geom::Point &, Collision::Data &) const |
bool | collide_outside (const Geom::Point &, Collision::Data &) const |
virtual bool | collide (const Volume &, Collision::Data &) const =0 |
virtual bool | collide (const Sphere &, Collision::Data &) const =0 |
virtual bool | collide (const Box &, Collision::Data &) const =0 |
virtual bool | collide (const Cylinder &, Collision::Data &) const =0 |
virtual bool | collide (const Cone &, Collision::Data &) const =0 |
virtual bool | collide (const ConeTruncated &, Collision::Data &) const =0 |
virtual bool | collide (const Polyhedron &, Collision::Data &) const =0 |
const std::set< std::string > & | get_face_ID () const |
template<> | |
bool | overlap (const Sphere &s, Geom::Vector &normal, double &penetration) const |
template<> | |
bool | overlap (const Sphere &s, Geom::Vector &normal, double &penetration) const |
template<> | |
bool | overlap (const Sphere &s, Geom::Vector &normal, double &penetration) const |
![]() | |
Base (const Geom::Frame &frame) | |
virtual | ~Base () |
void | unscale (double) |
virtual void | add_glob (const std::string &)=0 |
const Geom::Frame & | local_frame () const |
const Geom::Point & | get_center () const |
const Geom::Quaternion & | get_quaternion () const |
const Geom::Vector & | get_position () const |
void | translate (Geom::Vector &) |
void | rotate (const Geom::Vector &axis, const double angleRadian) |
Static Public Member Functions | |
static std::string | class_ID () |
static std::string | desc () |
![]() | |
static std::string | class_ID () |
![]() | |
static Base & | glob (const std::string &id) |
static const Geom::Frame & | frame_buffer () |
static std::string | class_ID () |
static Base * | new_object (const TiXmlElement *el) |
![]() | |
static Base * | build () |
static bool | record (const std::string &id, std::string file_name="", std::string desc="") |
![]() | |
static void | record (std::function< BaseClass *()>, const std::string &, const std::string file="", const std::string desc="") |
static BaseClass * | new_object (const std::string &) |
static std::vector< std::string > | get_ID () |
static std::map< const std::string, std::function< BaseClass *()> > & | get_map () |
Private Member Functions | |
Polyhedron & | operator= (const Polyhedron &) |
template<class Archive > | |
void | save (Archive &ar, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &ar, const unsigned int version) |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Private Attributes | |
PolyhedronCore | _polyhedron_core |
std::map< std::string, std::vector< int > > | _map_facet |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
template<typename T , typename ... Args> | |
void | set_face_ID (const T &, Args... args) |
template<typename T > | |
void | set_face_ID (const T &) |
void | copy_face_ID (const std::set< std::string > &) |
void | add_face_ID (const std::string &) |
![]() | |
ObjectFactoryInterface () | |
virtual | ~ObjectFactoryInterface () |
![]() | |
ObjectFactory () | |
virtual | ~ObjectFactory () |
![]() | |
const Geom::Frame & | _frame |
GranOO3::Shape::Polyhedron::Polyhedron | ( | ) |
GranOO3::Shape::Polyhedron::Polyhedron | ( | std::string | fileName, |
const Geom::Frame & | frame | ||
) |
GranOO3::Shape::Polyhedron::Polyhedron | ( | const Polyhedron & | polyhedron, |
const Geom::Frame & | frame | ||
) |
GranOO3::Shape::Polyhedron::Polyhedron | ( | const Geom::Frame & | frame | ) |
GranOO3::Shape::Polyhedron::Polyhedron | ( | const Polyhedron & | s | ) |
|
virtual |
|
virtual |
Implements GranOO3::Shape::Volume.
double GranOO3::Shape::Polyhedron::area_of_facet_crossed_by_vector | ( | const Geom::Point & | , |
const Geom::Vector & | , | ||
unsigned int & | , | ||
Geom::Vector & | |||
) | const |
Geom::Point GranOO3::Shape::Polyhedron::basefacet_center | ( | const unsigned int | basefacetIndex | ) | const |
bool GranOO3::Shape::Polyhedron::basefacet_from_normal | ( | const Geom::Vector & | normal, |
unsigned int & | basefacetIndex | ||
) | const |
|
private |
|
inlinestatic |
|
virtual |
Implements GranOO3::Shape::Volume.
|
virtual |
Implements GranOO3::Shape::Volume.
double GranOO3::Shape::Polyhedron::compute_distance | ( | const Geom::Point & | ) |
|
virtual |
Implements GranOO3::Shape::Volume.
|
static |
|
virtual |
Implements GranOO3::Shape::Base.
|
virtual |
Reimplemented from GranOO3::Shape::Base.
|
virtual |
Implements GranOO3::Shape::Volume.
|
inline |
|
virtual |
Implements GranOO3::Shape::Volume.
unsigned int GranOO3::Shape::Polyhedron::get_number_of_facet | ( | ) | const |
unsigned int GranOO3::Shape::Polyhedron::get_number_of_vertex | ( | ) | const |
|
inline |
|
inline |
|
virtual |
Implements GranOO3::Shape::Volume.
Reimplemented in GranOO3::DEM::ElementT< GranOO3::Shape::Polyhedron >.
|
virtual |
Reimplemented from GranOO3::Shape::Base.
Reimplemented in GranOO3::DEM::ElementT< GranOO3::Shape::Polyhedron >.
Geom::Point GranOO3::Shape::Polyhedron::initial_centroid | ( | ) | const |
|
inlineprivate |
|
virtual |
Implements GranOO3::Shape::Volume.
|
virtual |
Implements GranOO3::Shape::Volume.
void GranOO3::Shape::Polyhedron::make_equal_to | ( | const Polyhedron & | ) |
|
private |
bool GranOO3::Shape::Polyhedron::overlap | ( | const Sphere & | , |
double | margin, | ||
std::vector< std::string > & | facet | ||
) | const |
|
virtual |
Reimplemented from GranOO3::Shape::Base.
Reimplemented in GranOO3::DEM::ElementT< GranOO3::Shape::Polyhedron >.
|
virtual |
Reimplemented from GranOO3::Shape::Base.
|
inlineprivate |
|
virtual |
Implements GranOO3::Shape::Base.
void GranOO3::Shape::Polyhedron::set_input_file | ( | const std::string & | offFile, |
bool | update = true , |
||
bool | translate_to_centroid = true |
||
) |
void GranOO3::Shape::Polyhedron::set_input_file | ( | std::stringstream & | stringStream, |
bool | update = true , |
||
bool | translate_to_centroid = true |
||
) |
void GranOO3::Shape::Polyhedron::set_input_offset_file | ( | const std::string & | offFile | ) |
void GranOO3::Shape::Polyhedron::set_output_file | ( | const std::string & | offFile | ) |
|
virtual |
Reimplemented from GranOO3::Shape::Base.
void GranOO3::Shape::Polyhedron::to_vtk | ( | const unsigned int | shift, |
unsigned int * | conn, | ||
unsigned int * | cell_type, | ||
double * | point | ||
) | const |
|
virtual |
Reimplemented from GranOO3::Shape::Base.
|
virtual |
Implements GranOO3::Shape::Volume.
|
virtual |
Implements GranOO3::Shape::Volume.
unsigned int GranOO3::Shape::Polyhedron::vtk_conn_number | ( | ) | const |
|
virtual |
Reimplemented from GranOO3::Shape::Base.
Reimplemented in GranOO3::DEM::ElementT< GranOO3::Shape::Polyhedron >.
|
friend |
|
private |
|
private |