#include <vuSpherical.h>
Collaboration diagram for vuSpherical:

Public Member Functions | |
| vuSpherical () | |
| Default constructor making a zero spherical. | |
| vuSpherical (const vuSpherical &v) | |
| Copy constructor. | |
| vuSpherical (float longitude, float latitude, float radius) | |
| Constructor initializing to a 3d spherical. | |
| vuSpherical (const float *v) | |
| Constructor initializing the spherical from an array of floats. | |
| vuSpherical (vuVector &vector) | |
| ~vuSpherical () | |
| The destructor. | |
| vuSpherical & | operator= (const vuSpherical &v) |
| The assignment operator. | |
| vuSpherical & | operator= (const float *v) |
| Assigns a 3d float array (longitude,latitude,radius) to the spherical. | |
| float | getLongitude () |
| Getting the longitude. | |
| float | getLatitude () |
| Getting the latitude. | |
| float | getRadius () |
| Getting the radius. | |
| void | setLongitude (float _val) |
| Getting the longitude. | |
| void | setLatitude (float _val) |
| Getting the latitude. | |
| void | setRadius (float _val) |
| Getting the radius. | |
| float | norm (void) const |
| Performs the 1-norm (manhattan norm) on the spherical. | |
| float | norm2 (void) const |
| Performs the 2-norm on the vector. | |
| vuSpherical & | makeUnit (void) |
| Normalizes the vector to a length of 1. | |
| float & | operator[] (dword index) |
| The access operator. | |
| const float & | operator[] (dword index) const |
| The const access operator. | |
| float * | getData (void) |
| Returns the data pointer. | |
| float const * | getData (void) const |
| const version of getData() | |
| bool | operator== (const vuSpherical &v) const |
| An equality operator. | |
| bool | operator!= (const vuSpherical &v) const |
| An inequality operator. | |
| void | print () |
| prints values to the stdout | |
| vuVector | getVector () |
| returns a cartesian vector | |
Private Member Functions | |
| void | ensure (float &longitude, float &latitude, float &radius) |
Private Attributes | |
| float | val [3] |
Friends | |
| ostream & | operator<< (ostream &out, const vuSpherical &v) |
| writes the three elements to a stream; separated by whitespaces | |
| istream & | operator>> (istream &in, vuSpherical &v) |
| reads a spherical from a stream | |
A spherical coordinate consists of two angles (longitude, latitude) and a length (radius).
The formal notation is: vuSpherical = [longitude, latitude, radius]
longitude: angle in x-y-plane, starting with x-axis (counterclockwise) latitude: angle in y-z-plane, starting with y-axis (+z=>+PI/2, -z=>-PI/2) radius: length of vector
0 <= longitude < 2*PI -PI <= latitude <= +PI 0 <= radius < infinity
Definition: if (radius==0), then longitude=0 and latitude=0
Definition at line 32 of file vuSpherical.h.
|
|
Default constructor making a zero spherical.
Definition at line 8 of file vuSpherical.cpp. References val. |
|
|
Copy constructor.
Definition at line 14 of file vuSpherical.cpp. References val. |
|
||||||||||||||||
|
Constructor initializing to a 3d spherical.
Definition at line 22 of file vuSpherical.cpp. References val. |
|
|
Constructor initializing the spherical from an array of floats.
Definition at line 29 of file vuSpherical.cpp. References val. |
|
|
Constructor initializing the spherical from an vuVector, by transforming the vector into a spherical. Definition at line 36 of file vuSpherical.cpp. References M_PI, M_PI_2, vuVector::norm(), and val. |
Here is the call graph for this function:

|
|
The destructor.
Definition at line 75 of file vuSpherical.cpp. |
|
||||||||||||||||
|
Definition at line 165 of file vuSpherical.cpp. |
|
|
const version of getData()
Definition at line 97 of file vuSpherical.cpp. |
|
|
Returns the data pointer. The data is stored as a four dimensional float array. The getData() function can both retrieve and modify; it is similar to the [] operator. To warrant the return of a const pointer (for use in other const member functions) explicitly cast the pointer returned to (const). |
|
|
Getting the latitude.
Definition at line 61 of file vuSpherical.h. Referenced by vu1611_2< SIZE, TYPE >::preview(). |
|
|
Getting the longitude.
Definition at line 59 of file vuSpherical.h. Referenced by vu1611_2< SIZE, TYPE >::preview(). |
|
|
Getting the radius.
Definition at line 63 of file vuSpherical.h. |
|
|
returns a cartesian vector
Definition at line 150 of file vuSpherical.cpp. References val. |
|
|
Normalizes the vector to a length of 1. This simply sets the radius to 1. Definition at line 113 of file vuSpherical.cpp. References val. |
|
|
Performs the 1-norm (manhattan norm) on the spherical.
Definition at line 101 of file vuSpherical.cpp. References val. |
|
|
Performs the 2-norm on the vector. This is the same as the length operator or radius. Definition at line 107 of file vuSpherical.cpp. References val. |
|
|
An inequality operator.
Definition at line 126 of file vuSpherical.cpp. References operator==(). |
Here is the call graph for this function:

|
|
Assigns a 3d float array (longitude,latitude,radius) to the spherical.
|
|
|
The assignment operator.
Definition at line 80 of file vuSpherical.cpp. References val. |
|
|
An equality operator.
Definition at line 120 of file vuSpherical.cpp. References val. Referenced by operator!=(). |
|
|
The const access operator.
Definition at line 92 of file vuSpherical.cpp. |
|
|
The access operator.
|
|
|
prints values to the stdout
Definition at line 131 of file vuSpherical.cpp. References val. |
|
|
Getting the latitude.
Definition at line 69 of file vuSpherical.h. |
|
|
Getting the longitude.
Definition at line 67 of file vuSpherical.h. |
|
|
Getting the radius.
Definition at line 71 of file vuSpherical.h. |
|
||||||||||||
|
writes the three elements to a stream; separated by whitespaces
Definition at line 136 of file vuSpherical.cpp. |
|
||||||||||||
|
reads a spherical from a stream
Definition at line 142 of file vuSpherical.cpp. |
|
|
The coordinates of the vector stored as a floating point array: longitude, latitude, radius Definition at line 120 of file vuSpherical.h. Referenced by getVector(), makeUnit(), norm(), norm2(), operator<<(), operator=(), operator==(), operator>>(), operator[](), print(), and vuSpherical(). |
1.3.9.1