OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::Vector< T, 3 > Class Template Reference

#include </home/chochlik/devel/oglplus/include/oglplus/math/vector.hpp>

Inheritance diagram for oglplus::Vector< T, 3 >:
Collaboration diagram for oglplus::Vector< T, 3 >:

Public Member Functions

TData (void)
 Pointer to the components of this vector.
 
const TData (void) const
 Pointer to the components of this vector.
 
T At (std::size_t i) const
 Access to the i-th component of this vector. More...
 
T At (std::size_t i, T fallback) const
 Access to the i-th component of this vector with a fallback. More...
 
Toperator[] (std::size_t i)
 Access to the i-th component of this vector. More...
 
const Toperator[] (std::size_t i) const
 Const access to the i-th component of this vector. More...
 
void Add (const VectorBase &v)
 Adds v to this vector.
 
void Subtract (const VectorBase &v)
 Subtracts v from this vector.
 
void Multiply (T v)
 Multiplies this vector by a scalar value.
 
void Multiply (const VectorBase &that)
 Multiplies the elements of this and that vector.
 
void Divide (T v)
 Divides this vector by a scalar value.
 
void Divide (const VectorBase &that)
 Divides the elements of this and that vector.
 
T Length (void) const
 Returns the lenght of this vector.
 
bool IsNormal (T eps=T(0)) const
 Returns true if the vector is normal.
 
void Normalize (void)
 Normalizes this vector.
 

Static Public Member Functions

static std::size_t Size (void)
 The size (the number of components) of this vector.
 
static T DotProduct (const VectorBase &a, const VectorBase &b)
 Computes the dot product of vectors a and b.
 

Detailed Description

template<typename T>
class oglplus::Vector< T, 3 >

.file oglplus/math/vector_3.ipp .brief Specialization of Vector for 3D vectors

Author
Matus Chochlik

Copyright 2010-2014 Matus Chochlik. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Member Function Documentation

T oglplus::VectorBase< T, N >::At ( std::size_t  i) const
inherited

Access to the i-th component of this vector.

Precondition
(i < Size())
T oglplus::VectorBase< T, N >::At ( std::size_t  i,
fallback 
) const
inherited

Access to the i-th component of this vector with a fallback.

Similar to At(i), but returns fallback if i is greater than or equal to Size().

T& oglplus::VectorBase< T, N >::operator[] ( std::size_t  i)
inherited

Access to the i-th component of this vector.

Precondition
(i < Size())
const T& oglplus::VectorBase< T, N >::operator[] ( std::size_t  i) const
inherited

Const access to the i-th component of this vector.

Precondition
(i < Size())

The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/math/vector.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).