3D-Viewer: fix code style
This commit is contained in:
parent
386a0bbe4a
commit
3fce3b6591
|
@ -116,15 +116,15 @@ bool CITEMLAYERCSG2D::Intersect( const RAYSEG2D &aSegRay,
|
|||
//check against all subbed objects
|
||||
for( unsigned int i = 0; i < m_objectB->size(); ++i )
|
||||
{
|
||||
if( ((const COBJECT2D *)(*m_objectB)[i])->IsPointInside( currentRayPos ) )
|
||||
if( ( (const COBJECT2D *)( *m_objectB)[i] )->IsPointInside( currentRayPos ) )
|
||||
{
|
||||
// ray point is inside a subtracted region, so move it to the end of the
|
||||
// subtracted region
|
||||
float hitDist;
|
||||
SFVEC2F tmpNormal;
|
||||
if( !((const COBJECT2D *)(*m_objectB)[i])->Intersect( currentRay,
|
||||
&hitDist,
|
||||
&tmpNormal ) )
|
||||
if( !( (const COBJECT2D *)( *m_objectB)[i] )->Intersect( currentRay,
|
||||
&hitDist,
|
||||
&tmpNormal ) )
|
||||
return false; // ray hit main object but did not leave subtracted volume
|
||||
|
||||
wxASSERT( hitDist <= 1.0f );
|
||||
|
|
|
@ -541,7 +541,7 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
|||
|
||||
SFVEC2UI grid_divisions;
|
||||
|
||||
if( aDivFactor < 0.0f)
|
||||
if( aDivFactor < 0.0f )
|
||||
{
|
||||
grid_divisions = SFVEC2UI( 1 );
|
||||
}
|
||||
|
@ -551,8 +551,8 @@ void Convert_path_polygon_to_polygon_blocks_and_dummy_blocks(
|
|||
aDivFactor = medOfTheSquaresSegmentLength;
|
||||
|
||||
|
||||
grid_divisions.x = (unsigned int)( (bbox.GetExtent().x / aDivFactor) );
|
||||
grid_divisions.y = (unsigned int)( (bbox.GetExtent().y / aDivFactor) );
|
||||
grid_divisions.x = (unsigned int)( ( bbox.GetExtent().x / aDivFactor ) );
|
||||
grid_divisions.y = (unsigned int)( ( bbox.GetExtent().y / aDivFactor ) );
|
||||
|
||||
grid_divisions = glm::clamp( grid_divisions ,
|
||||
SFVEC2UI( 1, 1 ),
|
||||
|
|
|
@ -64,7 +64,7 @@ bool CLAYERITEM::Intersect( const RAY &aRay, HITINFO &aHitInfo ) const
|
|||
if( tBBoxStart >= aHitInfo.m_tHit )
|
||||
return false;
|
||||
|
||||
if( fabs(tBBoxStart - tBBoxEnd) <= FLT_EPSILON )
|
||||
if( fabs( tBBoxStart - tBBoxEnd ) <= FLT_EPSILON )
|
||||
return false;
|
||||
|
||||
const bool startedInside = m_bbox.Inside( aRay.m_Origin );
|
||||
|
|
Loading…
Reference in New Issue