IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::algebra::SphericalVector3D Class Reference

Class to represent a 3D point in spherical coordinates. More...

#include <IMP/algebra/SphericalVector3D.h>

Inheritance diagram for IMP::algebra::SphericalVector3D:

Detailed Description

Class to represent a 3D point in spherical coordinates.

The order assumed for the representation is radial distance, zenith, and azimuth (r, theta, psi). zenith - angle with axis z azimuth - angle with axis x See geometric primitives for more information.

Definition at line 30 of file SphericalVector3D.h.

Public Member Functions

 SphericalVector3D (const Vector3D &v)
 Construct from a Cartesian coordinate vector.
 SphericalVector3D (double r, double theta, double psi, bool apply_check=true)
 Construct from provided spherical coordinates.
Vector3D get_cartesian_coordinates () const
 Returns a vector with the Cartesian coordinates.
double & operator[] (unsigned int i)
double operator[] (unsigned int i) const
void show (std::ostream &out=std::cout) const

Constructor & Destructor Documentation

◆ SphericalVector3D() [1/3]

IMP::algebra::SphericalVector3D::SphericalVector3D ( )

Definition at line 34 of file SphericalVector3D.h.

◆ SphericalVector3D() [2/3]

IMP::algebra::SphericalVector3D::SphericalVector3D ( const Vector3D & v)

Construct from a Cartesian coordinate vector.

Definition at line 37 of file SphericalVector3D.h.

◆ SphericalVector3D() [3/3]

IMP::algebra::SphericalVector3D::SphericalVector3D ( double r,
double theta,
double psi,
bool apply_check = true )

Construct from provided spherical coordinates.

A check for the validity of the coords is done by default. Set apply_check to false if you do not want the check.

Definition at line 43 of file SphericalVector3D.h.

Member Function Documentation

◆ get_cartesian_coordinates()

Vector3D IMP::algebra::SphericalVector3D::get_cartesian_coordinates ( ) const

Returns a vector with the Cartesian coordinates.

◆ operator[]() [1/2]

double & IMP::algebra::SphericalVector3D::operator[] ( unsigned int i)

Definition at line 62 of file SphericalVector3D.h.

◆ operator[]() [2/2]

double IMP::algebra::SphericalVector3D::operator[] ( unsigned int i) const

Definition at line 56 of file SphericalVector3D.h.


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