mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024307: TKOpenGl - efficient culling of large number of presentations
Implement SAT intersection tests and frustum culling algorithm using BVH trees. New Draw command vfrustumculling to manage frustum culling. Add test cases bugs/vis/bug24307_1 and bugs/vis/bug24307_2. Remove CALL_DEF_BOUNDBOX and CALL_DEF_BOUNDS.
This commit is contained in:
@@ -270,6 +270,20 @@ inline Standard_Integer RealToInt (const Standard_Real Value)
|
||||
: (Standard_Integer)Value;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : RealToShortReal
|
||||
// purpose : Converts Standard_Real value to the nearest valid
|
||||
// Standard_ShortReal. If input value is out of valid range
|
||||
// for Standard_ShortReal, minimal or maximal
|
||||
// Standard_ShortReal is returned.
|
||||
// =======================================================================
|
||||
inline Standard_ShortReal RealToShortReal (const Standard_Real theVal)
|
||||
{
|
||||
return theVal < -FLT_MAX ? -FLT_MAX
|
||||
: theVal > FLT_MAX ? FLT_MAX
|
||||
: (Standard_ShortReal)theVal;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Round : Returns the nearest integer of a real
|
||||
//-------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user