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

A Shape that represents a Difference between the first and second object. More...

#include <Difference.h>

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

Public Member Functions

 Difference (Shape *s1, Shape *s2, site_t type, bool symmetric=false)
 Create a Difference.
virtual ~Difference ()
 Destroy the Sphere.
virtual bool intersects (Shape *query)
 Check if two shapes intersect.
virtual bool contains (point query)
 Determine if the shape contains the specified point.
virtual bool contains (Shape *query)
 Determine if the shape contains the specified shape.
virtual double getVolume (bool reintegrate=false)
 Get the volume bounded by the sphere.
virtual double getVolume ()
 Get the total internal volume of the shape.
Public Member Functions inherited from 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.
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 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 void discretizeTo (lm::rdme::Lattice *lattice)
 Discretize the object to the specified lattice.

Protected Attributes

Shapeshape1
Shapeshape2
bool hasBeenIntegrated
bool symmetry
double storedVolume
Protected Attributes inherited from lm::builder::Shape
ShapeType shapeType
bounding_box boundingBox
site_t type
vector at
vector up
matrix rotation

Additional Inherited Members

Public Types inherited from lm::builder::Shape
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...
Protected Member Functions inherited from lm::builder::Shape
double integrateToPercentThreshold (double percent)
double integrateToCount (int count)
virtual point minBounds (point p1, point p2) const
virtual point maxBounds (point p1, point p2) const

Detailed Description

A Shape that represents a Difference between the first and second object.

Constructor & Destructor Documentation

◆ Difference()

lm::builder::Difference::Difference ( Shape * s1,
Shape * s2,
site_t type,
bool symmetric = false )

Create a Difference.

Parameters
s1The first shape to Difference
s2The second shape to Difference
typeThe type of the sites within the difference
symmetricDetermine if the difference is symmetric. If false, difference is the 1st shape minus the second shape
Here is the call graph for this function:

◆ ~Difference()

lm::builder::Difference::~Difference ( )
virtual

Destroy the Sphere.

Member Function Documentation

◆ contains() [1/2]

bool lm::builder::Difference::contains ( point query)
virtual

Determine if the shape contains the specified point.

Parameters
queryPoint to test
Returns
true/false

Implements lm::builder::Shape.

◆ contains() [2/2]

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

Determine if the shape contains the specified shape.

Parameters
queryShape to test
Returns
true/false

Implements lm::builder::Shape.

Here is the call graph for this function:

◆ getVolume() [1/2]

virtual double lm::builder::Difference::getVolume ( )
inlinevirtual

Get the total internal volume of the shape.

Implements lm::builder::Shape.

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

◆ getVolume() [2/2]

double lm::builder::Difference::getVolume ( bool reintegrate = false)
virtual

Get the volume bounded by the sphere.

Here is the call graph for this function:

◆ intersects()

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

Check if two shapes intersect.

Parameters
queryThe other shape to check
Returns
true/false

Implements lm::builder::Shape.

Here is the call graph for this function:

Member Data Documentation

◆ hasBeenIntegrated

bool lm::builder::Difference::hasBeenIntegrated
protected

◆ shape1

Shape* lm::builder::Difference::shape1
protected

◆ shape2

Shape* lm::builder::Difference::shape2
protected

◆ storedVolume

double lm::builder::Difference::storedVolume
protected

◆ symmetry

bool lm::builder::Difference::symmetry
protected

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