GranOO  3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
GranOO3::Shape::Sphere Class Reference

#include <Sphere.hpp>

Inheritance diagram for GranOO3::Shape::Sphere:
Inheritance graph
[legend]

Public Member Functions

 Sphere ()
 
 Sphere (double radius)
 
 Sphere (double radius, const Geom::Frame &frame)
 
 Sphere (const Sphere &)
 
 Sphere (const Sphere &, const Geom::Frame &)
 
 Sphere (const Geom::Frame &)
 
virtual ~Sphere ()
 
void make_equal_to (const Sphere &)
 
void read_xml_element (const TiXmlElement *el)
 
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 update_bounding_box ()
 
void update_bounding_sphere ()
 
double get_greatest_dimension () const
 
AABB aabb () const
 
Interference locate (const Geom::Point &) const
 
Interference locate (const Geom::Point &, double radius) const
 
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
 
Geom::Point farthest_point_along (const Geom::Vector &) const
 
double get_volume () const
 
void compute_inertia_tensor (double density, Geom::Tensor &) const
 
void draw_gl () const
 
void scale (double)
 
std::ostream & to_povray (std::ostream &out, const Core::Color &y) const
 
- Public Member Functions inherited from GranOO3::Shape::Volume
 Volume (const Geom::Frame &frame)
 
virtual ~Volume ()
 
bool is_surface () const
 
bool is_volume () const
 
const Boxget_bounding_box () const
 
const Sphereget_bounding_sphere () const
 
Boxget_bounding_box ()
 
Sphereget_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
 
- Public Member Functions inherited from GranOO3::Shape::Base
 Base (const Geom::Frame &frame)
 
virtual ~Base ()
 
virtual void draw_gl_edge () const
 
void unscale (double)
 
virtual void add_glob (const std::string &)=0
 
const Geom::Framelocal_frame () const
 
const Geom::Pointget_center () const
 
const Geom::Quaternionget_quaternion () const
 
const Geom::Vectorget_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 Public Member Functions inherited from GranOO3::Shape::Volume
static std::string class_ID ()
 
- Static Public Member Functions inherited from GranOO3::Shape::Base
static Baseglob (const std::string &id)
 
static const Geom::Frameframe_buffer ()
 
static std::string class_ID ()
 
static Basenew_object (const TiXmlElement *el)
 
- Static Public Member Functions inherited from GranOO3::Core::ObjectFactoryInterface< Base, Sphere >
static Basebuild ()
 
static bool record (const std::string &id, std::string file_name="", std::string desc="")
 
- Static Public Member Functions inherited from GranOO3::Core::ObjectFactory< BaseClass >
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

Sphereoperator= (const Sphere &)
 
template<class Archive >
void serialize (Archive &, const unsigned int)
 

Private Attributes

double _radius
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from GranOO3::Shape::Volume
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 &)
 
- Protected Member Functions inherited from GranOO3::Core::ObjectFactoryInterface< Base, Sphere >
 ObjectFactoryInterface ()
 
virtual ~ObjectFactoryInterface ()
 
- Protected Member Functions inherited from GranOO3::Core::ObjectFactory< BaseClass >
 ObjectFactory ()
 
virtual ~ObjectFactory ()
 
- Protected Attributes inherited from GranOO3::Shape::Base
const Geom::Frame_frame
 

Constructor & Destructor Documentation

◆ Sphere() [1/6]

GranOO3::Shape::Sphere::Sphere ( )
inline

◆ Sphere() [2/6]

GranOO3::Shape::Sphere::Sphere ( double  radius)
inline

◆ Sphere() [3/6]

GranOO3::Shape::Sphere::Sphere ( double  radius,
const Geom::Frame frame 
)
inline

◆ Sphere() [4/6]

GranOO3::Shape::Sphere::Sphere ( const Sphere s)
inline

◆ Sphere() [5/6]

GranOO3::Shape::Sphere::Sphere ( const Sphere s,
const Geom::Frame frame 
)
inline

◆ Sphere() [6/6]

GranOO3::Shape::Sphere::Sphere ( const Geom::Frame frame)
inline

◆ ~Sphere()

virtual GranOO3::Shape::Sphere::~Sphere ( )
virtual

Member Function Documentation

◆ aabb()

AABB GranOO3::Shape::Sphere::aabb ( ) const
inlinevirtual

◆ class_ID()

static std::string GranOO3::Shape::Sphere::class_ID ( )
inlinestatic

◆ collide_inside()

bool GranOO3::Shape::Sphere::collide_inside ( const Geom::Point p1,
double  radius,
Collision::Data info 
) const
virtual

◆ collide_outside()

bool GranOO3::Shape::Sphere::collide_outside ( const Geom::Point p1,
double  radius,
Collision::Data info 
) const
virtual

◆ compute_inertia_tensor()

void GranOO3::Shape::Sphere::compute_inertia_tensor ( double  density,
Geom::Tensor m 
) const
inlinevirtual

◆ desc()

static std::string GranOO3::Shape::Sphere::desc ( )
static

◆ draw_gl()

void GranOO3::Shape::Sphere::draw_gl ( ) const
virtual

Implements GranOO3::Shape::Base.

◆ farthest_point_along()

Geom::Point GranOO3::Shape::Sphere::farthest_point_along ( const Geom::Vector ) const
virtual

◆ get_greatest_dimension()

double GranOO3::Shape::Sphere::get_greatest_dimension ( ) const
inlinevirtual

◆ get_volume()

double GranOO3::Shape::Sphere::get_volume ( ) const
inlinevirtual

◆ info()

std::string GranOO3::Shape::Sphere::info ( ) const
virtual

Reimplemented from GranOO3::Shape::Base.

Reimplemented in GranOO3::DEM::ElementT< Shape::Sphere >.

◆ locate() [1/2]

Interference GranOO3::Shape::Sphere::locate ( const Geom::Point ) const
virtual

◆ locate() [2/2]

Interference GranOO3::Shape::Sphere::locate ( const Geom::Point ,
double  radius 
) const
virtual

◆ make_equal_to()

void GranOO3::Shape::Sphere::make_equal_to ( const Sphere )

◆ operator=()

Sphere& GranOO3::Shape::Sphere::operator= ( const Sphere )
private

◆ read_ascii()

virtual std::istream& GranOO3::Shape::Sphere::read_ascii ( std::istream &  in)
virtual

◆ read_xml_element()

void GranOO3::Shape::Sphere::read_xml_element ( const TiXmlElement *  el)
virtual

Reimplemented from GranOO3::Shape::Base.

◆ scale()

void GranOO3::Shape::Sphere::scale ( double  )
virtual

Implements GranOO3::Shape::Base.

◆ serialize()

template<class Archive >
void GranOO3::Shape::Sphere::serialize ( Archive &  ar,
const unsigned int  v 
)
inlineprivate

◆ to_povray()

std::ostream& GranOO3::Shape::Sphere::to_povray ( std::ostream &  out,
const Core::Color y 
) const
virtual

Reimplemented from GranOO3::Shape::Base.

◆ to_vtk()

virtual void GranOO3::Shape::Sphere::to_vtk ( vtkUnstructuredGrid *  data)
virtual

Reimplemented from GranOO3::Shape::Base.

◆ update_bounding_box()

void GranOO3::Shape::Sphere::update_bounding_box ( )
virtual

◆ update_bounding_sphere()

void GranOO3::Shape::Sphere::update_bounding_sphere ( )
virtual

◆ write_ascii()

virtual std::ostream& GranOO3::Shape::Sphere::write_ascii ( std::ostream &  out) const
virtual

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ _radius

double GranOO3::Shape::Sphere::_radius
private

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