mimmo::Cube Class Reference

Elementary Shape Representation of a Cube. More...

#include <BasicShapes.hpp>

Inheritance diagram for mimmo::Cube:
Collaboration diagram for mimmo::Cube:

Public Member Functions

 Cube ()
 
 Cube (const Cube &)
 
 Cube (const darray3E &origin, const darray3E &span)
 
 ~Cube ()
 
darray3E getLocalOrigin ()
 
bool intersectShapeAABBox (const darray3E &bMin, const darray3E &bMax)
 
darray3E toLocalCoord (const darray3E &point)
 
darray3E toWorldCoord (const darray3E &point)
 
- Public Member Functions inherited from mimmo::BasicShape
 BasicShape ()
 
virtual ~BasicShape ()
 
livector1D excludeCloudPoints (bitpit::PatchKernel *)
 
livector1D excludeCloudPoints (const dvecarr3E &)
 
livector1D excludeCloudPoints (MimmoSharedPointer< MimmoObject >)
 
livector1D excludeGeometry (bitpit::PatchKernel *)
 
livector1D excludeGeometry (MimmoSharedPointer< MimmoObject >)
 
CoordType getCoordinateType (int dir)
 
darray3E getInfLimits ()
 
darray3E getLocalSpan ()
 
darray3E getOrigin ()
 
dmatrix33E getRefSystem ()
 
darray3E getScaling ()
 
ShapeType getShapeType ()
 
ShapeType getShapeType () const
 
darray3E getSpan ()
 
livector1D includeCloudPoints (bitpit::PatchKernel *)
 
livector1D includeCloudPoints (const dvecarr3E &)
 
livector1D includeCloudPoints (MimmoSharedPointer< MimmoObject >)
 
livector1D includeGeometry (bitpit::PatchKernel *)
 
livector1D includeGeometry (MimmoSharedPointer< MimmoObject >)
 
bool isPointIncluded (bitpit::PatchKernel *, const long int &indexV)
 
bool isPointIncluded (const darray3E &)
 
bool isSimplexIncluded (bitpit::PatchKernel *, const long int &indexT)
 
bool isSimplexIncluded (const dvecarr3E &)
 
void setCoordinateType (CoordType, int dir)
 
void setInfLimits (darray3E val)
 
void setInfLimits (double val, int dir)
 
void setOrigin (darray3E)
 
void setRefSystem (darray3E, darray3E, darray3E)
 
void setRefSystem (dmatrix33E axes)
 
void setRefSystem (int, darray3E)
 
void setSpan (darray3E)
 
void setSpan (double, double, double)
 

Additional Inherited Members

- Protected Member Functions inherited from mimmo::BasicShape
darray3E checkNearestPointToAABBox (const darray3E &point, const darray3E &bMin, const darray3E &bMax)
 
uint32_t intersectShapePlane (int level, const darray3E &target)
 
void swap (BasicShape &) noexcept
 
- Static Protected Member Functions inherited from mimmo::BasicShape
static dmatrix33E inverse (const dmatrix33E &mat)
 
static darray3E matmul (const darray3E &vec, const dmatrix33E &mat)
 
static darray3E matmul (const dmatrix33E &mat, const darray3E &vec)
 
static dmatrix33E transpose (const dmatrix33E &mat)
 
- Protected Attributes inherited from mimmo::BasicShape
dvecarr3E m_bbox
 
darray3E m_infLimits
 
darray3E m_origin
 
darray3E m_scaling
 
dmatrix33E m_sdr
 
dmatrix33E m_sdr_inverse
 
ShapeType m_shape
 
darray3E m_span
 
std::array< CoordType, 3 > m_typeCoord
 

Detailed Description

Elementary Shape Representation of a Cube.

Volumetric Core Element, shaped as a cube, directly derived from BasicShape class.

Definition at line 253 of file BasicShapes.hpp.

Constructor & Destructor Documentation

◆ Cube() [1/3]

mimmo::Cube::Cube ( )

Basic Constructor

Definition at line 894 of file BasicShapes.cpp.

◆ Cube() [2/3]

mimmo::Cube::Cube ( const darray3E origin,
const darray3E span 
)

Custom Constructor. Set shape origin and its span, ordered as width, height and depth.

Parameters
[in]originpoint origin in global reference system
[in]spanspan in each shape local coordinate x,y,z;

Definition at line 905 of file BasicShapes.cpp.

◆ ~Cube()

mimmo::Cube::~Cube ( )

Basic Destructor

Definition at line 912 of file BasicShapes.cpp.

◆ Cube() [3/3]

mimmo::Cube::Cube ( const Cube other)

Copy Constructor

Parameters
[in]otherCube object where copy from

Definition at line 919 of file BasicShapes.cpp.

Member Function Documentation

◆ getLocalOrigin()

darray3E mimmo::Cube::getLocalOrigin ( )
virtual
Returns
local origin of your primitive shape

Implements mimmo::BasicShape.

Definition at line 982 of file BasicShapes.cpp.

◆ intersectShapeAABBox()

bool mimmo::Cube::intersectShapeAABBox ( const darray3E bMin,
const darray3E bMax 
)
virtual

Check if current shape intersects or is totally contained into the given Axis Aligned Bounding Box

Parameters
[in]bMininferior extremal point of the AABB
[in]bMaxsuperior extremal point of the AABB
Returns
true if intersects, false otherwise

TODO NEED TO BE OPTIMIZED!

Implements mimmo::BasicShape.

Definition at line 1085 of file BasicShapes.cpp.

◆ toLocalCoord()

darray3E mimmo::Cube::toLocalCoord ( const darray3E point)
virtual

Transform point from world coordinate system, to local reference system of the shape.

Parameters
[in]pointtarget
Returns
transformed point

Implements mimmo::BasicShape.

Definition at line 955 of file BasicShapes.cpp.

◆ toWorldCoord()

darray3E mimmo::Cube::toWorldCoord ( const darray3E point)
virtual

Transform point from local reference system of the shape, to world reference system.

Parameters
[in]pointtarget
Returns
transformed point

Implements mimmo::BasicShape.

Definition at line 928 of file BasicShapes.cpp.


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