Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

vl::Vector3< T_scalar_type > Class Template Reference

The Vector3 class is a template class that implements a generic 3 components vector, see also vl::fvec3, vl::dvec3, vl::uvec3, vl::ivec3, vl::svec3, vl::usvec3, vl::bvec3, vl::ubvec3. More...

#include <Vector3.hpp>

List of all members.

Public Types

typedef T_scalar_type scalar_type

Public Member Functions

 Vector3 (const Vector3 &other)
 Vector3 ()
template<class T >
 Vector3 (const T &other)
 Vector3 (T_scalar_type x, T_scalar_type y, T_scalar_type z)
 Vector3 (const Vector2< T_scalar_type > &v, T_scalar_type z)
T_scalar_type * ptr ()
const T_scalar_type * ptr () const
const T_scalar_type & x () const
const T_scalar_type & y () const
const T_scalar_type & z () const
T_scalar_type & x ()
T_scalar_type & y ()
T_scalar_type & z ()
const T_scalar_type & r () const
const T_scalar_type & g () const
const T_scalar_type & b () const
T_scalar_type & r ()
T_scalar_type & g ()
T_scalar_type & b ()
const T_scalar_type & s () const
const T_scalar_type & t () const
const T_scalar_type & p () const
T_scalar_type & s ()
T_scalar_type & t ()
T_scalar_type & p ()
Vector2< T_scalar_type > xy () const
Vector2< T_scalar_type > st () const
Vector3 operator+ (const Vector3 &other) const
Vector3 operator- (const Vector3 &other) const
Vector3 operator* (const Vector3 &other) const
Vector3 operator/ (const Vector3 &other) const
Vector3 operator+ (T_scalar_type val) const
Vector3 operator- (T_scalar_type val) const
Vector3 operator* (T_scalar_type val) const
Vector3 operator/ (T_scalar_type val) const
Vector3 operator- () const
Vector3operator+= (const Vector3 &other)
Vector3operator-= (const Vector3 &other)
Vector3operator*= (const Vector3 &other)
Vector3operator/= (const Vector3 &other)
Vector3operator+= (T_scalar_type val)
Vector3operator-= (T_scalar_type val)
Vector3operator*= (T_scalar_type val)
Vector3operator/= (T_scalar_type val)
Vector3operator= (const Vector3 &other)
Vector3operator= (T_scalar_type val)
bool operator== (const Vector3 &other) const
bool operator!= (const Vector3 &other) const
bool operator< (const Vector3 &other) const
T_scalar_type & operator[] (unsigned i)
const T_scalar_type & operator[] (unsigned i) const
T_scalar_type length () const
T_scalar_type lengthSquared () const
bool isNull () const
const Vector3normalize (T_scalar_type *len=NULL)

Static Public Attributes

static const int scalar_count = 3

Protected Attributes

T_scalar_type mScalar [scalar_count]

Detailed Description

template<typename T_scalar_type>
class vl::Vector3< T_scalar_type >

The Vector3 class is a template class that implements a generic 3 components vector, see also vl::fvec3, vl::dvec3, vl::uvec3, vl::ivec3, vl::svec3, vl::usvec3, vl::bvec3, vl::ubvec3.

See also:
Vector4, Vector2, Matrix4, Matrix3, Matrix2

Member Typedef Documentation

template<typename T_scalar_type>
typedef T_scalar_type vl::Vector3< T_scalar_type >::scalar_type

Constructor & Destructor Documentation

template<typename T_scalar_type>
vl::Vector3< T_scalar_type >::Vector3 ( const Vector3< T_scalar_type > &  other ) [inline]
template<typename T_scalar_type>
vl::Vector3< T_scalar_type >::Vector3 (  ) [inline]
template<typename T_scalar_type>
template<class T >
vl::Vector3< T_scalar_type >::Vector3 ( const T &  other ) [inline, explicit]
template<typename T_scalar_type>
vl::Vector3< T_scalar_type >::Vector3 ( T_scalar_type  x,
T_scalar_type  y,
T_scalar_type  z 
) [inline, explicit]
template<typename T_scalar_type>
vl::Vector3< T_scalar_type >::Vector3 ( const Vector2< T_scalar_type > &  v,
T_scalar_type  z 
) [inline, explicit]

Member Function Documentation

template<typename T_scalar_type>
T_scalar_type* vl::Vector3< T_scalar_type >::ptr (  ) [inline]
template<typename T_scalar_type>
const T_scalar_type* vl::Vector3< T_scalar_type >::ptr (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::x (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::y (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::z (  ) const [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::x (  ) [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::y (  ) [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::z (  ) [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::r (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::g (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::b (  ) const [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::r (  ) [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::g (  ) [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::b (  ) [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::s (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::t (  ) const [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::p (  ) const [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::s (  ) [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::t (  ) [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::p (  ) [inline]
template<typename T_scalar_type>
Vector2<T_scalar_type> vl::Vector3< T_scalar_type >::xy (  ) const [inline]
template<typename T_scalar_type>
Vector2<T_scalar_type> vl::Vector3< T_scalar_type >::st (  ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator+ ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator- ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator* ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator/ ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator+ ( T_scalar_type  val ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator- ( T_scalar_type  val ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator* ( T_scalar_type  val ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator/ ( T_scalar_type  val ) const [inline]
template<typename T_scalar_type>
Vector3 vl::Vector3< T_scalar_type >::operator- (  ) const [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator+= ( const Vector3< T_scalar_type > &  other ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator-= ( const Vector3< T_scalar_type > &  other ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator*= ( const Vector3< T_scalar_type > &  other ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator/= ( const Vector3< T_scalar_type > &  other ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator+= ( T_scalar_type  val ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator-= ( T_scalar_type  val ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator*= ( T_scalar_type  val ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator/= ( T_scalar_type  val ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator= ( const Vector3< T_scalar_type > &  other ) [inline]
template<typename T_scalar_type>
Vector3& vl::Vector3< T_scalar_type >::operator= ( T_scalar_type  val ) [inline]
template<typename T_scalar_type>
bool vl::Vector3< T_scalar_type >::operator== ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
bool vl::Vector3< T_scalar_type >::operator!= ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
bool vl::Vector3< T_scalar_type >::operator< ( const Vector3< T_scalar_type > &  other ) const [inline]
template<typename T_scalar_type>
T_scalar_type& vl::Vector3< T_scalar_type >::operator[] ( unsigned  i ) [inline]
template<typename T_scalar_type>
const T_scalar_type& vl::Vector3< T_scalar_type >::operator[] ( unsigned  i ) const [inline]
template<typename T_scalar_type>
T_scalar_type vl::Vector3< T_scalar_type >::length (  ) const [inline]
template<typename T_scalar_type>
T_scalar_type vl::Vector3< T_scalar_type >::lengthSquared (  ) const [inline]
template<typename T_scalar_type>
bool vl::Vector3< T_scalar_type >::isNull (  ) const [inline]
template<typename T_scalar_type>
const Vector3& vl::Vector3< T_scalar_type >::normalize ( T_scalar_type *  len = NULL ) [inline]

Member Data Documentation

template<typename T_scalar_type>
const int vl::Vector3< T_scalar_type >::scalar_count = 3 [static]
template<typename T_scalar_type>
T_scalar_type vl::Vector3< T_scalar_type >::mScalar[scalar_count] [protected]

The documentation for this class was generated from the following file:

Visualization Library v2010.11.1123 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Thu Nov 18 2010 02:08:17.
Permission is granted to use this page to write and publish articles regarding Visualization Library.