示例#1
0
文件: WGLWidget.C 项目: GuLinux/wt
void WGLWidget::setJavaScriptMatrix4(JavaScriptMatrix4x4 &jsm,
				     const WGenericMatrix<double, 4, 4> &m)
{
  if (jsm.id() == -1)
    throw WException("JavaScriptMatrix4x4: matrix not initialized");
  if (jsm.hasOperations())
    throw WException("JavaScriptMatrix4x4: matrix was allready operated on");

  // set the server-side copy
  for (unsigned i = 0; i < jsMatrixList_.size(); i++)
    if (jsMatrixList_[i].id == jsm.id())
      jsMatrixList_[i].serverSideCopy = m;

  pImpl_->setJavaScriptMatrix4(jsm, m);
}
示例#2
0
文件: WGLWidget.C 项目: kdeforche/wt
void WGLWidget::addJavaScriptMatrix4(JavaScriptMatrix4x4 &mat)
{
  if (mat.hasContext())
    throw WException("The given matrix is already associated with a WGLWidget!");
  mat.assignToContext(jsValues_++, this);

  jsMatrixList_.push_back(jsMatrixMap(mat.id(), WMatrix4x4()));
}
示例#3
0
文件: WGLWidget.C 项目: GuLinux/wt
void WGLWidget::uniformMatrix4(const UniformLocation &location,
			       const JavaScriptMatrix4x4 &jsm)
{
  if (jsm.id() == -1)
    throw WException("JavaScriptMatrix4x4: matrix not initialized");

  pImpl_->uniformMatrix4(location, jsm);
}