本文整理汇总了C++中Bounds3f::GetMaxs方法的典型用法代码示例。如果您正苦于以下问题:C++ Bounds3f::GetMaxs方法的具体用法?C++ Bounds3f::GetMaxs怎么用?C++ Bounds3f::GetMaxs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bounds3f
的用法示例。
在下文中一共展示了Bounds3f::GetMaxs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddBounds
//==============================
// OvrDebugLinesLocal::AddBounds
void OvrDebugLinesLocal::AddBounds( Posef const & pose, Bounds3f const & bounds, Vector4f const & color )
{
Vector3f const & mins = bounds.GetMins();
Vector3f const & maxs = bounds.GetMaxs();
Vector3f corners[8];
corners[0] = mins;
corners[7] = maxs;
corners[1] = Vector3f( mins.x, maxs.y, mins.z );
corners[2] = Vector3f( mins.x, maxs.y, maxs.z );
corners[3] = Vector3f( mins.x, mins.y, maxs.z );
corners[4] = Vector3f( maxs.x, mins.y, mins.z );
corners[5] = Vector3f( maxs.x, maxs.y, mins.z );
corners[6] = Vector3f( maxs.x, mins.y, maxs.z );
// transform points
for ( int i = 0; i < 8; ++i )
{
corners[i] = pose.Orientation.Rotate( corners[i] );
corners[i] += pose.Position;
}
AddLine( corners[0], corners[1], color, color, 1, true );
AddLine( corners[1], corners[2], color, color, 1, true );
AddLine( corners[2], corners[3], color, color, 1, true );
AddLine( corners[3], corners[0], color, color, 1, true );
AddLine( corners[7], corners[6], color, color, 1, true );
AddLine( corners[6], corners[4], color, color, 1, true );
AddLine( corners[4], corners[5], color, color, 1, true );
AddLine( corners[5], corners[7], color, color, 1, true );
AddLine( corners[0], corners[4], color, color, 1, true );
AddLine( corners[1], corners[5], color, color, 1, true );
AddLine( corners[2], corners[7], color, color, 1, true );
AddLine( corners[3], corners[6], color, color, 1, true );
}