Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Classes | Namespaces | Defines | Typedefs | Functions

/home/master/UCL/VisualizationLibrary/src/vlCore/Vector2.hpp File Reference

#include <vlCore/OpenGLDefs.hpp>
#include <vlCore/std_types.hpp>
#include <cmath>

Go to the source code of this file.

Classes

class  vl::Vector2< T_Scalar >
 The Vector2 class is a template class that implements a generic 2 components vector, see also vl::fvec2, vl::dvec2, vl::uvec2, vl::ivec2, vl::svec2, vl::usvec2, vl::bvec2, vl::ubvec2. More...

Namespaces

namespace  vl
 

Visualization Library namespace.


Defines

#define VL_FLOAT_SQRT(x)   ((float)::sqrt(x))
#define VL_FLOAT_INVSQRT(x)   (1.0f/(float)::sqrt(x))

Typedefs

typedef Vector2< int > vl::ivec2
 A 2 components vector with int precision.
typedef Vector2< unsigned int > vl::uvec2
 A 2 components vector with unsigned int precision.
typedef Vector2< float > vl::fvec2
 A 2 components vector with float precision.
typedef Vector2< double > vl::dvec2
 A 2 components vector with double precision.
typedef Vector2< char > vl::bvec2
 A 2 components vector with char precision.
typedef Vector2< unsigned char > vl::ubvec2
 A 2 components vector with unsigned char precision.
typedef Vector2< short > vl::svec2
 A 2 components vector with short precision.
typedef Vector2< unsigned short > vl::usvec2
 A 2 components vector with unsigned short precision.
typedef fvec2 vl::vec2
 Defined as: 'typedef fvec2 vec2'. See also VL_PIPELINE_PRECISION.

Functions

float vl::fast1_inversesqrt (float x)
float vl::fast2_inversesqrt (float x)
float vl::fast_sqrt (float x)
template<typename T >
const Vector2< T > vl::operator* (T val, const Vector2< T > &v)
float vl::dot (const fvec2 &v1, const fvec2 &v2)
float vl::min (float a, float b)
double vl::min (double a, double b)
int vl::min (int a, int b)
unsigned int vl::min (unsigned int a, unsigned int b)
float vl::max (float a, float b)
double vl::max (double a, double b)
int vl::max (int a, int b)
unsigned int vl::max (unsigned int a, unsigned int b)
float vl::clamp (float x, float minval, float maxval)
double vl::clamp (double x, double minval, double maxval)
int vl::clamp (int x, int minval, int maxval)
unsigned int vl::clamp (unsigned int x, unsigned int minval, unsigned int maxval)
fvec2 vl::min (const fvec2 &a, const fvec2 &b)
fvec2 vl::min (const fvec2 &a, float b)
dvec2 vl::min (const dvec2 &a, double b)
ivec2 vl::min (const ivec2 &a, int b)
uvec2 vl::min (const uvec2 &a, unsigned int b)
fvec2 vl::max (const fvec2 &a, const fvec2 &b)
fvec2 vl::max (const fvec2 &a, float b)
dvec2 vl::max (const dvec2 &a, double b)
ivec2 vl::max (const ivec2 &a, int b)
uvec2 vl::max (const uvec2 &a, unsigned int b)
fvec2 vl::clamp (const fvec2 &x, float minval, float maxval)
fvec2 vl::clamp (const fvec2 &x, const fvec2 &minval, const fvec2 &maxval)
dvec2 vl::clamp (const dvec2 &x, double minval, double maxval)
ivec2 vl::clamp (const ivec2 &x, int minval, int maxval)
uvec2 vl::clamp (const uvec2 &x, unsigned int minval, unsigned int maxval)

Define Documentation

#define VL_FLOAT_SQRT (   x )    ((float)::sqrt(x))

Definition at line 63 of file Vector2.hpp.

#define VL_FLOAT_INVSQRT (   x )    (1.0f/(float)::sqrt(x))

Definition at line 64 of file Vector2.hpp.


Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:04.
Permission is granted to use this page to write and publish articles regarding Visualization Library.