|
@@ -5,7 +5,7 @@
|
|
|
|
|
|
|
|
namespace Framework
|
|
namespace Framework
|
|
|
{
|
|
{
|
|
|
- template<typename T>
|
|
|
|
|
|
|
+ template<typename T, T defaultValue = (T)0>
|
|
|
//! A 3D vector
|
|
//! A 3D vector
|
|
|
class Vec3
|
|
class Vec3
|
|
|
{
|
|
{
|
|
@@ -15,7 +15,11 @@ namespace Framework
|
|
|
T z; //! Z component of the vector
|
|
T z; //! Z component of the vector
|
|
|
|
|
|
|
|
//! Constructor
|
|
//! Constructor
|
|
|
- inline Vec3() {}
|
|
|
|
|
|
|
+ inline Vec3()
|
|
|
|
|
+ : x(defaultValue),
|
|
|
|
|
+ y(defaultValue),
|
|
|
|
|
+ z(defaultValue)
|
|
|
|
|
+ {}
|
|
|
|
|
|
|
|
//! Constructor
|
|
//! Constructor
|
|
|
//! \param x The X component of the new vector
|
|
//! \param x The X component of the new vector
|