本文整理汇总了C++中osg::Transform::getReferenceFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ Transform::getReferenceFrame方法的具体用法?C++ Transform::getReferenceFrame怎么用?C++ Transform::getReferenceFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::Transform
的用法示例。
在下文中一共展示了Transform::getReferenceFrame方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void CollectOccludersVisitor::apply(osg::Transform &node)
{
if (isCulled(node))
return;
// push the culling mode.
pushCurrentMask();
ref_ptr<osg::RefMatrix> matrix = createOrReuseMatrix(*getModelViewMatrix());
node.computeLocalToWorldMatrix(*matrix, this);
pushModelViewMatrix(matrix.get(), node.getReferenceFrame());
handle_cull_callbacks_and_traverse(node);
popModelViewMatrix();
// pop the culling mode.
popCurrentMask();
}
示例2: createOrReuseMatrix
void
ProxyCullVisitor::apply(osg::Transform& node)
{
//OE_INFO << "Transform!" << std::endl;
if ( isCulledByProxyFrustum(node) )
return;
_cv->pushOntoNodePath( &node);
_cv->pushCurrentMask();
osg::StateSet* node_state = node.getStateSet();
if (node_state) _cv->pushStateSet(node_state);
// push the current proxy data:
osg::Polytope savedF = _proxyFrustum;
osg::Matrix savedMV = _proxyModelViewMatrix;
// calculate the new proxy frustum:
node.computeLocalToWorldMatrix(_proxyModelViewMatrix, this);
_proxyFrustum.setAndTransformProvidingInverse( _proxyProjFrustum, _proxyModelViewMatrix );
osg::ref_ptr<osg::RefMatrix> matrix = createOrReuseMatrix(*_cv->getModelViewMatrix());
node.computeLocalToWorldMatrix(*matrix,this);
_cv->pushModelViewMatrix(matrix.get(), node.getReferenceFrame());
// traverse children:
handle_cull_callbacks_and_traverse(node);
// restore the previous proxy frustum and MVM
_proxyFrustum = savedF;
_proxyModelViewMatrix = savedMV;
_cv->popModelViewMatrix();
if (node_state) _cv->popStateSet();
_cv->popCurrentMask();
_cv->popFromNodePath();
}
示例3: apply
void CVRCullVisitor::apply(osg::Transform& node)
{
bool status = _cullingStatus;
bool firstStatus = _firstCullStatus;
if(isCulled(node))
{
_firstCullStatus = firstStatus;
_cullingStatus = status;
return;
}
// push the culling mode.
pushCurrentMask();
// push the node's state.
StateSet* node_state = node.getStateSet();
if(node_state)
pushStateSet(node_state);
ref_ptr<RefMatrix> matrix = createOrReuseMatrix(*getModelViewMatrix());
node.computeLocalToWorldMatrix(*matrix,this);
pushModelViewMatrix(matrix.get(),node.getReferenceFrame());
handle_cull_callbacks_and_traverse(node);
popModelViewMatrix();
// pop the node's state off the render graph stack.
if(node_state)
popStateSet();
// pop the culling mode.
popCurrentMask();
_firstCullStatus = firstStatus;
_cullingStatus = status;
}