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

A Shape that represents a Torus. More...

#include <Torus.h>

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

Public Member Functions

 Torus (point center, si_dist_t r1, si_dist_t r2, site_t type, vector orientation=vector(0.0, 0.0, 1.0), vector up=vector(0.0, 1.0, 0.0))
 Create a Torus.
virtual ~Torus ()
 Destroy the Torus.
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 void setCenter (point center)
 Set the center of the sphere.
virtual point getCenter ()
 Get the center of the sphere.
virtual si_dist_t getRadius1 ()
 Get the large radius of the sphere.
virtual si_dist_t getRadius2 ()
 Get the small radius of the sphere.
virtual double getVolume ()
 Get the volume bounded by the sphere.
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

point center
si_dist_t radius1
si_dist_t radius2
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 Torus.

Constructor & Destructor Documentation

◆ Torus()

lm::builder::Torus::Torus ( point center,
si_dist_t r1,
si_dist_t r2,
site_t type,
vector orientation = vector(0.0,0.0,1.0),
vector up = vector(0.0,1.0,0.0) )

Create a Torus.

Parameters
centerPoint center of the circle of the slice plane through the sphere
r1Large radius of the Torus
r2Small radius of the Torus
typeThe type of the sites within the sphere
orientationThe direction vector around which the ring is made, default: (0,0,1)
upA vector to define the y axis of the object's coordinate system , default: (0,1,0)
Here is the call graph for this function:

◆ ~Torus()

lm::builder::Torus::~Torus ( )
virtual

Destroy the Torus.

Member Function Documentation

◆ contains() [1/2]

bool lm::builder::Torus::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::Torus::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:

◆ getCenter()

virtual point lm::builder::Torus::getCenter ( )
inlinevirtual

Get the center of the sphere.

◆ getRadius1()

virtual si_dist_t lm::builder::Torus::getRadius1 ( )
inlinevirtual

Get the large radius of the sphere.

◆ getRadius2()

virtual si_dist_t lm::builder::Torus::getRadius2 ( )
inlinevirtual

Get the small radius of the sphere.

◆ getVolume()

double lm::builder::Torus::getVolume ( )
virtual

Get the volume bounded by the sphere.

Implements lm::builder::Shape.

◆ intersects()

bool lm::builder::Torus::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:

◆ setCenter()

void lm::builder::Torus::setCenter ( point center)
virtual

Set the center of the sphere.

Parameters
centerPoint of the center

Member Data Documentation

◆ center

point lm::builder::Torus::center
protected

◆ radius1

si_dist_t lm::builder::Torus::radius1
protected

◆ radius2

si_dist_t lm::builder::Torus::radius2
protected

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