# Visualization Library

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

[Home] [Tutorials] [All Classes] [Grouped Classes]

# E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Vector2.hpp File Reference

`#include "vl/OpenGL.hpp"`
`#include <cmath>`

## Classes

class | vl::Vector2< scalar_type >
| 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< GLint > | vl::ivec2
| A 2 components vector with `GLint` precision.
typedef Vector2< GLuint > | vl::uvec2
| A 2 components vector with `GLuint` precision.
typedef Vector2< GLfloat > | vl::fvec2
| A 2 components vector with `GLfloat` precision.
typedef Vector2< GLdouble > | vl::dvec2
| A 2 components vector with `GLdouble` precision.
typedef Vector2< GLbyte > | vl::bvec2
| A 2 components vector with `GLbyte` precision.
typedef Vector2< GLubyte > | vl::ubvec2
| A 2 components vector with `GLubyte` precision.
typedef Vector2< GLshort > | vl::svec2
| A 2 components vector with `GLshort` precision.
typedef Vector2< GLushort > | vl::usvec2
| A 2 components vector with `GLushort` precision.
typedef dvec2 | vl::vec2
| Defined as: `'typedef` `dvec2` `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)

## Variables

const double | vl::dPi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093845
| Greek Pi constant using `double` precision.
const double | vl::dDEG_TO_RAD = dPi / 180.0
| Constant to convert degrees into radians using `double` precision.
const double | vl::dRAD_TO_DEG = 180.0 / dPi
| Constant to convert radians into degrees using `double` precision.
const float | vl::fPi = (float)3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093845
| Greek Pi constant using `float` precision.
const float | vl::fDEG_TO_RAD = float(dPi / 180.0)
| Constant to convert degrees into radians using `float` precision.
const float | vl::fRAD_TO_DEG = float(180.0 / dPi)
| Constant to convert radians into degrees using `float` precision.

## Define Documentation

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

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

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:29 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.