Generic 3-vector. More...
#include <vector3.h>
Public Member Functions | |
__hostanddev__ scalar & | operator[] (int k) |
__hostanddev__ const scalar & | operator[] (int k) const |
__hostanddev__ scalar & | x () |
__hostanddev__ scalar & | y () |
__hostanddev__ scalar & | z () |
__hostanddev__ const scalar & | x () const |
__hostanddev__ const scalar & | y () const |
__hostanddev__ const scalar & | z () const |
__hostanddev__ | vector3 (scalar a=0, scalar b=0, scalar c=0) |
vector3 (std::vector< scalar > a) | |
template<typename scalar2 > | |
__hostanddev__ | vector3 (const vector3< scalar2 > &a) |
__hostanddev__ vector3 | operator+ (const vector3 &a) const |
__hostanddev__ vector3 | operator+= (const vector3 &a) |
__hostanddev__ vector3 | operator+ (const scalar a) const |
__hostanddev__ vector3 | operator+= (const scalar a) |
__hostanddev__ vector3 | operator- () const |
__hostanddev__ vector3 | operator- (const vector3 &a) const |
__hostanddev__ vector3 | operator-= (const vector3 &a) |
__hostanddev__ vector3 | operator/ (scalar s) const |
__hostanddev__ vector3 & | operator/= (scalar s) |
__hostanddev__ scalar | length_squared () const |
__hostanddev__ scalar | length () const |
void | print (FILE *fp, const char *format) const |
__hostanddev__ bool | operator== (const vector3 &w) const |
__hostanddev__ bool | operator< (const vector3 &w) const |
Generic 3-vector.