本文整理汇总了C++中SMeshBuffer::append方法的典型用法代码示例。如果您正苦于以下问题:C++ SMeshBuffer::append方法的具体用法?C++ SMeshBuffer::append怎么用?C++ SMeshBuffer::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMeshBuffer
的用法示例。
在下文中一共展示了SMeshBuffer::append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SMeshBuffer
Sprite::Sprite(std::string const& name, bool const& center)
:Object(name), center_(center), thismesh_(0)
{
if( !sprite_plane_ptr_ ) {
S3DVertex vertices[4];
u16 indices[6] = {0,2,3,3,1,0};
vertices[0].Pos = vector3df(0,-1,0);
vertices[1].Pos = vector3df(1,-1,0);
vertices[2].Pos = vector3df(0, 0,0);
vertices[3].Pos = vector3df(1, 0,0);
vertices[0].Normal = vector3df(0,0,-1);
vertices[1].Normal = vector3df(0,0,-1);
vertices[2].Normal = vector3df(0,0,-1);
vertices[3].Normal = vector3df(0,0,-1);
vertices[0].TCoords = vector2df(0,1);
vertices[1].TCoords = vector2df(1,1);
vertices[2].TCoords = vector2df(0,0);
vertices[3].TCoords = vector2df(1,0);
SMeshBuffer* buf = new SMeshBuffer();
buf->append(vertices, 4, indices, 6);
sprite_plane_.addMeshBuffer( buf );
sprite_plane_.recalculateBoundingBox();
sprite_plane_ptr_ = &sprite_plane_;
buf->drop(); //the addMeshBuffer method will grab it, so we can drop this ptr.
}
}