From: Thomas Geymayer Date: Tue, 1 Jan 2013 13:18:39 +0000 (+0100) Subject: canvas::Element: parse full 3x3 matrix X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=724fba4af9ebdc6a684d6c4a47d4f6af2f31f386;p=simgear.git canvas::Element: parse full 3x3 matrix This doesn't change any existing behaviour but allows specifying full 3x3 matrix to eg. perform a perspective transform needed for some HUDs. --- diff --git a/simgear/canvas/elements/CanvasElement.cxx b/simgear/canvas/elements/CanvasElement.cxx index fff667d7..485c162d 100644 --- a/simgear/canvas/elements/CanvasElement.cxx +++ b/simgear/canvas/elements/CanvasElement.cxx @@ -88,14 +88,24 @@ namespace canvas { case TT_MATRIX: tf = osg::Matrix( tf_node->getDoubleValue("m[0]", 1), - tf_node->getDoubleValue("m[1]", 0), 0, 0, + tf_node->getDoubleValue("m[1]", 0), + 0, + tf_node->getDoubleValue("m[6]", 0), tf_node->getDoubleValue("m[2]", 0), - tf_node->getDoubleValue("m[3]", 1), 0, 0, + tf_node->getDoubleValue("m[3]", 1), + 0, + tf_node->getDoubleValue("m[7]", 0), + + 0, + 0, + 1, + 0, - 0, 0, 1, 0, tf_node->getDoubleValue("m[4]", 0), - tf_node->getDoubleValue("m[5]", 0), 0, 1 ); + tf_node->getDoubleValue("m[5]", 0), + 0, + tf_node->getDoubleValue("m[8]", 1) ); break; case TT_TRANSLATE: tf.makeTranslate( osg::Vec3f( tf_node->getDoubleValue("t[0]", 0),