mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-04-24 11:19:04 +00:00
Adding boolean return value to SnapNormal(). Returns true if the normal
was modified, false otherwise. git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/Rambetter-math-fix-experiments@399 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
3afaacd5b2
commit
2bdcb2d3c2
1 changed files with 6 additions and 3 deletions
|
@ -155,7 +155,7 @@ SnapNormal()
|
|||
snaps a near-axial normal vector
|
||||
*/
|
||||
|
||||
void SnapNormal( vec3_t normal )
|
||||
qboolean SnapNormal( vec3_t normal )
|
||||
{
|
||||
#if EXPERIMENTAL_SNAP_NORMAL_FIX
|
||||
int i;
|
||||
|
@ -187,7 +187,9 @@ void SnapNormal( vec3_t normal )
|
|||
if (adjusted)
|
||||
{
|
||||
VectorNormalize(normal, normal);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
#else
|
||||
int i;
|
||||
|
||||
|
@ -233,15 +235,16 @@ void SnapNormal( vec3_t normal )
|
|||
{
|
||||
VectorClear( normal );
|
||||
normal[ i ] = 1;
|
||||
break;
|
||||
return qtrue;
|
||||
}
|
||||
if( fabs( normal[ i ] - -1 ) < normalEpsilon )
|
||||
{
|
||||
VectorClear( normal );
|
||||
normal[ i ] = -1;
|
||||
break;
|
||||
return qtrue;
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue