SPHinXsys  alpha version
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SPH::BinaryShapes Class Reference

a collections of shapes with binary operations This class so that it has ownership of all shapes by using a unique pointer vector. In this way, add or subtract a shape will call the shape's constructor other than passing the shape pointer. More...

#include <base_geometry.h>

Inherits SPH::Shape.

Inherited by SPH::ComplexShape.

Public Member Functions

 BinaryShapes (const std::string &shapes_name)
 
template<class ShapeType , typename... Args>
void add (Args &&...args)
 
template<class ShapeType , typename... Args>
void subtract (Args &&...args)
 
virtual bool isValid () override
 
virtual bool checkContain (const Vecd &pnt, bool BOUNDARY_INCLUDED=true) override
 
virtual Vecd findClosestPoint (const Vecd &input_pnt) override
 
ShapegetShapeByName (const std::string &shape_name)
 
ShapeAndOp * getShapeAndOpByName (const std::string &shape_name)
 
size_t getShapeIndexByName (const std::string &shape_name)
 
- Public Member Functions inherited from SPH::Shape
 Shape (const std::string &shape_name)
 
std::string getName ()
 
void setName (const std::string &name)
 
BoundingBox getBounds ()
 
bool checkNotFar (const Vecd &input_pnt, Real threshold)
 
bool checkNearSurface (const Vecd &input_pnt, Real threshold)
 
Real findSignedDistance (const Vecd &input_pnt)
 
Vecd findNormalDirection (const Vecd &input_pnt)
 

Protected Member Functions

virtual BoundingBox findBounds () override
 

Protected Attributes

UniquePtrKeepers< Shapeshapes_ptr_keeper_
 
StdVec< ShapeAndOp > shapes_and_ops_
 
- Protected Attributes inherited from SPH::Shape
std::string name_
 
BoundingBox bounding_box_
 
bool is_bounds_found_
 

Detailed Description

a collections of shapes with binary operations This class so that it has ownership of all shapes by using a unique pointer vector. In this way, add or subtract a shape will call the shape's constructor other than passing the shape pointer.


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