本文整理汇总了C++中osg::Matrix::transpose方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix::transpose方法的具体用法?C++ Matrix::transpose怎么用?C++ Matrix::transpose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::Matrix
的用法示例。
在下文中一共展示了Matrix::transpose方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateStateUniforms
//.........这里部分代码省略.........
vStateVarNames[
CgFXMaterial::CgModelI].c_str());
CgFXMaterial::checkForCgError("cgGetNamedEffectParameter",
NULL);
OSG_ASSERT(pMatrixParam != NULL);
Matrix mModelI = mObj2World;
mModelI.invert();
cgGLSetMatrixParameterfc(pMatrixParam,
mModelI.getValues());
CgFXMaterial::checkForCgError("cgGLSetMatrixParameterfc",
NULL);
}
break;
case CgFXMaterial::CgModelITMask:
{
CGparameter pMatrixParam =
cgGetNamedEffectParameter(
pEffect,
vStateVarNames[
CgFXMaterial::CgModelIT].c_str());
OSG_ASSERT(pMatrixParam != NULL);
Matrix mModelIT = mObj2World;
mModelIT.invert ();
mModelIT.transpose();
cgGLSetMatrixParameterfc(pMatrixParam,
mModelIT.getValues());
CgFXMaterial::checkForCgError("cgGLSetMatrixParameterfc",
NULL);
}
break;
// ---------------------
// ModelView | WorldView
// ---------------------
case CgFXMaterial::CgModelViewMask:
{
CGparameter pMatrixParam =
cgGetNamedEffectParameter(
pEffect,
vStateVarNames[CgFXMaterial::CgModelView].c_str());
CgFXMaterial::checkForCgError("cgGetNamedEffectParameter",
NULL);
OSG_ASSERT(pMatrixParam != NULL);
Matrix mCameraViewing = pEnv->getCameraViewing();
mCameraViewing.mult(mObj2World);
cgGLSetMatrixParameterfc(pMatrixParam,
mCameraViewing.getValues());
示例2: updateStateUniforms
//.........这里部分代码省略.........
}
break;
case CgFXMaterial::CgModelIMask:
{
CGparameter pMatrixParam =
cgGetNamedEffectParameter(
pEffect,
vStateVarNames[
CgFXMaterial::CgModelI].c_str());
OSG_ASSERT(pMatrixParam != NULL);
Matrix mModelI = mObj2World;
mModelI.invert();
cgGLSetMatrixParameterfc(pMatrixParam,
mModelI.getValues());
}
break;
case CgFXMaterial::CgModelITMask:
{
CGparameter pMatrixParam =
cgGetNamedEffectParameter(
pEffect,
vStateVarNames[
CgFXMaterial::CgModelIT].c_str());
OSG_ASSERT(pMatrixParam != NULL);
Matrix mModelIT = mObj2World;
mModelIT.invert ();
mModelIT.transpose();
cgGLSetMatrixParameterfc(pMatrixParam,
mModelIT.getValues());
}
break;
// ---------------------
// ModelView | WorldView
// ---------------------
case CgFXMaterial::CgModelViewMask:
{
CGparameter pMatrixParam =
cgGetNamedEffectParameter(
pEffect,
vStateVarNames[CgFXMaterial::CgModelView].c_str());
OSG_ASSERT(pMatrixParam != NULL);
Matrix mCameraViewing = pEnv->getCameraViewing();
mCameraViewing.mult(mObj2World);
cgGLSetMatrixParameterfc(pMatrixParam,
mCameraViewing.getValues());
}
break;
case CgFXMaterial::CgModelViewIMask:
{
CGparameter pMatrixParam =
cgGetNamedEffectParameter(
pEffect,