#include <geometry.h>
Public Member Functions | |
| FloatSize (float xx=0, float yy=0, float zz=0) | |
| Construct a FloatSize object. | |
| FloatSize (int xx, int yy=0, int zz=0) | |
| Construct a FloatSize object. | |
| FloatSize (double xx, double yy=0, double zz=0) | |
| Construct a FloatSize object. | |
| int | get_ndim () const |
| Get its dimension, 1D, 2D, or 3D. | |
| float | operator[] (int i) const |
| Get the ith direction's size. | |
| float & | operator[] (int i) |
| Get the ith direction's size. | |
| operator vector () const | |
Private Attributes | |
| float | data [3] |
Definition at line 108 of file geometry.h.
| EMAN::FloatSize::FloatSize | ( | float | xx = 0, |
|
| float | yy = 0, |
|||
| float | zz = 0 | |||
| ) | [inline, explicit] |
| EMAN::FloatSize::FloatSize | ( | int | xx, | |
| int | yy = 0, |
|||
| int | zz = 0 | |||
| ) | [inline] |
Construct a FloatSize object.
| xx | The x direction size. Default is 0. | |
| yy | The y direction size. Default is 0. | |
| zz | The z direction size. Default is 0. |
Definition at line 129 of file geometry.h.
References data.
| EMAN::FloatSize::FloatSize | ( | double | xx, | |
| double | yy = 0, |
|||
| double | zz = 0 | |||
| ) | [inline] |
Construct a FloatSize object.
| xx | The x direction size. Default is 0. | |
| yy | The y direction size. Default is 0. | |
| zz | The z direction size. Default is 0. |
Definition at line 141 of file geometry.h.
References data.
| int EMAN::FloatSize::get_ndim | ( | ) | const [inline] |
Get its dimension, 1D, 2D, or 3D.
Definition at line 151 of file geometry.h.
References data.
Referenced by EMAN::ImageIO::check_region().
00152 { 00153 if (data[2] > 1) { 00154 return 3; 00155 } 00156 else if (data[1] > 1) { 00157 return 2; 00158 } 00159 else if (data[0] > 1) { 00160 return 1; 00161 } 00162 else { 00163 return 0; 00164 } 00165 }
| EMAN::FloatSize::operator vector | ( | ) | const [inline] |
| float& EMAN::FloatSize::operator[] | ( | int | i | ) | [inline] |
Get the ith direction's size.
Used as a lvalue.
| i | The ith direction, with 0 is x, 1 is y, 2 is z. |
Definition at line 180 of file geometry.h.
References data.
00181 { 00182 return data[i]; 00183 }
| float EMAN::FloatSize::operator[] | ( | int | i | ) | const [inline] |
Get the ith direction's size.
Used as a rvalue.
| i | The ith direction, with 0 is x, 1 is y, 2 is z. |
Definition at line 171 of file geometry.h.
References data.
00172 { 00173 return data[i]; 00174 }
float EMAN::FloatSize::data[3] [private] |
Definition at line 191 of file geometry.h.
Referenced by FloatSize(), get_ndim(), operator vector(), and operator[]().
1.4.7