Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

anoid::simple Namespace Reference

Simple datatypes. More...


Compounds

class  Matrix
class  Point
class  Vector

Functions

const Vector O (0, 0, 0)
const Vector I (1, 1, 1)
const Vector i (1, 0, 0)
const Vector j (0, 1, 0)
const Vector k (0, 0, 1)
Vector operator+ (const Vector &a, const Vector &b)
Vector operator+= (Vector &a, const Vector &b)
Vector operator- (const Vector &a, const Vector &b)
Vector operator * (const double c, const Vector &a)
Vector operator * (const Vector &a, const double c)
double operator * (const Vector &a, const Vector &b)
Vector operator% (const Vector &a, const Vector &b)
ostream & operator<< (ostream &s, const Vector &a)
Vector operator * (const double *d, const Vector &a)
Vector operator * (const Vector &a, const double *d)


Detailed Description

Simple datatypes.

Function Documentation

const Vector i  ,
 ,
 
 

Referenced by ASC::ASC(), CLoad3DS::computeNormals(), anoid::base::Message::fire(), anoid::main::World::fireEvents(), anoid::plugin::Gravitation::getApplicationPoint(), anoid::config::XMLConfiguration::getChildren(), anoid::loader::Loader::includeInformation(), anoid::plugin::AscShape::init(), o3dsShape::init(), anoid::loader::Loader::load(), anoid::base::Object::Object(), CLoad3DS::readObjectMaterial(), CLoad3DS::readVertexIndices(), anoid::base::Object::receive(), anoid::base::Object::redraw(), anoid::base::Element::redraw(), anoid::base::Object::update(), anoid::plugin::Dynamics::update(), and ASC::~ASC().

const Vector I  ,
 ,
 
 

the unit-vecotr

Referenced by anoid::plugin::Color::Color(), and anoid::plugin::Scale::Scale().

const Vector j  ,
 ,
 
 

Referenced by CLoad3DS::computeNormals(), anoid::main::World::fireEvents(), anoid::loader::Loader::includeInformation(), o3dsShape::init(), CLoad3DS::readVertexIndices(), and anoid::plugin::Dynamics::receive().

const Vector k  ,
 ,
 
 

Referenced by anoid::main::Anoid::handleKeyDown(), anoid::main::Anoid::handleKeyUp(), and anoid::plugin::anoid::Pad::receive().

const Vector O  ,
 ,
 
 

the 0-vector

Referenced by anoid::plugin::Gravitation::getApplicationPoint(), anoid::plugin::Gravitation::getForce(), anoid::plugin::Dynamics::receive(), anoid::plugin::Dynamics::update(), and Vertex::Vertex().

Vector operator * const Vector   a,
const double *    d
 

Multiply vector with a matrix from the right. The matrix is assumed to be a 4x4 matrix as a double[16] in column-major order (like for OpenGL). Only the upper left 3x3 part of the matrix is used.

Parameters:
a  the vector v
d  the matrix A
Returns:
the vector (v*A)*

Definition at line 96 of file vector.cc.

References Vector(), anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

Vector operator * const double *    d,
const Vector   a
 

Multiply vector with a matrix from the left. The matrix is assumed to be a 4x4 matrix as a double[16] in column-major order (like for OpenGL). Only the upper left 3x3 part of the matrix is used.

Parameters:
d  the matrix A
a  the vector v
Returns:
the vector Av

Definition at line 90 of file vector.cc.

References Vector(), anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

double operator * const Vector   a,
const Vector   b
 

operator * calculates the dot-product between two vectors

Parameters:
a  the first vector
b  the second vector
Returns:
the dot-product between a and b - a double

Definition at line 77 of file vector.cc.

References anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

Vector operator * const Vector   a,
const double    c
 

operator * calculates the vector where all coordinates have been multiplied by c from right

Parameters:
a  the vector that is to be multiplied
c  the constant to multiply the vector coordinates by
Returns:
a*c - a new vector

Definition at line 73 of file vector.cc.

Vector operator * const double    c,
const Vector   a
 

operator * calculates the vector where all coordinates have been multiplied by c from left

Parameters:
c  the constant to multiply the vector coordinates by
a  the vector that is to be multiplied
Returns:
c*a - a new vector

Definition at line 69 of file vector.cc.

References Vector(), anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

Vector operator% const Vector   a,
const Vector   b
 

operator% calculates the cross product of two vectors

Parameters:
a  the first vector
b  the second vector
Returns:
the cross product between a and b - a vector

Definition at line 81 of file vector.cc.

References Vector(), anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

Vector operator+ const Vector   a,
const Vector   b
 

operator+ adds two vectors

Parameters:
a  the first vector
b  the second vector
Returns:
the sum of the two vectors - a new vector

Definition at line 47 of file vector.cc.

References Vector(), anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

Vector operator+= Vector   a,
const Vector   b
 

operator+= adds two vectors, save value in first

Parameters:
a  the first vector
b  the second vector
Returns:
the sum of the two vectors this is the same as a

Definition at line 51 of file vector.cc.

References anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.

Vector operator- const Vector   a,
const Vector   b
 

operator- substract two vectors

Parameters:
a  the first vector
b  the second vector
Returns:
a-b - a new vector

Definition at line 65 of file vector.cc.

ostream& operator<< std::ostream &    s,
const Vector   a
 

operator<< prints the vector

Parameters:
s  the ostream where a is send to
a  the vector to be printed
Returns:
the ostream

Definition at line 85 of file vector.cc.

References anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z.


Anoid NG © Michael Westergaard, Martin Stig Stissing, Ronni Michael Laursen, and Kristian Bisgaard Lassen