本文整理汇总了C++中ModelPtr::boundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelPtr::boundingBox方法的具体用法?C++ ModelPtr::boundingBox怎么用?C++ ModelPtr::boundingBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelPtr
的用法示例。
在下文中一共展示了ModelPtr::boundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void EditorChunkFlare::draw()
{
if (!edShouldDraw())
return;
ModelPtr model = reprModel();
if( WorldManager::instance().drawSelection() && model)
{
// draw a some points near the centre of the reprModel, so the system
// can be selected from the distance where the repr model might be
// smaller than a pixel and fail to draw.
Moo::rc().push();
Moo::rc().world( chunk()->transform() );
Moo::rc().preMultiply( edTransform() );
// bias of half the size of the representation model's bounding box in
// the vertical axis, because the object might be snapped to terrain
// or another object, so the centre might be below something else.
float bias = model->boundingBox().width() / 2.0f;
Vector3 points[3];
points[0] = Vector3( 0.0f, -bias, 0.0f );
points[1] = Vector3( 0.0f, 0.0f, 0.0f );
points[2] = Vector3( 0.0f, bias, 0.0f );
Geometrics::drawPoints( points, 3, 3.0f, (DWORD)this );
Moo::rc().pop();
}
EditorChunkSubstance<ChunkFlare>::draw();
}