Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::builder::Shape Class Referenceabstract

Abstract base class for all the shapes in Lattice Microbes simulation builder. More...

#include <Shape.h>

Inheritance diagram for lm::builder::Shape:
[legend]
Collaboration diagram for lm::builder::Shape:
[legend]

Public Types

enum  ShapeType {
  SPHERE = 1 , HEMISPHERE = 2 , CYLINDER = 3 , CAPSULE = 4 ,
  CUBOID = 5 , CAPSULE_SHELL = 6 , UNION = 7 , DIFFERENCE = 8 ,
  INTERSECTION = 9 , MESH = 10 , TORUS = 11 , ELLIPSE = 12 ,
  CONE = 13 , UNIONSET = 14
}
 Possible shape types that can be used in Lattice Microbes. More...

Public Member Functions

 Shape (ShapeType shapeType, bounding_box boundingBox, site_t type, vector at=vector(0.0, 0.0, 1.0), vector up=vector(0.0, 1.0, 0.0))
 Create a Shape.
virtual ~Shape ()
 Destroy the Shape.
virtual bool boundingBoxesIntersect (Shape *query)
 Checks if another shape's bounding box interstects with this shape's bounding box.
virtual bool intersects (Shape *query)=0
 Check if two shapes intersect.
virtual bool contains (point query)=0
 Determine if the shape contains the specified point.
virtual bool contains (Shape *query)=0
 Determine if the shape contains the specified shape.
virtual bounding_box getBoundingBox ()
 Get the bounding box.
virtual site_t getType ()
 Get the site type associated with the shape.
virtual ShapeType getShapeType ()
 Get the shape type.
virtual double getVolume ()=0
 Get the total internal volume of the shape.
virtual void discretizeTo (lm::rdme::Lattice *lattice)
 Discretize the object to the specified lattice.

Protected Member Functions

double integrateToPercentThreshold (double percent)
double integrateToCount (int count)
virtual point minBounds (point p1, point p2) const
virtual point maxBounds (point p1, point p2) const

Protected Attributes

ShapeType shapeType
bounding_box boundingBox
site_t type
vector at
vector up
matrix rotation

Friends

class LatticeBuilder

Detailed Description

Abstract base class for all the shapes in Lattice Microbes simulation builder.

Member Enumeration Documentation

◆ ShapeType

Possible shape types that can be used in Lattice Microbes.

Enumerator
SPHERE 
HEMISPHERE 
CYLINDER 
CAPSULE 
CUBOID 
CAPSULE_SHELL 
UNION 
DIFFERENCE 
INTERSECTION 
MESH 
TORUS 
ELLIPSE 
CONE 
UNIONSET 

Constructor & Destructor Documentation

◆ Shape()

lm::builder::Shape::Shape ( ShapeType shapeType,
bounding_box boundingBox,
site_t type,
vector at = vector(0.0,0.0,1.0),
vector up = vector(0.0,1.0,0.0) )

Create a Shape.

