Hello,
creating a matrix from 3 or 4 Vec3 leaves the element [3][3] as 0. I can
see an argument for this when using the 4 Vec3 version [1], but when
using just 3 Vec3 this seems to be a bug.
For many uses it would probably also be convenient to change the 4
argument c'tor, but I'm less certain about that.
Opinions?
Cheers,
Carsten
[1] it is strictly what the user asked for given that a Vec3 is treated
as having w=0 (although since there is no c'tor taking Vec4 arguments
the user might not be able to express what she wanted in the first place...)
diff --git a/Source/Base/Base/OSGMatrix.inl b/Source/Base/Base/OSGMatrix.inl
index b5ff82c..fa24c50 100644
--- a/Source/Base/Base/OSGMatrix.inl
+++ b/Source/Base/Base/OSGMatrix.inl
@@ -115,6 +115,8 @@ TransformationMatrix<ValueTypeT>::TransformationMatrix(
_matrix[0].setValue(vector1);
_matrix[1].setValue(vector2);
_matrix[2].setValue(vector3);
+
+ _matrix[3][3] = TypeTraits<ValueType>::getOneElement();
}
template<class ValueTypeT> inline
@@ -128,6 +130,8 @@ TransformationMatrix<ValueTypeT>::TransformationMatrix(
_matrix[1].setValue(vector2);
_matrix[2].setValue(vector3);
_matrix[3].setValue(vector4);
+
+ _matrix[3][3] = TypeTraits<ValueType>::getOneElement();
}
template<class ValueTypeT> inline
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core