WGLWidget::JavaScriptMatrix4x4 WGLWidget::JavaScriptMatrix4x4::operator*(const WGenericMatrix<double, 4, 4> &m) const { std::stringstream ss; ss << WT_CLASS ".glMatrix.mat4.multiply(" << jsRef_ << ","; WGenericMatrix<double, 4, 4> t(m.transposed()); renderfv(ss, t.data().begin(), t.data().end()); ss << ", " WT_CLASS ".glMatrix.mat4.create())"; return WGLWidget::JavaScriptMatrix4x4(ss.str()); }
WGLWidget::JavaScriptMatrix4x4 WGLWidget::JavaScriptMatrix4x4::operator*(const WGenericMatrix<double, 4, 4> &m) const #else WGLWidget::JavaScriptMatrix4x4 WGLWidget::JavaScriptMatrix4x4::multiply(const WGenericMatrix<double, 4, 4> &m) const #endif { if (!initialized()) throw WException("JavaScriptMatrix4x4: matrix not initialized"); WGLWidget::JavaScriptMatrix4x4 copy = WGLWidget::JavaScriptMatrix4x4(*this); std::stringstream ss; ss << WT_CLASS ".glMatrix.mat4.multiply(" << jsRef_ << ","; WGenericMatrix<double, 4, 4> t(m.transposed()); #ifndef WT_TARGET_JAVA WClientGLWidget::renderfv(ss, t, context_->pImpl_->arrayType()); #else renderfv(ss, t, context_->pImpl_->arrayType()); #endif ss << ", " WT_CLASS ".glMatrix.mat4.create())"; copy.jsRef_ = ss.str(); copy.operations_.push_back(op::MULTIPLY); copy.matrices_.push_back(m); return copy; }