GranOO 3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
Loading...
Searching...
No Matches
GranOO3::Shape::Box Class Reference

#include <Box.hpp>

Inheritance diagram for GranOO3::Shape::Box:

Public Member Functions

 Box ()
 Box (double dimX, double dimY, double dimZ, const Geom::Frame &frame)
 Box (const Box &)
 Box (const Box &, const Geom::Frame &)
 Box (const Geom::Frame &)
virtual ~Box ()
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 make_equal_to (const Box &)
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, Geom::Tensor &) const
void draw_gl () const
void scale (double)
void set_length (double x, double y, double z)
Geom::Point get_xmax_center (const Geom::Frame &frame=Geom::Frame::global) const
Geom::Point get_xmin_center (const Geom::Frame &frame=Geom::Frame::global) const
Geom::Point get_ymax_center (const Geom::Frame &frame=Geom::Frame::global) const
Geom::Point get_ymin_center (const Geom::Frame &frame=Geom::Frame::global) const
Geom::Point get_zmax_center (const Geom::Frame &frame=Geom::Frame::global) const
Geom::Point get_zmin_center (const Geom::Frame &frame=Geom::Frame::global) const
Geom::Point get_point1 () const
Geom::Point get_point2 () const
Geom::Point get_point3 () const
Geom::Point get_point4 () const
Geom::Point get_point5 () const
Geom::Point get_point6 () const
Geom::Point get_point7 () const
Geom::Point get_point8 () const
std::ostream & to_povray (std::ostream &out, const Core::Color &) 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 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
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::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 Public Member Functions inherited from GranOO3::Shape::Volume
static std::string class_ID ()
Static Public Member Functions inherited from GranOO3::Shape::Base
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 Public Member Functions inherited from GranOO3::Core::ObjectFactoryInterface< Base, Box >
static Base * build ()
static bool record (const std::string &id, std::string file_name="", std::string desc="")
Static Public Member Functions inherited from GranOO3::Core::ObjectFactory< Base >
static void record (std::function< Base *()>, const std::string &, const std::string file="", const std::string desc="")
static Base * new_object (const std::string &)
static std::vector< std::string > get_ID ()
static std::map< const std::string, std::function< Base *()> > & get_map ()

Private Member Functions

Box & operator= (const Box &)
template<class Archive>
void serialize (Archive &, const unsigned int)

Private Attributes

double _lx
double _ly
double _lz

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

Constructor & Destructor Documentation

◆ Box() [1/5]

GranOO3::Shape::Box::Box ( )
inline

◆ Box() [2/5]

GranOO3::Shape::Box::Box ( double dimX,
double dimY,
double dimZ,
const Geom::Frame & frame )
inline

◆ Box() [3/5]

GranOO3::Shape::Box::Box ( const Box & b)
inline

◆ Box() [4/5]

GranOO3::Shape::Box::Box ( const Box & b,
const Geom::Frame & frame )
inline

◆ Box() [5/5]

GranOO3::Shape::Box::Box ( const Geom::Frame & frame)
inline

◆ ~Box()

virtual GranOO3::Shape::Box::~Box ( )
virtual

Member Function Documentation

◆ aabb()

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

◆ class_ID()

std::string GranOO3::Shape::Box::class_ID ( )
inlinestatic

◆ collide_inside()

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

◆ collide_outside()

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

◆ compute_inertia_tensor()

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

◆ desc()

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

◆ draw_gl()

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

Implements GranOO3::Shape::Base.

◆ farthest_point_along()

Geom::Point GranOO3::Shape::Box::farthest_point_along ( const Geom::Vector & ) const
virtual

◆ get_greatest_dimension()

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

◆ get_point1()

Geom::Point GranOO3::Shape::Box::get_point1 ( ) const
inline

◆ get_point2()

Geom::Point GranOO3::Shape::Box::get_point2 ( ) const
inline

◆ get_point3()

Geom::Point GranOO3::Shape::Box::get_point3 ( ) const
inline

◆ get_point4()

Geom::Point GranOO3::Shape::Box::get_point4 ( ) const
inline

◆ get_point5()

Geom::Point GranOO3::Shape::Box::get_point5 ( ) const
inline

◆ get_point6()

Geom::Point GranOO3::Shape::Box::get_point6 ( ) const
inline

◆ get_point7()

Geom::Point GranOO3::Shape::Box::get_point7 ( ) const
inline

◆ get_point8()

Geom::Point GranOO3::Shape::Box::get_point8 ( ) const
inline

◆ get_volume()

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

◆ get_xmax_center()

Geom::Point GranOO3::Shape::Box::get_xmax_center ( const Geom::Frame & frame = Geom::Frame::global) const
inline

◆ get_xmin_center()

Geom::Point GranOO3::Shape::Box::get_xmin_center ( const Geom::Frame & frame = Geom::Frame::global) const
inline

◆ get_ymax_center()

Geom::Point GranOO3::Shape::Box::get_ymax_center ( const Geom::Frame & frame = Geom::Frame::global) const
inline

◆ get_ymin_center()

Geom::Point GranOO3::Shape::Box::get_ymin_center ( const Geom::Frame & frame = Geom::Frame::global) const
inline

◆ get_zmax_center()

Geom::Point GranOO3::Shape::Box::get_zmax_center ( const Geom::Frame & frame = Geom::Frame::global) const
inline

◆ get_zmin_center()

Geom::Point GranOO3::Shape::Box::get_zmin_center ( const Geom::Frame & frame = Geom::Frame::global) const
inline

◆ info()

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

Reimplemented from GranOO3::Shape::Base.

◆ locate() [1/2]

Interference GranOO3::Shape::Box::locate ( const Geom::Point & ) const
virtual

◆ locate() [2/2]

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

◆ make_equal_to()

void GranOO3::Shape::Box::make_equal_to ( const Box & )

◆ operator=()

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

◆ read_ascii()

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

Reimplemented from GranOO3::Shape::Base.

◆ read_xml_element()

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

Reimplemented from GranOO3::Shape::Base.

◆ scale()

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

Implements GranOO3::Shape::Base.

◆ serialize()

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

◆ set_length()

void GranOO3::Shape::Box::set_length ( double x,
double y,
double z )
inline

◆ to_povray()

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

Reimplemented from GranOO3::Shape::Base.

◆ to_vtk()

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

Reimplemented from GranOO3::Shape::Base.

◆ update_bounding_box()

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

◆ update_bounding_sphere()

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

◆ write_ascii()

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

Reimplemented from GranOO3::Shape::Base.

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ _lx

double GranOO3::Shape::Box::_lx
private

◆ _ly

double GranOO3::Shape::Box::_ly
private

◆ _lz

double GranOO3::Shape::Box::_lz
private

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