MinGfx Toolkit  1.0
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
Classes | Namespaces | Functions
vector2.h File Reference
#include <iostream>
#include "point2.h"

Go to the source code of this file.

Classes

class  mingfx::Vector2
 A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements, and screen-space vectors. More...
 

Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 

Functions

Vector2 mingfx::operator/ (const Vector2 &v, const float s)
 Divide the vector by the scalar s. More...
 
Vector2 mingfx::operator* (const float s, const Vector2 &v)
 Multiply the vector by the scalar s. More...
 
Vector2 mingfx::operator* (const Vector2 &v, const float s)
 Multiply the vector by the scalar s. More...
 
Vector2 mingfx::operator- (const Vector2 &v)
 Negate the vector. More...
 
Point2 mingfx::operator+ (const Vector2 &v, const Point2 &p)
 Adds a vector and a point, returns a point. More...
 
Point2 mingfx::operator+ (const Point2 &p, const Vector2 &v)
 Adds a point and a vector, returns a point. More...
 
Vector2 mingfx::operator+ (const Vector2 &v1, const Vector2 &v2)
 Adds a vector and a vector, returns a vector. More...
 
Point2 mingfx::operator- (const Point2 &p, const Vector2 &v)
 Subtracts a vector from a point, returns a point. More...
 
Vector2 mingfx::operator- (const Vector2 &v1, const Vector2 &v2)
 Subtracts v2 from v1, returns a vector. More...
 
Vector2 mingfx::operator- (const Point2 &p1, const Point2 &p2)
 Returns the vector spanning p1 and p2. More...
 
std::ostream & mingfx::operator<< (std::ostream &os, const Vector2 &v)
 
std::istream & mingfx::operator>> (std::istream &is, Vector2 &v)