本文整理汇总了C++中osg::Geode::getNumDrawables方法的典型用法代码示例。如果您正苦于以下问题:C++ Geode::getNumDrawables方法的具体用法?C++ Geode::getNumDrawables怎么用?C++ Geode::getNumDrawables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::Geode
的用法示例。
在下文中一共展示了Geode::getNumDrawables方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void
GeometryValidator::apply(osg::Geode& geode)
{
for(unsigned i=0; i<geode.getNumDrawables(); ++i)
{
osg::Geometry* geom = geode.getDrawable(i)->asGeometry();
if ( geom )
apply( *geom );
}
}
示例2: apply
void apply(osg::Geode& geode)
{
apply(static_cast<osg::Node&>(geode));
for(unsigned int i=0;i<geode.getNumDrawables();++i)
{
osg::Drawable* drawable = geode.getDrawable(i);
if (drawable->getStateSet()) process(drawable->getStateSet());
}
}
示例3: apply
virtual void apply(osg::Geode& geode)
{
apply(geode.getStateSet());
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
{
apply(geode.getDrawable(i)->getStateSet());
osg::Geometry* geometry = geode.getDrawable(i)->asGeometry();
if (geometry) apply(geometry);
}
}
示例4:
unsigned int
WriterNodeVisitor::calcVertices(osg::Geode & geo)
{
unsigned int numVertice = 0;
for (unsigned int i = 0; i < geo.getNumDrawables(); ++i)
{
osg::Geometry *g = geo.getDrawable( i )->asGeometry();
if (g!=NULL && g->getVertexArray()) numVertice += g->getVertexArray()->getNumElements();
}
return numVertice;
}
示例5: writeDrawables
static bool writeDrawables( osgDB::OutputStream& os, const osg::Geode& node )
{
unsigned int size = node.getNumDrawables();
os << size << os.BEGIN_BRACKET << std::endl;
for ( unsigned int i=0; i<size; ++i )
{
os << node.getDrawable(i);
}
os << os.END_BRACKET << std::endl;
return true;
}
示例6: apply
virtual void apply(osg::Geode& geode)
{
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
{
osg::Geometry* geometry = dynamic_cast<osg::Geometry*>(geode.getDrawable(i));
if (geometry)
{
geometry->setUseVertexBufferObjects(true);
}
}
}
示例7: apply
virtual void apply(osg::Geode& geode)
{
apply(geode.getStateSet());
for(unsigned int i=0;i<geode.getNumDrawables();++i)
{
apply(geode.getDrawable(i)->getStateSet());
}
traverse(geode);
}
示例8: apply
void TexCoordVisitor::apply(osg::Geode& geode)
{
for(unsigned int i = 0; i < geode.getNumDrawables(); i++ )
{
osg::Geometry* geom = dynamic_cast<osg::Geometry*>( geode.getDrawable(i) );
if ( geom )
{
// To do
}
}
}
示例9: apply
void apply(osg::Geode& geode)
{
for(unsigned int i=0; i<geode.getNumDrawables();++i)
{
osg::Geometry* geom = geode.getDrawable(i)->asGeometry();
if (geom)
{
osg::notify(osg::NOTICE)<<"Enabling VBO"<<std::endl;
geom->setUseVertexBufferObjects(true);
}
}
}
示例10: apply
virtual void apply(osg::Geode& node)
{
if (node.getStateSet()) isTransparent(*node.getStateSet());
for(unsigned int i=0;i<node.getNumDrawables();++i)
{
osg::Drawable* drawable = node.getDrawable(i);
if (drawable && drawable->getStateSet()) isTransparent(*drawable->getStateSet());
}
traverse(node);
}
示例11: apply
void ProtectTransparencyVisitor::apply( osg::Geode& geode )
{
protectTransparent( geode.getStateSet() );
unsigned int idx;
for( idx=0; idx<geode.getNumDrawables(); idx++ )
{
protectTransparent( geode.getDrawable( idx )->getStateSet() );
}
traverse( geode );
}
示例12: apply
virtual void apply(osg::Geode& node)
{
int nDrawable = node.getNumDrawables();
for(int i=0;i<nDrawable;i++)
{
osg::ref_ptr<osg::Vec3Array> verts = dynamic_cast<osg::Vec3Array*>(node.getDrawable(i)->asGeometry()->getVertexArray());
osg::Vec3Array::iterator iter;
for(iter = verts->begin();iter!=verts->end();iter++)
iter->_v[2]=h;
}
}
示例13: apply
void apply(osg::Geode& geode)
{
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
{
osg::Geometry* geom = geode.getDrawable(i)->asGeometry();
if (geom)
{
osg::Vec3Array* vertices = dynamic_cast<osg::Vec3Array*>(geom->getVertexArray());
if (vertices) updateBound(*vertices);
}
}
}
示例14: traverse
void
SetDataVarianceVisitor::apply(osg::Geode& geode)
{
for(unsigned i=0; i<geode.getNumDrawables(); ++i)
{
osg::Drawable* d = geode.getDrawable(i);
if ( d )
d->setDataVariance( _value );
}
traverse(geode);
}
示例15: apply
void DrawElementTypeSimplifierVisitor::apply(osg::Geode& node)
{
DrawElementTypeSimplifier dets;
unsigned int numDrawables = node.getNumDrawables();
for (unsigned int i = 0; i != numDrawables; ++i)
{
osg::Geometry * geom = dynamic_cast<osg::Geometry*>(node.getDrawable(i));
if (geom) dets.simplify(*geom);
}
osg::NodeVisitor::apply((osg::Node&)node);
}