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::Vector4< T_scalar_type > Class Template Reference

The Vector4 class is a template class that implements a generic 4 components vector, see also vl::fvec4, vl::dvec4, vl::uvec4, vl::ivec4, vl::svec4, vl::usvec4, vl::bvec4, vl::ubvec4. More...

#include <Vector4.hpp>

List of all members.

Public Types

typedef T_scalar_type scalar_type

Public Member Functions

 Vector4 (const Vector4 &other)
 Vector4 ()
template<class T >
 Vector4 (const T &other)
 Vector4 (T_scalar_type x, T_scalar_type y, T_scalar_type z, T_scalar_type w)
 Vector4 (const Vector3< T_scalar_type > &v, T_scalar_type w)
 Vector4 (const Vector2< T_scalar_type > &u, const Vector2< T_scalar_type > &v)
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
const T_scalar_type & w () const
T_scalar_type & x ()
T_scalar_type & y ()
T_scalar_type & z ()
T_scalar_type & w ()
const T_scalar_type & r () const
const T_scalar_type & g () const
const T_scalar_type & b () const
const T_scalar_type & a () const
T_scalar_type & r ()
T_scalar_type & g ()
T_scalar_type & b ()
T_scalar_type & a ()
const T_scalar_type & s () const
const T_scalar_type & t () const
const T_scalar_type & p () const
const T_scalar_type & q () const
T_scalar_type & s ()
T_scalar_type & t ()
T_scalar_type & p ()
T_scalar_type & q ()
Vector3< T_scalar_type > xyz () const
Vector3< T_scalar_type > rgb () const
Vector3< T_scalar_type > stp () const
Vector2< T_scalar_type > xy () const
Vector2< T_scalar_type > rg () const
Vector2< T_scalar_type > st () const
Vector4 operator+ (const Vector4 &other) const
Vector4 operator- (const Vector4 &other) const
Vector4 operator* (const Vector4 &other) const
Vector4 operator/ (const Vector4 &other) const
Vector4 operator+ (T_scalar_type val) const
Vector4 operator- (T_scalar_type val) const
Vector4 operator* (T_scalar_type val) const
Vector4 operator/ (T_scalar_type val) const
Vector4 operator- () const
Vector4operator+= (const Vector4 &other)
Vector4operator-= (const Vector4 &other)
Vector4operator*= (const Vector4 &other)
Vector4operator/= (const Vector4 &other)
Vector4operator+= (T_scalar_type val)
Vector4operator-= (T_scalar_type val)
Vector4operator*= (T_scalar_type val)
Vector4operator/= (T_scalar_type val)
Vector4operator= (const Vector4 &other)
Vector4operator= (T_scalar_type val)
bool operator== (const Vector4 &other) const
bool operator!= (const Vector4 &other) const
bool operator< (const Vector4 &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 Vector4normalize (T_scalar_type *len=NULL)

Static Public Attributes

static const int scalar_count = 4

Protected Attributes

T_scalar_type mScalar [scalar_count]

Detailed Description

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

The Vector4 class is a template class that implements a generic 4 components vector, see also vl::fvec4, vl::dvec4, vl::uvec4, vl::ivec4, vl::svec4, vl::usvec4, vl::bvec4, vl::ubvec4.

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

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Member Data Documentation

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

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

Visualization Library v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 10:33:54.
Permission is granted to use this page to write and publish articles regarding Visualization Library.