²é¿´: 1830|»Ø¸´: 5

getVertexIndices()ΪʲôһֱΪ¿Õ

[¸´ÖÆÁ´½Ó]

¸ÃÓû§´Óδǩµ½

·¢±íÓÚ 2009-4-14 22:37:28 | ÏÔʾȫ²¿Â¥²ã |ÔĶÁģʽ
±¾ÈËÏ룬ͨ¹ý¼Ì³Ðosg::NodeVisitor£¬À´»ñµÃÎļþÈç.osg¸ñʽÖÐËùÓж¥µãµÄ×ø±ê£¬¶¥µãË÷ÒýµÈµÈ£¬µ«ÊÇʹÓÃgetVertexIndices(),Õâ¸öº¯Êý»ñµÃ¶¥µãË÷Òýһֱʧ°Ü£¬Í¨¹ý²é¿´osg::GeometryÀàÐ͵ÄÁÙʱ±äÁ¿£¬·¢ÏÖÆäÖÐÓж¥µãµÄÐÅϢȴûÓж¥µãË÷ÒýµÄÐÅÏ¢£¬ºÜÆæ¹Ö¡£ÓÐûÓÐÈËÓöµ½¹ýÀàËƵÄÎÊÌâÄØ£¬Çë¸ßÊÖ°ïæ½â¾öһϡ£

¸ÃÓû§´Óδǩµ½

·¢±íÓÚ 2009-4-14 22:56:07 | ÏÔʾȫ²¿Â¥²ã
getVertexIndicesÖ»Äܹ»»ñÈ¡setVertexIndicesÉèÖõÄÐÅÏ¢£¬¶øÊÂʵÉÏÕâ¸öº¯ÊýÒѾ­»ù±¾ÆúÓÃÁË£¬Ö»ÊÇÓÃÀ´±£³ÖºÍÔçÆÚ°æ±¾µÄ¼æÈÝ£»ÎÒÃÇͨ³£¶¼»áʹÓÃaddPrimitiveSetÌí¼ÓÒ»¸öͼԪÐòÁУ¨ÀýÈçDrawElementsUInt£©²¢ÔÚÆäÖÐÉèÖö¥µãµÄË÷ÒýÊý¾Ý£¬Òò´ËҪȡµÃ¶¥µãË÷ÒýµÄ»°£¬Ó¦µ±Ê¹ÓÃgetPrimitiveSet²¢¸ù¾ÝËù»ñȡͼԪÐòÁеÄÀàÐÍÌáÈ¡ÏàÓ¦ÐÅÏ¢

¸ÃÓû§´Óδǩµ½

 Â¥Ö÷| ·¢±íÓÚ 2009-4-14 22:59:50 | ÏÔʾȫ²¿Â¥²ã
ʾÒâ´úÂëÈçÏÂ

class A:public osg::NodeVisitor
{
  A()sg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
{
   .......
}

void apply( osg::Geode& geode )
{
  for( unsigned int i=0; i < geode.getNumDrawables(); ++i )
{
//¾ÍÊÇÔÚÏÂÃæµÄ´úÂ봦һֱΪ¿Õ£¬¼´Ö¸Õëverts_index ==NULL
   osg::ShortArray* verts_index = dynamic_cast<osg::ShortArray*>(geom->getVertexIndices());
}

};

void main()
{
osg::Node* node = osgDB::readNodeFile("part1.3ds");
A a;
node->accept(a);
}
}

¸ÃÓû§´Óδǩµ½

 Â¥Ö÷| ·¢±íÓÚ 2009-4-14 23:00:43 | ÏÔʾȫ²¿Â¥²ã

»Ø¸´ 2Â¥ µÄÌû×Ó

ÕâÑù°¡£¬¶àлarray£¬ÊÔÊÔÏÈ

¸ÃÓû§´Óδǩµ½

·¢±íÓÚ 2010-4-29 17:05:40 | ÏÔʾȫ²¿Â¥²ã
Â¥Ö÷Äܲ»ÄÜ°ÑÄãÈçºÎµÃµ½¶¥µãË÷ÒýµÄ´úÂëÌù³öÀ´£¬Ð»Ð»ÁË¡£ÎÒÓÃÁËgetVertexIndices£¨£©·½·¨ÊÔÁË£¬¸úÂ¥Ö÷Ò»Ñù£¬²»ÐС£µ«ÊÇÎÒ²»ÖªµÀÓÃprimitivesetÔõôʵÏÖ£¿ËùÒÔÀ´ÕÒÂ¥Ö÷°ïæÁË¡£

¸ÃÓû§´Óδǩµ½

·¢±íÓÚ 2010-4-30 08:21:24 | ÏÔʾȫ²¿Â¥²ã
¿´Ò»¿´osggeometryÀý×Ó£¬ÔÙ´ÎÖØÉêһϣºÓÀÔ¶¶¼²»ÒªÊ¹ÓÃsetVertexIndices()ÕâÑùµÄº¯Êý£¬³ý·ÇÄúÕæµÄ¹¤×÷ÔÚһ̨ʮ·Ö¹ÅÀϵĻúÆ÷ÉÏ
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | ×¢²á

±¾°æ»ý·Ö¹æÔò

OSGÖйú¹Ù·½ÂÛ̳-ÓÐÄúOSGÔÚÖйú²Å¸üºÃ

ÍøÕ¾¼ò½é£ºosgChinaÊǹúÄÚÊ׸öÈýάÏà¹Ø¼¼Êõ¿ªÔ´ÉçÇø£¬Ö¼ÔÚΪ¹úÄÚ¸ü¶àµÄ¼¼Êõ¿ª·¢ÈËÔ±Ìṩ×îÇ°Ñصļ¼Êõ×ÊѶ£¬Îª¸ü¶àµÄÈýά´ÓÒµÕßÌṩһ¸öѧϰ¡¢½»Á÷µÄ¼¼Êõƽ̨¡£

ÁªÏµÎÒÃÇ

  • ¹¤×÷ʱ¼ä£º09:00--18:00
  • ·´À¡ÓÊÏ䣺1315785073@qq.com
¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí