3es  0.7
3esv3arg.h
1 //
2 // author: Kazys Stepanas
3 //
4 #ifndef _3ESV3ARG_H_
5 #define _3ESV3ARG_H_
6 
7 #include "3es-core.h"
8 
9 #include "3esvector3.h"
10 
11 namespace tes
12 {
14  struct V3Arg
15  {
18  inline V3Arg(const float v[3]) : v3(v) {}
21  inline V3Arg(const double v[3]) : v3(Vector3d(v)) {}
24  inline V3Arg(const Vector3f &v) : v3(v) {}
27  inline V3Arg(const Vector3d &v) : v3(v) {}
28 
33  inline V3Arg(float x, float y, float z) : v3(x, y, z) {}
34 
37  inline operator Vector3f() const { return v3; }
38 
42  inline float operator[](int i) const { return v3[i]; }
43 
46  };
47 }
48 
49 #endif // _3ESV3ARG_H_
V3Arg(const Vector3d &v)
Double precision vector constructor.
Definition: 3esv3arg.h:27
V3Arg(const float v[3])
Single precision pointer constructor.
Definition: 3esv3arg.h:18
Definition: 3esbounds.h:13
Vector3< float > Vector3f
Defines a single precision vector.
Definition: 3esvector3.h:14
V3Arg(float x, float y, float z)
Component wise constructor.
Definition: 3esv3arg.h:33
V3Arg(const Vector3f &v)
Single precision vector constructor.
Definition: 3esv3arg.h:24
Vector3f v3
Vector 3 value.
Definition: 3esv3arg.h:45
Represents a vector in R3.
Definition: 3esvector3.h:14
A helper structure used to convert from float or double pointers to Vector3f arguments.
Definition: 3esv3arg.h:14
float operator[](int i) const
Indexing operator.
Definition: 3esv3arg.h:42
V3Arg(const double v[3])
Double precision pointer constructor.
Definition: 3esv3arg.h:21