diff --git a/include/vsg/app/ViewMatrix.h b/include/vsg/app/ViewMatrix.h index 41c41b43a..4bbc022da 100644 --- a/include/vsg/app/ViewMatrix.h +++ b/include/vsg/app/ViewMatrix.h @@ -36,9 +36,9 @@ namespace vsg /// scenes where standrd double precision is insufficient for avoiding visually significant numerical errors. dvec3 origin; - virtual dmat4 transform(const vsg::dvec3& offset={}) const = 0; + virtual dmat4 transform(const vsg::dvec3& offset = {}) const = 0; - virtual dmat4 inverse(const vsg::dvec3& offset={}) const + virtual dmat4 inverse(const vsg::dvec3& offset = {}) const { return vsg::inverse(transform(offset)); } @@ -88,7 +88,7 @@ namespace vsg void set(const dmat4& matrix); - dmat4 transform(const dvec3& offset={}) const override; + dmat4 transform(const dvec3& offset = {}) const override; void read(Input& input) override; void write(Output& output) const override; @@ -103,7 +103,6 @@ namespace vsg class VSG_DECLSPEC LookDirection : public vsg::Inherit { public: - LookDirection() : position(0.0, 0.0, 0.0), rotation() @@ -124,11 +123,10 @@ namespace vsg void set(const dmat4& matrix); - dmat4 transform(const dvec3& offset={}) const override; + dmat4 transform(const dvec3& offset = {}) const override; }; VSG_type_name(vsg::LookDirection); - /// RelativeViewMatrix is a ViewMatrix that decorates another ViewMatrix and pre-multiplies its transform matrix to give a relative view matrix. class VSG_DECLSPEC RelativeViewMatrix : public Inherit { @@ -140,7 +138,7 @@ namespace vsg } /// returns matrix * viewMatrix->transform() - dmat4 transform(const vsg::dvec3& offset={}) const override; + dmat4 transform(const vsg::dvec3& offset = {}) const override; dmat4 matrix; ref_ptr viewMatrix; @@ -163,8 +161,8 @@ namespace vsg objectPath(path.begin(), path.end()) {} /// returns matrix * computeTransfrom(objectPath) - dmat4 transform(const vsg::dvec3& offset={}) const override; - dmat4 inverse(const vsg::dvec3& offset={}) const override; + dmat4 transform(const vsg::dvec3& offset = {}) const override; + dmat4 inverse(const vsg::dvec3& offset = {}) const override; dmat4 matrix; RefObjectPath objectPath; diff --git a/include/vsg/core/Array3D.h b/include/vsg/core/Array3D.h index 953446d2a..bc5ddb732 100644 --- a/include/vsg/core/Array3D.h +++ b/include/vsg/core/Array3D.h @@ -396,11 +396,11 @@ namespace vsg VSG_array3D(svec2Array3D, svec2); VSG_array3D(svec3Array3D, svec3); VSG_array3D(svec4Array3D, svec4); - + VSG_array3D(usvec2Array3D, usvec2); VSG_array3D(usvec3Array3D, usvec3); VSG_array3D(usvec4Array3D, usvec4); - + VSG_array3D(ubvec2Array3D, ubvec2); VSG_array3D(ubvec3Array3D, ubvec3); VSG_array3D(ubvec4Array3D, ubvec4); diff --git a/include/vsg/maths/box.h b/include/vsg/maths/box.h index 538ab72ae..80ab988d0 100644 --- a/include/vsg/maths/box.h +++ b/include/vsg/maths/box.h @@ -88,8 +88,8 @@ namespace vsg } }; - using box = t_box; /// float box class - using dbox = t_box; /// double box class + using box = t_box; /// float box class + using dbox = t_box; /// double box class using ldbox = t_box; /// double box class VSG_type_name(vsg::box); diff --git a/include/vsg/maths/mat4.h b/include/vsg/maths/mat4.h index ef3b1410a..ee8d9a870 100644 --- a/include/vsg/maths/mat4.h +++ b/include/vsg/maths/mat4.h @@ -119,8 +119,8 @@ namespace vsg const T* data() const { return value[0].data(); } }; - using mat4 = t_mat4; /// float 4x4 matrix - using dmat4 = t_mat4; /// double 4x4 matrix + using mat4 = t_mat4; /// float 4x4 matrix + using dmat4 = t_mat4; /// double 4x4 matrix using ldmat4 = t_mat4; /// long double 4x4 matrix VSG_type_name(vsg::mat4); diff --git a/include/vsg/maths/quat.h b/include/vsg/maths/quat.h index 5d831e19f..726097b3d 100644 --- a/include/vsg/maths/quat.h +++ b/include/vsg/maths/quat.h @@ -145,8 +145,8 @@ namespace vsg explicit operator bool() const noexcept { return value[0] != 0.0 || value[1] != 0.0 || value[2] != 0.0 || value[3] != 0.0; } }; - using quat = t_quat; /// float quaternion - using dquat = t_quat; /// double quaternion + using quat = t_quat; /// float quaternion + using dquat = t_quat; /// double quaternion using ldquat = t_quat; /// long double quaternion VSG_type_name(vsg::quat); diff --git a/include/vsg/maths/sphere.h b/include/vsg/maths/sphere.h index 23714aec3..587972d6b 100644 --- a/include/vsg/maths/sphere.h +++ b/include/vsg/maths/sphere.h @@ -120,8 +120,8 @@ namespace vsg } }; - using sphere = t_sphere; /// float sphere class - using dsphere = t_sphere; /// double sphere class + using sphere = t_sphere; /// float sphere class + using dsphere = t_sphere; /// double sphere class using ldsphere = t_sphere; /// long double sphere class VSG_type_name(vsg::sphere); diff --git a/include/vsg/maths/vec2.h b/include/vsg/maths/vec2.h index 1f789641f..899ed2bd4 100644 --- a/include/vsg/maths/vec2.h +++ b/include/vsg/maths/vec2.h @@ -136,15 +136,15 @@ namespace vsg explicit operator bool() const noexcept { return value[0] != 0.0 || value[1] != 0.0; } }; - using vec2 = t_vec2; // float 2D vector - using dvec2 = t_vec2; // double 2D vector - using ldvec2 = t_vec2; // long double 2D vector - using bvec2 = t_vec2; // signed 8 bit integer 2D vector - using svec2 = t_vec2; // signed 16 bit integer 2D vector - using ivec2 = t_vec2; // signed 32 bit integer 2D vector - using ubvec2 = t_vec2; // unsigned 8 bit integer 2D vector - using usvec2 = t_vec2; // unsigned 16 bit integer 2D vector - using uivec2 = t_vec2; // unsigned 32 bit integer 2D vector + using vec2 = t_vec2; // float 2D vector + using dvec2 = t_vec2; // double 2D vector + using ldvec2 = t_vec2; // long double 2D vector + using bvec2 = t_vec2; // signed 8 bit integer 2D vector + using svec2 = t_vec2; // signed 16 bit integer 2D vector + using ivec2 = t_vec2; // signed 32 bit integer 2D vector + using ubvec2 = t_vec2; // unsigned 8 bit integer 2D vector + using usvec2 = t_vec2; // unsigned 16 bit integer 2D vector + using uivec2 = t_vec2; // unsigned 32 bit integer 2D vector VSG_type_name(vsg::vec2); VSG_type_name(vsg::dvec2); diff --git a/include/vsg/maths/vec3.h b/include/vsg/maths/vec3.h index 3d927f91f..bccf6962e 100644 --- a/include/vsg/maths/vec3.h +++ b/include/vsg/maths/vec3.h @@ -144,15 +144,15 @@ namespace vsg explicit operator bool() const noexcept { return value[0] != 0.0 || value[1] != 0.0 || value[2] != 0.0; } }; - using vec3 = t_vec3; // float 3D vector - using dvec3 = t_vec3; // double 3D vector - using ldvec3 = t_vec3; // long double 3D vector - using bvec3 = t_vec3; // signed 8 bit integer 3D vector - using svec3 = t_vec3; // signed 16 bit integer 3D vector - using ivec3 = t_vec3; // signed 32 bit integer 3D vector - using ubvec3 = t_vec3; // unsigned 8 bit integer 3D vector - using usvec3 = t_vec3; // unsigned 16 bit integer 3D vector - using uivec3 = t_vec3; // unsigned 32 bit integer 3D vector + using vec3 = t_vec3; // float 3D vector + using dvec3 = t_vec3; // double 3D vector + using ldvec3 = t_vec3; // long double 3D vector + using bvec3 = t_vec3; // signed 8 bit integer 3D vector + using svec3 = t_vec3; // signed 16 bit integer 3D vector + using ivec3 = t_vec3; // signed 32 bit integer 3D vector + using ubvec3 = t_vec3; // unsigned 8 bit integer 3D vector + using usvec3 = t_vec3; // unsigned 16 bit integer 3D vector + using uivec3 = t_vec3; // unsigned 32 bit integer 3D vector VSG_type_name(vsg::vec3); VSG_type_name(vsg::dvec3); diff --git a/include/vsg/maths/vec4.h b/include/vsg/maths/vec4.h index 149c3009c..4ed3eb08c 100644 --- a/include/vsg/maths/vec4.h +++ b/include/vsg/maths/vec4.h @@ -174,15 +174,15 @@ namespace vsg explicit operator bool() const noexcept { return value[0] != 0.0 || value[1] != 0.0 || value[2] != 0.0 || value[3] != 0.0; } }; - using vec4 = t_vec4; // float 4D vector - using dvec4 = t_vec4; // double 4D vector - using ldvec4 = t_vec4; // long double 4D vector - using bvec4 = t_vec4; // signed 8 bit integer 4D vector - using svec4 = t_vec4; // signed 16 bit integer 4D vector - using ivec4 = t_vec4; // signed 32 bit integer 4D vector - using ubvec4 = t_vec4; // unsigned 8 bit integer 4D vector - using usvec4 = t_vec4; // unsigned 16 bit integer 4D vector - using uivec4 = t_vec4; // unsigned 32 bit integer 4D vector + using vec4 = t_vec4; // float 4D vector + using dvec4 = t_vec4; // double 4D vector + using ldvec4 = t_vec4; // long double 4D vector + using bvec4 = t_vec4; // signed 8 bit integer 4D vector + using svec4 = t_vec4; // signed 16 bit integer 4D vector + using ivec4 = t_vec4; // signed 32 bit integer 4D vector + using ubvec4 = t_vec4; // unsigned 8 bit integer 4D vector + using usvec4 = t_vec4; // unsigned 16 bit integer 4D vector + using uivec4 = t_vec4; // unsigned 32 bit integer 4D vector VSG_type_name(vsg::vec4); VSG_type_name(vsg::dvec4); diff --git a/src/vsg/app/RecordTraversal.cpp b/src/vsg/app/RecordTraversal.cpp index b084978ac..1c06fc9ed 100644 --- a/src/vsg/app/RecordTraversal.cpp +++ b/src/vsg/app/RecordTraversal.cpp @@ -27,6 +27,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include #include #include +#include #include #include #include @@ -35,7 +36,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include #include #include -#include #include #include #include diff --git a/src/vsg/app/ViewMatrix.cpp b/src/vsg/app/ViewMatrix.cpp index 8c77d74d4..7f2fa6ee9 100644 --- a/src/vsg/app/ViewMatrix.cpp +++ b/src/vsg/app/ViewMatrix.cpp @@ -62,7 +62,7 @@ void LookDirection::set(const dmat4& matrix) dmat4 LookDirection::transform(const dvec3& offset) const { - return vsg::rotate(-rotation) * vsg::translate(offset-origin-position); + return vsg::rotate(-rotation) * vsg::translate(offset - origin - position); } dmat4 RelativeViewMatrix::transform(const dvec3& offset) const @@ -72,7 +72,7 @@ dmat4 RelativeViewMatrix::transform(const dvec3& offset) const dmat4 TrackingViewMatrix::transform(const dvec3& offset) const { - return matrix * vsg::translate(offset-origin) * vsg::inverse(computeTransform(objectPath)); + return matrix * vsg::translate(offset - origin) * vsg::inverse(computeTransform(objectPath)); } dmat4 TrackingViewMatrix::inverse(const dvec3& offset) const diff --git a/src/vsg/utils/Intersector.cpp b/src/vsg/utils/Intersector.cpp index 10309aeb2..9de7d9ab3 100644 --- a/src/vsg/utils/Intersector.cpp +++ b/src/vsg/utils/Intersector.cpp @@ -27,9 +27,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include #include #include -#include #include #include +#include using namespace vsg;