Rev 306 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#ifndef __CGLA_VEC3D_H__
#define __CGLA_VEC3D_H__
#include "ArithVec.h"
#include "Vec3i.h"
#include "Vec3f.h"
namespace CGLA {
/** A 3D double vector. Useful for high precision arithmetic. */
class Vec3d: public ArithVec3Float<double,Vec3d>
{
public:
/// Construct 0 vector
Vec3d(){}
/// Construct vector
Vec3d(double a, double b, double c): ArithVec3Float<double,Vec3d>(a,b,c) {}
/// Construct vector where all coords = a
explicit Vec3d(double a):
ArithVec3Float<double,Vec3d>(a,a,a) {}
/// Convert from int vector
explicit Vec3d(const Vec3i& v):
ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
/// Convert from float vector
explicit Vec3d(const Vec3f& v):
ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
};
}
#endif