IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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

(Note that these are not member symbols.)

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

Constructor & Destructor Documentation

◆ Torus3D()

IMP::algebra::Torus3D::Torus3D ( )

Definition at line 28 of file Torus3D.h.

Member Function Documentation

◆ get_major_radius()

double IMP::algebra::Torus3D::get_major_radius ( ) const

Definition at line 30 of file Torus3D.h.

◆ get_minor_radius()

double IMP::algebra::Torus3D::get_minor_radius ( ) const

Definition at line 31 of file Torus3D.h.

◆ get_torus_distance()

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 returned. v = the normalized derivative vector of d

Definition at line 67 of file Torus3D.h.

Here is the call graph for this function:

◆ get_bounding_box()

BoundingBoxD< 3 > get_bounding_box ( const Torus3D & g)
related

Definition at line 62 of file Torus3D.h.

◆ get_surface_area()

double get_surface_area ( const Torus3D & g)
related

Definition at line 62 of file Torus3D.h.

◆ get_torus_3d_geometry()

const Torus3D & get_torus_3d_geometry ( const Torus3D & g)
related

Definition at line 62 of file Torus3D.h.

◆ get_volume()

double get_volume ( const Torus3D & g)
related

Definition at line 62 of file Torus3D.h.

◆ set_torus_3d_geometry()

void set_torus_3d_geometry ( Torus3D & g,
const Torus3D & v )
related

Definition at line 62 of file Torus3D.h.


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