Vector3.h File Reference

#include "lrint.h"
#include <sstream>
#include <string>
#include <cmath>
#include <float.h>
Include dependency graph for Vector3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  BasicVector3< Element >

Typedefs

typedef BasicVector3< float > Vector3

Functions

template<typename T >
std::ostream & operator<< (std::ostream &st, BasicVector3< T > vec)
const Vector3 g_vector3_identity (0, 0, 0)
const Vector3 g_vector3_axis_x (1, 0, 0)
const Vector3 g_vector3_axis_y (0, 1, 0)
const Vector3 g_vector3_axis_z (0, 0, 1)
template<typename Element , typename OtherElement >
void vector3_swap (BasicVector3< Element > &self, BasicVector3< OtherElement > &other)
template<typename Element , typename OtherElement , typename Epsilon >
bool vector3_equal_epsilon (const BasicVector3< Element > &self, const BasicVector3< OtherElement > &other, Epsilon epsilon)
template<typename Element >
BasicVector3< Element > vector3_mid (const BasicVector3< Element > &begin, const BasicVector3< Element > &end)
template<typename Element >
Element float_divided (Element f, Element other)
template<typename Element >
void vector3_normalise (BasicVector3< Element > &self)
template<typename Element >
BasicVector3< Element > vector3_snapped (const BasicVector3< Element > &self)
template<typename Element >
void vector3_snap (BasicVector3< Element > &self)
template<typename Element , typename OtherElement >
BasicVector3< Element > vector3_snapped (const BasicVector3< Element > &self, const OtherElement &snap)
template<typename Element , typename OtherElement >
void vector3_snap (BasicVector3< Element > &self, const OtherElement &snap)
Vector3 vector3_for_spherical (double theta, double phi)

Variables

const Vector3 g_vector3_max = Vector3(FLT_MAX, FLT_MAX, FLT_MAX)
const Vector3 g_vector3_axes [3] = { g_vector3_axis_x, g_vector3_axis_y, g_vector3_axis_z }

Typedef Documentation

typedef BasicVector3<float> Vector3

Definition at line 362 of file Vector3.h.


Function Documentation

template<typename Element >
Element float_divided ( Element  f,
Element  other 
) [inline]

Definition at line 397 of file Vector3.h.

const Vector3 g_vector3_axis_x ( ,
,
 
)
const Vector3 g_vector3_axis_y ( ,
,
 
)
const Vector3 g_vector3_axis_z ( ,
,
 
)
const Vector3 g_vector3_identity ( ,
,
 
)
template<typename T >
std::ostream& operator<< ( std::ostream &  st,
BasicVector3< T >  vec 
) [inline]

Stream insertion operator for BasicVector3. Formats vector as "<x, y, z>".

Definition at line 353 of file Vector3.h.

References st.

template<typename Element , typename OtherElement , typename Epsilon >
bool vector3_equal_epsilon ( const BasicVector3< Element > &  self,
const BasicVector3< OtherElement > &  other,
Epsilon  epsilon 
) [inline]
Vector3 vector3_for_spherical ( double  theta,
double  phi 
) [inline]

Definition at line 433 of file Vector3.h.

template<typename Element >
BasicVector3<Element> vector3_mid ( const BasicVector3< Element > &  begin,
const BasicVector3< Element > &  end 
) [inline]
template<typename Element >
void vector3_normalise ( BasicVector3< Element > &  self  )  [inline]

Definition at line 403 of file Vector3.h.

template<typename Element , typename OtherElement >
void vector3_snap ( BasicVector3< Element > &  self,
const OtherElement &  snap 
) [inline]

Definition at line 428 of file Vector3.h.

References vector3_snapped().

template<typename Element >
void vector3_snap ( BasicVector3< Element > &  self  )  [inline]
template<typename Element , typename OtherElement >
BasicVector3<Element> vector3_snapped ( const BasicVector3< Element > &  self,
const OtherElement &  snap 
) [inline]

Definition at line 422 of file Vector3.h.

References float_snapped().

template<typename Element >
BasicVector3<Element> vector3_snapped ( const BasicVector3< Element > &  self  )  [inline]

Definition at line 409 of file Vector3.h.

References float_to_integer().

Referenced by origin_snapped(), and vector3_snap().

template<typename Element , typename OtherElement >
void vector3_swap ( BasicVector3< Element > &  self,
BasicVector3< OtherElement > &  other 
) [inline]

Variable Documentation

const Vector3 g_vector3_axes[3] = { g_vector3_axis_x, g_vector3_axis_y, g_vector3_axis_z }

Definition at line 372 of file Vector3.h.

const Vector3 g_vector3_max = Vector3(FLT_MAX, FLT_MAX, FLT_MAX)

Definition at line 367 of file Vector3.h.


Generated by  doxygen 1.6.2