Vec3 Struct Reference


Detailed Description

Simplify handling of 3 dimensional coordinate.

Definition at line 47 of file MemoryTest.cpp.


Public Member Functions

Vec3 operator+ (const Vec3 &a_other) const
 Add two vectors and return result.
 Vec3 (float a_x, float a_y, float a_z)
 Construct from three elements.
 Vec3 ()
 Default constructor.

Data Fields

float v [3]
 3 float components for axes or dimensions

Constructor & Destructor Documentation

Vec3::Vec3 (  )  [inline]

Default constructor.

Definition at line 50 of file MemoryTest.cpp.

Referenced by operator+().

00050 {}

Vec3::Vec3 ( float  a_x,
float  a_y,
float  a_z 
) [inline]

Construct from three elements.

Definition at line 53 of file MemoryTest.cpp.

References v.

00054   {
00055     v[0] = a_x;
00056     v[1] = a_y;
00057     v[2] = a_z;
00058   }


Member Function Documentation

Vec3 Vec3::operator+ ( const Vec3 a_other  )  const [inline]

Add two vectors and return result.

Definition at line 61 of file MemoryTest.cpp.

References v, and Vec3().

00062   {
00063     return Vec3(v[0] + a_other.v[0], 
00064                 v[1] + a_other.v[1],
00065                 v[2] + a_other.v[2]);
00066   }  


Field Documentation

3 float components for axes or dimensions

Definition at line 68 of file MemoryTest.cpp.

Referenced by BoxesIntersect(), main(), operator+(), and Vec3().


The documentation for this struct was generated from the following file:

Generated on Wed May 5 00:07:01 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6