IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
IMP::algebra::Torus3D Class Reference

Represent a torus in 3D. More...

#include <IMP/algebra/Torus3D.h>

+ Inheritance diagram for IMP::algebra::Torus3D:

Detailed Description

Represent a torus in 3D.

See geometric primitives for more information.

Definition at line 26 of file Torus3D.h.

Public Member Functions

 Torus3D (double major_radius, double minor_radius)
 
double get_major_radius () const
 
double get_minor_radius () const
 
std::pair< double,
algebra::Vector3D
get_torus_distance (Sphere3D) const
 
void show (std::ostream &out=std::cout) const
 

Related Functions

(Note that these are not member functions.)

BoundingBoxD< 3 > get_bounding_box (const Torus3D &g)
 
double get_surface_area (const Torus3D &g)
 
const Torus3Dget_torus_3d_geometry (const Torus3D &g)
 
double get_volume (const Torus3D &g)
 
void set_torus_3d_geometry (Torus3D &g, const Torus3D &v)
 

Member Function Documentation

std::pair< double, algebra::Vector3D > IMP::algebra::Torus3D::get_torus_distance ( Sphere3D  sphere) const

Computes distance and derivative of a sphere s relative to the surface of a torus with major radius R and minor radius r (on z=0, the inner and outer torus rings have radii R-r and R+r, respectively).

Returns
a tuple (d,v) s.t.: d = The shortest distance from any point on s to any point on the torus. If s penetrates the torus, the opposite of the maximal penetration depth is returnd. v = the normalized derivative vector of d

Definition at line 67 of file Torus3D.h.

Friends And Related Function Documentation

BoundingBoxD< 3 > get_bounding_box ( const Torus3D g)
related

Definition at line 61 of file Torus3D.h.

double get_surface_area ( const Torus3D g)
related

Definition at line 61 of file Torus3D.h.

const Torus3D & get_torus_3d_geometry ( const Torus3D g)
related

Definition at line 61 of file Torus3D.h.

double get_volume ( const Torus3D g)
related

Definition at line 61 of file Torus3D.h.

void set_torus_3d_geometry ( Torus3D g,
const Torus3D v 
)
related

Definition at line 61 of file Torus3D.h.


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