Parameters
shapeTypeThe type of shape should be of type ShapeType
boundingBoxThe extents of the object used for fast collision/contains checking
typeThe type of site that the object represents
atA vector describing what direction the object is pointing "at"; default: (0,0,1)
upA vector describing what direction is "up" relative to "at"; default: (0,1,0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Shape()

lm::builder::Shape::~Shape ( )
virtual

Destroy the Shape.

Member Function Documentation

◆ boundingBoxesIntersect()

bool lm::builder::Shape::boundingBoxesIntersect ( Shape * query)
virtual

Checks if another shape's bounding box interstects with this shape's bounding box.

Parameters
queryThe other shape to test
Returns
true/false
Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains() [1/2]

virtual bool lm::builder::Shape::contains ( point query)
pure virtual

Determine if the shape contains the specified point.

Parameters
queryPoint to test
Returns
true/false

Implemented in lm::builder::Capsule, lm::builder::CapsuleShell, lm::builder::Cone, lm::builder::Cuboid, lm::builder::Cylinder, lm::builder::Difference, lm::builder::Ellipse, lm::builder::Hemisphere, lm::builder::Intersection, lm::builder::Mesh, lm::builder::Sphere, lm::builder::Torus, lm::builder::Union, and lm::builder::UnionSet.

Here is the caller graph for this function:

◆ contains() [2/2]

virtual bool lm::builder::Shape::contains ( Shape * query)
pure virtual

Determine if the shape contains the specified shape.

Parameters
queryShape to test
Returns
true/false

Implemented in lm::builder::Capsule, lm::builder::CapsuleShell, lm::builder::Cone, lm::builder::Cuboid, lm::builder::Cylinder, lm::builder::Difference, lm::builder::Ellipse, lm::builder::Hemisphere, lm::builder::Intersection, lm::builder::Mesh, lm::builder::Sphere, lm::builder::Torus, lm::builder::Union, and lm::builder::UnionSet.

Here is the call graph for this function:

◆ discretizeTo()

void lm::builder::Shape::discretizeTo ( lm::rdme::Lattice * lattice)
virtual

Discretize the object to the specified lattice.

Parameters
latticeLattice in which to discretize the shape
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBoundingBox()

virtual bounding_box lm::builder::Shape::getBoundingBox ( )
inlinevirtual

Get the bounding box.

Here is the caller graph for this function:

◆ getShapeType()

virtual ShapeType lm::builder::Shape::getShapeType ( )
inlinevirtual

Get the shape type.

Here is the caller graph for this function:

◆ getType()

virtual site_t lm::builder::Shape::getType ( )
inlinevirtual

Get the site type associated with the shape.

Here is the caller graph for this function:

◆ getVolume()

virtual double lm::builder::Shape::getVolume ( )
pure virtual

Get the total internal volume of the shape.

Implemented in lm::builder::Capsule, lm::builder::CapsuleShell, lm::builder::Cone, lm::builder::Cuboid, lm::builder::Cylinder, lm::builder::Difference, lm::builder::Ellipse, lm::builder::Hemisphere, lm::builder::Intersection, lm::builder::Mesh, lm::builder::Sphere, lm::builder::Torus, lm::builder::Union, and lm::builder::UnionSet.

Here is the caller graph for this function:

◆ integrateToCount()

double lm::builder::Shape::integrateToCount ( int count = 1000000)
protected
Here is the call graph for this function:

◆ integrateToPercentThreshold()

double lm::builder::Shape::integrateToPercentThreshold ( double percent)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intersects()

virtual bool lm::builder::Shape::intersects ( Shape * query)
pure virtual

Check if two shapes intersect.

Parameters
queryThe other shape to check
Returns
true/false

Implemented in lm::builder::Capsule, lm::builder::CapsuleShell, lm::builder::Cone, lm::builder::Cuboid, lm::builder::Cylinder, lm::builder::Difference, lm::builder::Ellipse, lm::builder::Hemisphere, lm::builder::Intersection, lm::builder::Mesh, lm::builder::Sphere, lm::builder::Torus, lm::builder::Union, and lm::builder::UnionSet.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxBounds()

virtual point lm::builder::Shape::maxBounds ( point p1,
point p2 ) const
inlineprotectedvirtual
Here is the caller graph for this function:

◆ minBounds()

virtual point lm::builder::Shape::minBounds ( point p1,
point p2 ) const
inlineprotectedvirtual
Here is the caller graph for this function:

◆ LatticeBuilder

friend class LatticeBuilder
friend

Member Data Documentation

◆ at

vector lm::builder::Shape::at
protected

◆ boundingBox

bounding_box lm::builder::Shape::boundingBox
protected

◆ rotation

matrix lm::builder::Shape::rotation
protected

◆ shapeType

ShapeType lm::builder::Shape::shapeType
protected

◆ type

site_t lm::builder::Shape::type
protected

◆ up

vector lm::builder::Shape::up
protected

The documentation for this class was generated from the following files:
  • /data2/LM_zls_github/Lattice-Microbes/src/builder/Shape.h
  • /data2/LM_zls_github/Lattice-Microbes/src/builder/Shape.cpp