本文整理汇总了C++中BoundBox::ResetBounds方法的典型用法代码示例。如果您正苦于以下问题:C++ BoundBox::ResetBounds方法的具体用法?C++ BoundBox::ResetBounds怎么用?C++ BoundBox::ResetBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoundBox
的用法示例。
在下文中一共展示了BoundBox::ResetBounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
//-----------------------------------------------------------------------------
// Purpose:
// Input : *pRender -
//-----------------------------------------------------------------------------
void CGizmo::Render(CRender3D *pRender)
{
Vector XAxis( m_Position[0] + m_fAxisLength, m_Position[1], m_Position[2] );
Vector YAxis( m_Position[0], m_Position[1] + m_fAxisLength, m_Position[2] );
Vector ZAxis( m_Position[0], m_Position[1], m_Position[2] + m_fAxisLength );
static BoundBox UniformScaleBox;
Vector Mins;
Vector Maxs;
Mins[0] = m_Position[0] - m_fAxisLength * 0.1;
Mins[1] = m_Position[1] - m_fAxisLength * 0.1;
Mins[2] = m_Position[2] - m_fAxisLength * 0.1;
Maxs[0] = m_Position[0] + m_fAxisLength * 0.1;
Maxs[1] = m_Position[1] + m_fAxisLength * 0.1;
Maxs[2] = m_Position[2] + m_fAxisLength * 0.1;
UniformScaleBox.ResetBounds();
UniformScaleBox.UpdateBounds(Mins, Maxs);
pRender->BeginRenderHitTarget(this, GIZMO_HANDLE_UNIFORM_SCALE);
//pRender->RenderBox(Mins, Maxs, BoxType_Solid, 200, 200, 200);
pRender->EndRenderHitTarget();
pRender->SetRenderMode( RENDER_MODE_TEXTURED );
DrawGizmoAxis(pRender, m_Position, XAxis, 255, 0, 0, GIZMO_AXIS_X);
DrawGizmoAxis(pRender, m_Position, YAxis, 0, 255, 0, GIZMO_AXIS_Y);
DrawGizmoAxis(pRender, m_Position, ZAxis, 0, 0, 255, GIZMO_AXIS_Z);
pRender->SetRenderMode( RENDER_MODE_DEFAULT );
}