#include <gfx/gbvec.h>
Public Member Functions | |
GbVec3 (T x_=T(), T y_=T(), T z_=T()) | |
Default constructor, or set initial 3-D coordinates. | |
GbVec3 (const rutz::fstring &s) | |
String conversion constructor. | |
virtual | ~GbVec3 () |
Virtual destructor. | |
geom::vec3< T > & | vec () |
Get the underlying geom::vec3 value. | |
const geom::vec3< T > & | vec () const |
Get the underlying geom::vec3 value. | |
virtual rutz::fstring | value_typename () const |
Get a string describing the underlying native type. | |
virtual const T * | const_begin () const |
Returns a const pointer to the start of the underlying storage. | |
T & | x () |
const T & | x () const |
T & | y () |
const T & | y () const |
T & | z () |
const T & | z () const |
void | get (T &x_, T &y_, T &z_) const |
void | set (Tx_, Ty_, Tz_) |
T * | data () |
const T * | data () const |
vec2< T > | as_vec2 () const |
double | length () const |
void | scale_by (const U &factor) |
vec3 & | operator*= (const U &factor) |
vec3 & | operator/= (const U &factor) |
vec3 | operator* (const T &factor) const |
vec3 | operator* (const vec3< T > &rhs) const |
vec3 | operator/ (const T &factor) const |
vec3 | operator/ (const vec3< T > &rhs) const |
vec3 | operator+ (const vec2< T > &rhs) const |
vec3 | operator+ (const vec3< T > &rhs) const |
vec3 | operator- (const vec2< T > &rhs) const |
vec3 | operator- (const vec3< T > &rhs) const |
void | debug_dump () const throw () |
virtual void | print_to (std::ostream &os) const |
Write the value to a std::ostream . | |
virtual void | scan_from (std::istream &is) |
Read the value from a std::istream . | |
rutz::fstring | get_string () const |
Get an rutz::fstring representation of the value. | |
void | set_string (rutz::fstring val) |
Set the value from an rutz::fstring. | |
Static Public Member Functions | |
static vec3 | zeros () |
static vec3 | ones () |
static vec3< T > | unit_x () |
static vec3< T > | unit_y () |
static vec3< T > | unit_z () |
Protected Member Functions | |
const T * | const_end () const |
Returns a const pointer to one-past-the-end of the underlying storage. | |
T * | mutable_begin () |
Returns a non-const pointer to the start of the underlying storage. | |
T * | mutable_end () |
Returns a non-const pointer to one-past-the-end of the underlying storage. |
Definition at line 71 of file gbvec.h.
rutz::fstring rutz::value::get_string | ( | ) | const [inherited] |
Get an rutz::fstring
representation of the value.
Builds a string stream, calls print_to(), and returns its value.
Definition at line 58 of file value.cc.
References rutz::value::print_to().
void rutz::value::set_string | ( | rutz::fstring | val | ) | [inherited] |
Set the value from an rutz::fstring.
Builds a string stream from val and calling scan_from() with it.
Definition at line 66 of file value.cc.
References rutz::fstring::c_str(), and rutz::value::scan_from().
Referenced by GbVec2< double >::GbVec2(), and GbVec3< double >::GbVec3().