30#ifndef __SPH_GEOM_2D_H__
31#define __SPH_GEOM_2D_H__
36#include <siscone/geom_2d.h>
39#define M_PI 3.141592653589793238462643383279502884197
42namespace siscone_spherical{
86 inline unsigned int get_theta_cell(
double theta){
92 inline unsigned int get_phi_cell(
double phi){
93 return (
unsigned int) (1u << ((int) (32*phi/
twopi+16)%32));
101bool is_range_overlap(
const CSphtheta_phi_range &r1,
const CSphtheta_phi_range &r2);
108const CSphtheta_phi_range range_union(
const CSphtheta_phi_range &r1,
const CSphtheta_phi_range &r2);
class for holding a covering range in eta-phi
int add_particle(const double theta, const double phi)
add a particle to the range
CSphtheta_phi_range & operator=(const CSphtheta_phi_range &r)
assignment of range
static double theta_max
maximal value for theta (set to pi)
unsigned int theta_range
theta range as a binary coding of covered cells
static double theta_min
extremal value for theta
CSphtheta_phi_range()
default ctor
unsigned int phi_range
phi range as a binary coding of covered cells
const double twopi
definition of 2*M_PI which is useful a bit everyhere!