当前位置: 首页>>代码示例>>C++>>正文


C++ Geode::getNumDrawables方法代码示例

本文整理汇总了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 );
    }
}
开发者ID:bblu,项目名称:osgearth,代码行数:10,代码来源:Utils.cpp

示例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());
        }
    }
开发者ID:PerhapsCaiv,项目名称:osg,代码行数:10,代码来源:Timeout.cpp

示例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);
     }
 }
开发者ID:aalex,项目名称:osg,代码行数:10,代码来源:GraphicsCostEstimator.cpp

示例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;
}
开发者ID:artoolkit,项目名称:osg,代码行数:11,代码来源:WriterNodeVisitor.cpp

示例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;
}
开发者ID:151706061,项目名称:OpenSceneGraph,代码行数:11,代码来源:Geode.cpp

示例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);
         }
     }
 }
开发者ID:AnthonyYou,项目名称:osg,代码行数:11,代码来源:osgshadow.cpp

示例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);
        }
开发者ID:AdriCS,项目名称:osg,代码行数:11,代码来源:osgmovie.cpp

示例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
      }
    }
}
开发者ID:ijk123,项目名称:osgModeling,代码行数:11,代码来源:TexCoordVisitor.cpp

示例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);
         }
     }
 }
开发者ID:AdriCS,项目名称:osg,代码行数:12,代码来源:osgcamera.cpp

示例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);
    }
开发者ID:3dcl,项目名称:osg,代码行数:12,代码来源:osgconv.cpp

示例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 );
}
开发者ID:NaohiroHayashi,项目名称:bulletsim,代码行数:12,代码来源:TransparencyUtils.cpp

示例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;

		}
	}
开发者ID:HEShuang,项目名称:3DCityLoD,代码行数:12,代码来源:MapExtruder.cpp

示例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);
         }
     }
 }
开发者ID:toothing,项目名称:osg,代码行数:12,代码来源:osgfilecache.cpp

示例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);
}
开发者ID:Joe-Wong,项目名称:osgearth,代码行数:12,代码来源:Utils.cpp

示例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);
}
开发者ID:yueying,项目名称:osg,代码行数:13,代码来源:DrawElementTypeSimplifier.cpp


注:本文中的osg::Geode::getNumDrawables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。