ClanLib  2.3.7
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CL_Vec1< Type > Class Template Reference

1D vector More...

#include <vec1.h>

Public Types

typedef Type datatype
 

Public Member Functions

 CL_Vec1 ()
 
 CL_Vec1 (const CL_Vec2< Type > &copy)
 
 CL_Vec1 (const CL_Vec3< Type > &copy)
 
 CL_Vec1 (const CL_Vec4< Type > &copy)
 
 CL_Vec1 (const Type &p1)
 
Attributes
CL_Vec1< Type > & round ()
 Rounds all components on this vector. More...
 
Operators
const Type & operator[] (unsigned int i) const
 
Type & operator[] (unsigned int i)
 
 operator Type * ()
 
 operator Type *const () const
 
void operator+= (const CL_Vec1< Type > &vector)
 += operator. More...
 
void operator+= (Type value)
 += operator. More...
 
CL_Vec1< Type > operator+ (const CL_Vec1< Type > &vector) const
 
  • operator.
More...
 
CL_Vec1< Type > operator+ (Type value) const
 
  • operator.
More...
 
void operator-= (const CL_Vec1< Type > &vector)
 -= operator. More...
 
void operator-= (Type value)
 -= operator. More...
 
CL_Vec1< Type > operator- (const CL_Vec1< Type > &vector) const
 
  • operator.
More...
 
CL_Vec1< Type > operator- (Type value) const
 
  • operator.
More...
 
void operator*= (const CL_Vec1< Type > &vector)
 *= operator. More...
 
void operator*= (Type value)
 *= operator. More...
 
CL_Vec1< Type > operator* (const CL_Vec1< Type > &vector) const
 
  • operator.
More...
 
CL_Vec1< Type > operator* (Type value) const
 
  • operator.
More...
 
void operator/= (const CL_Vec1< Type > &vector)
 /= operator. More...
 
void operator/= (Type value)
 /= operator. More...
 
CL_Vec1< Type > operator/ (const CL_Vec1< Type > &vector) const
 / operator. More...
 
CL_Vec1< Type > operator/ (Type value) const
 / operator. More...
 
CL_Vec1< Type > & operator= (const CL_Vec1< Type > &vector)
 = operator. More...
 
bool operator== (const CL_Vec1< Type > &vector) const
 == operator. More...
 
bool operator!= (const CL_Vec1< Type > &vector) const
 != operator. More...
 

Static Public Member Functions

static CL_Vec1< Type > round (const CL_Vec1< Type > &vector)
 Rounds all components on a vector. More...
 

Public Attributes

union {
   Type   r
 
   Type   s
 
   Type   x
 
}; 
 

Detailed Description

template<typename Type>
class CL_Vec1< Type >

1D vector

These vector templates are defined for:
char (CL_Vec1c), unsigned char (CL_Vec1uc), short (CL_Vec1s),
unsigned short (CL_Vec1us), int (CL_Vec1i), unsigned int (CL_Vec1ui), float CL_Vec1f), double (CL_Vec1d)

Member Typedef Documentation

template<typename Type>
typedef Type CL_Vec1< Type >::datatype

Constructor & Destructor Documentation

template<typename Type>
CL_Vec1< Type >::CL_Vec1 ( )
inline
template<typename Type>
CL_Vec1< Type >::CL_Vec1 ( const CL_Vec2< Type > &  copy)
inline
template<typename Type>
CL_Vec1< Type >::CL_Vec1 ( const CL_Vec3< Type > &  copy)
inline
template<typename Type>
CL_Vec1< Type >::CL_Vec1 ( const CL_Vec4< Type > &  copy)
inline
template<typename Type>
CL_Vec1< Type >::CL_Vec1 ( const Type &  p1)
inline

Member Function Documentation

template<typename Type>
CL_Vec1< Type >::operator Type * ( )
inline
template<typename Type>
CL_Vec1< Type >::operator Type *const ( ) const
inline
template<typename Type>
bool CL_Vec1< Type >::operator!= ( const CL_Vec1< Type > &  vector) const
inline

!= operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator* ( const CL_Vec1< Type > &  vector) const
inline

  • operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator* ( Type  value) const
inline

  • operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator*= ( const CL_Vec1< Type > &  vector)
inline

*= operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator*= ( Type  value)
inline

*= operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator+ ( const CL_Vec1< Type > &  vector) const
inline

  • operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator+ ( Type  value) const
inline

  • operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator+= ( const CL_Vec1< Type > &  vector)
inline

+= operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator+= ( Type  value)
inline

+= operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator- ( const CL_Vec1< Type > &  vector) const
inline

  • operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator- ( Type  value) const
inline

  • operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator-= ( const CL_Vec1< Type > &  vector)
inline

-= operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator-= ( Type  value)
inline

-= operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator/ ( const CL_Vec1< Type > &  vector) const
inline

/ operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type> CL_Vec1< Type >::operator/ ( Type  value) const
inline

/ operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator/= ( const CL_Vec1< Type > &  vector)
inline

/= operator.

References CL_Vec1< Type >::x.

template<typename Type>
void CL_Vec1< Type >::operator/= ( Type  value)
inline

/= operator.

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type>& CL_Vec1< Type >::operator= ( const CL_Vec1< Type > &  vector)
inline

= operator.

References CL_Vec1< Type >::x.

template<typename Type>
bool CL_Vec1< Type >::operator== ( const CL_Vec1< Type > &  vector) const
inline

== operator.

References CL_Vec1< Type >::x.

template<typename Type>
const Type& CL_Vec1< Type >::operator[] ( unsigned int  i) const
inline
template<typename Type>
Type& CL_Vec1< Type >::operator[] ( unsigned int  i)
inline
template<typename Type>
static CL_Vec1<Type> CL_Vec1< Type >::round ( const CL_Vec1< Type > &  vector)
inlinestatic

Rounds all components on a vector.

Uses Asymmetric Arithmetic Rounding

Parameters
vector= Vector to use
Returns
rounded vector

References CL_Vec1< Type >::x.

template<typename Type>
CL_Vec1<Type>& CL_Vec1< Type >::round ( )
inline

Rounds all components on this vector.

Uses Asymmetric Arithmetic Rounding

Returns
reference to this object

References CL_Vec1< Type >::x.

Member Data Documentation

union { ... }
template<typename Type>
Type CL_Vec1< Type >::r
template<typename Type>
Type CL_Vec1< Type >::s
template<typename Type>
Type CL_Vec1< Type >::x

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