Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
Torus.h
Go to the documentation of this file.
1/*
2 * University of Illinois Open Source License
3 * Copyright 2011-2018 Luthey-Schulten Group,
4 * All rights reserved.
5 *
6 * Developed by: Luthey-Schulten Group
7 * University of Illinois at Urbana-Champaign
8 * http://www.scs.uiuc.edu/~schulten
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a copy of
11 * this software and associated documentation files (the Software), to deal with
12 * the Software without restriction, including without limitation the rights to
13 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
14 * of the Software, and to permit persons to whom the Software is furnished to
15 * do so, subject to the following conditions:
16 *
17 * - Redistributions of source code must retain the above copyright notice,
18 * this list of conditions and the following disclaimers.
19 *
20 * - Redistributions in binary form must reproduce the above copyright notice,
21 * this list of conditions and the following disclaimers in the documentation
22 * and/or other materials provided with the distribution.
23 *
24 * - Neither the names of the Luthey-Schulten Group, University of Illinois at
25 * Urbana-Champaign, nor the names of its contributors may be used to endorse or
26 * promote products derived from this Software without specific prior written
27 * permission.
28 *
29 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32 * THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
33 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
34 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
35 * OTHER DEALINGS WITH THE SOFTWARE.
36 *
37 * Author(s): Joseph R. Peterson
38 */
39
40#ifndef LM_BUILDER_TORUS_H_
41#define LM_BUILDER_TORUS_H_
42
43#include "builder/Shape.h"
44#include "rdme/Lattice.h"
45
46namespace lm {
47 namespace builder {
48
51 class Torus : public Shape
52 {
53 public:
61 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));
63 virtual ~Torus();
64
68 virtual bool intersects(Shape * query);
72 virtual bool contains(point query);
76 virtual bool contains(Shape * query);
79 virtual void setCenter(point center);
81 virtual point getCenter() {return center;}
83 virtual si_dist_t getRadius1() {return radius1;}
85 virtual si_dist_t getRadius2() {return radius2;}
87 virtual double getVolume();
88
89 protected:
91 si_dist_t radius1; // big radius
92 si_dist_t radius2; // small radius
93
94 };
95
96 }
97}
98
99#endif
100
uint32_t site_t
Definition Lattice.h:74
double si_dist_t
Definition Types.h:63
vector up
Definition Shape.h:382
site_t type
Definition Shape.h:378
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.
Definition Shape.cpp:129
virtual si_dist_t getRadius2()
Get the small radius of the sphere.
Definition Torus.h:85
virtual void setCenter(point center)
Set the center of the sphere.
Definition Torus.cpp:125
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.
Definition Torus.cpp:48
si_dist_t radius2
Definition Torus.h:92
virtual bool contains(point query)
Determine if the shape contains the specified point.
Definition Torus.cpp:86
point center
Definition Torus.h:90
si_dist_t radius1
Definition Torus.h:91
virtual double getVolume()
Get the volume bounded by the sphere.
Definition Torus.cpp:136
virtual ~Torus()
Destroy the Torus.
Definition Torus.cpp:67
virtual bool intersects(Shape *query)
Check if two shapes intersect.
Definition Torus.cpp:71
virtual point getCenter()
Get the center of the sphere.
Definition Torus.h:81
virtual si_dist_t getRadius1()
Get the large radius of the sphere.
Definition Torus.h:83
Definition Capsule.cpp:47
struct lm::builder::vector vector
Definition Capsule.cpp:46
Type to store a position in space.
Definition Shape.h:67
A vector which points in a direction.
Definition Shape.h:153