osg.VertexArrayStateList是OpenSceneGraph中的一个类,它用于维护顶点数组状态列表,例如顶点坐标、颜色、法线、纹理坐标等。
osg::VertexArrayStateList()
: 创建一个VertexArrayStateList对象。void osg::VertexArrayStateList::push_back(osg::VertexArrayState* vas)
: 将一个VertexArrayState指针添加到列表末尾。osg::VertexArrayState* osg::VertexArrayStateList::operator[](unsigned int i)
: 获取列表中第i个VertexArrayState指针。const osg::VertexArrayState* osg::VertexArrayStateList::operator[](unsigned int i) const
: 获取列表中第i个VertexArrayState指针(常量版本)。void osg::VertexArrayStateList::clear()
: 清空列表。bool osg::VertexArrayStateList::empty() const
: 判断列表是否为空。unsigned int osg::VertexArrayStateList::size() const
: 返回列表中VertexArrayState指针的数量。osg::ref_ptr<osg::VertexArrayStateList> vasList = new osg::VertexArrayStateList;
...
osg::ref_ptr<osg::VertexArrayState> vas = new osg::VertexArrayState;
...
vasList->push_back(vas);
...
for(unsigned int i=0; i<vasList->size(); i++)
{
osg::VertexArrayState* vas = (*vasList)[i];
...
}