Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

gslib::glsl_math::tuple< Size > Struct Template Reference

#include <glsl_math.h>

Inheritance diagram for gslib::glsl_math::tuple< Size >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef size_t size_type
typedef float value_type
typedef value_typeiterator
typedef const value_typeconst_iterator

Public Member Functions

iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
void swap (tuple &other)
 tuple ()
 tuple (const tuple &other)
tupleoperator= (const tuple &other)
float & operator[] (size_type nth)
float operator[] (size_type nth) const
float & at (size_type nth)
float at (size_type nth) const

Static Public Member Functions

size_type size ()

Detailed Description

template<size_t Size>
struct gslib::glsl_math::tuple< Size >

Precondition:
All subclass's front address must be same as float array's front address. This class requests that 'this' pointer is float array's front address.

Definition at line 86 of file glsl_math.h.


Member Typedef Documentation

template<size_t Size>
typedef const value_type* gslib::glsl_math::tuple< Size >::const_iterator
 

Definition at line 90 of file glsl_math.h.

Referenced by gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::end().

template<size_t Size>
typedef value_type* gslib::glsl_math::tuple< Size >::iterator
 

Definition at line 89 of file glsl_math.h.

Referenced by gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::end().

template<size_t Size>
typedef size_t gslib::glsl_math::tuple< Size >::size_type
 

Definition at line 87 of file glsl_math.h.

Referenced by gslib::glsl_math::tuple< Size >::at(), gslib::glsl_math::tuple< Size >::operator[](), and gslib::glsl_math::tuple< Size >::size().

template<size_t Size>
typedef float gslib::glsl_math::tuple< Size >::value_type
 

Definition at line 88 of file glsl_math.h.


Constructor & Destructor Documentation

template<size_t Size>
gslib::glsl_math::tuple< Size >::tuple  )  [inline]
 

Definition at line 116 of file glsl_math.h.

00116 {}

template<size_t Size>
gslib::glsl_math::tuple< Size >::tuple const tuple< Size > &  other  )  [inline]
 

Definition at line 118 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::end().

00118                                         {
00119                 std::copy( other.begin(), other.end(), begin() );
00120             }

Here is the call graph for this function:


Member Function Documentation

template<size_t Size>
float gslib::glsl_math::tuple< Size >::at size_type  nth  )  const [inline]
 

Definition at line 141 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::size_type.

00141                                             {
00142                 return begin()[ nth ];
00143             }

Here is the call graph for this function:

template<size_t Size>
float& gslib::glsl_math::tuple< Size >::at size_type  nth  )  [inline]
 

Definition at line 137 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::size_type.

00137                                        {
00138                 return begin()[ nth ];
00139             }

Here is the call graph for this function:

template<size_t Size>
const_iterator gslib::glsl_math::tuple< Size >::begin  )  const [inline]
 

Definition at line 104 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::const_iterator.

00104                                          {
00105                 return reinterpret_cast< const_iterator >( this );
00106             }

template<size_t Size>
iterator gslib::glsl_math::tuple< Size >::begin  )  [inline]
 

Definition at line 96 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::iterator.

Referenced by gslib::glsl_math::tuple< Size >::at(), gslib::glsl_math::dot(), gslib::glsl_math::tuple< Size >::end(), gslib::glsl_math::mat2::mat2(), gslib::glsl_math::mat3::mat3(), gslib::glsl_math::mat4::mat4(), gslib::glsl_math::vector_mixin< vec4, 4 >::operator *=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator *=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator+=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator-(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator-=(), gslib::glsl_math::vector_mixin< vec4, 4 >::operator/=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator<(), gslib::glsl_math::tuple< Size >::operator=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator==(), gslib::glsl_math::matrix_mixin< mat2, vec2, 2, 2 >::operator[](), gslib::glsl_math::tuple< Size >::operator[](), gslib::glsl_math::tuple< Size >::swap(), and gslib::glsl_math::tuple< Size >::tuple().

00096                              {
00097                 return reinterpret_cast< iterator >( this );
00098             }

template<size_t Size>
const_iterator gslib::glsl_math::tuple< Size >::end  )  const [inline]
 

Definition at line 108 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), gslib::glsl_math::tuple< Size >::const_iterator, and gslib::glsl_math::tuple< Size >::size().

00108                                        {
00109                 return begin() + size();
00110             }

Here is the call graph for this function:

template<size_t Size>
iterator gslib::glsl_math::tuple< Size >::end  )  [inline]
 

Definition at line 100 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), gslib::glsl_math::tuple< Size >::iterator, and gslib::glsl_math::tuple< Size >::size().

Referenced by gslib::glsl_math::dot(), gslib::glsl_math::mat2::mat2(), gslib::glsl_math::mat3::mat3(), gslib::glsl_math::mat4::mat4(), gslib::glsl_math::vector_mixin< vec4, 4 >::operator *=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator *=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator+=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator-(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator-=(), gslib::glsl_math::vector_mixin< vec4, 4 >::operator/=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator<(), gslib::glsl_math::tuple< Size >::operator=(), gslib::glsl_math::tuple_mixin< vec4, Size >::operator==(), gslib::glsl_math::tuple< Size >::swap(), and gslib::glsl_math::tuple< Size >::tuple().

00100                            {
00101                 return begin() + size();
00102             }

Here is the call graph for this function:

template<size_t Size>
tuple& gslib::glsl_math::tuple< Size >::operator= const tuple< Size > &  other  )  [inline]
 

Definition at line 122 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::end().

00122                                                      {
00123                 if ( this != &other ) {
00124                     std::copy( other.begin(), other.end(), begin() );
00125                 }
00126                 return *this;
00127             }

Here is the call graph for this function:

template<size_t Size>
float gslib::glsl_math::tuple< Size >::operator[] size_type  nth  )  const [inline]
 

Reimplemented in gslib::glsl_math::matrix_mixin< SubClass, FriendVector, RowSize, ColumnSize >, gslib::glsl_math::matrix_mixin< mat4, vec4, 4, 4 >, gslib::glsl_math::matrix_mixin< mat3, vec3, 3, 3 >, and gslib::glsl_math::matrix_mixin< mat2, vec2, 2, 2 >.

Definition at line 133 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::size_type.

00133                                                       {
00134                 return begin()[ nth ];
00135             }

Here is the call graph for this function:

template<size_t Size>
float& gslib::glsl_math::tuple< Size >::operator[] size_type  nth  )  [inline]
 

Reimplemented in gslib::glsl_math::matrix_mixin< SubClass, FriendVector, RowSize, ColumnSize >, gslib::glsl_math::matrix_mixin< mat4, vec4, 4, 4 >, gslib::glsl_math::matrix_mixin< mat3, vec3, 3, 3 >, and gslib::glsl_math::matrix_mixin< mat2, vec2, 2, 2 >.

Definition at line 129 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::size_type.

00129                                                  {
00130                 return begin()[ nth ];
00131             }

Here is the call graph for this function:

template<size_t Size>
size_type gslib::glsl_math::tuple< Size >::size  )  [inline, static]
 

Definition at line 92 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::size_type.

Referenced by gslib::glsl_math::tuple< Size >::end().

00092                                     {
00093                 return Size;
00094             }

template<size_t Size>
void gslib::glsl_math::tuple< Size >::swap tuple< Size > &  other  )  [inline]
 

Definition at line 112 of file glsl_math.h.

References gslib::glsl_math::tuple< Size >::begin(), and gslib::glsl_math::tuple< Size >::end().

00112                                       {
00113                 std::swap_ranges( other.begin(), other.end(), begin() );
00114             }

Here is the call graph for this function:


The documentation for this struct was generated from the following file:
Generated on Fri Dec 24 00:52:06 2004 for glsl_math by doxygen 1.3.6