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

Base class for all volumetric geometries Note that checkContain and findClosest point are basic function, They should not call other functions in shape. More...

#include <base_geometry.h>

Inherited by SPH::BinaryShapes, SPH::GeometricShape, SPH::GeometricShapeBall, SPH::GeometricShapeBox, SPH::ImageShape, SPH::LevelSetShape, SPH::MultiPolygonShape, and SPH::TriangleMeshShape.

Public Member Functions

 Shape (const std::string &shape_name)
 
std::string getName ()
 
void setName (const std::string &name)
 
BoundingBox getBounds ()
 
virtual bool isValid ()
 
virtual bool checkContain (const Vecd &pnt, bool BOUNDARY_INCLUDED=true)=0
 
virtual Vecd findClosestPoint (const Vecd &input_pnt)=0
 
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 ()=0
 

Protected Attributes

std::string name_
 
BoundingBox bounding_box_
 
bool is_bounds_found_
 

Detailed Description

Base class for all volumetric geometries Note that checkContain and findClosest point are basic function, They should not call other functions in shape.

Member Function Documentation

◆ findNormalDirection()

Vecd SPH::Shape::findNormalDirection ( const Vecd &  input_pnt)

Normal direction point toward outside of the complex shape.

◆ findSignedDistance()

Real SPH::Shape::findSignedDistance ( const Vecd &  input_pnt)

Signed distance is negative for point within the complex shape.


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