Add backface culling and option to keep unflipped hit normal in case a ray hits a back-facing triangle.
Usage: set RayResultCallback.m_flags to kF_FilterBackfaces, optionally combined with kF_KeepUnflippedNormal. Thanks Andy O'Neil for the patch! Remove the force_inline for some internal constraint solver methods, it makes re-use easier. Workaround/avoid MSVC 2005 compiler error in LibXML/trionan.c
This commit is contained in:
@@ -174,11 +174,16 @@ trio_make_double
|
||||
TRIO_ARGS1((values),
|
||||
TRIO_CONST unsigned char *values)
|
||||
{
|
||||
TRIO_VOLATILE double result;
|
||||
|
||||
//remove the TRI_VOLATILE, because MSVC 2005 compiles crashes
|
||||
// fatal error C1001: An internal error has occurred in the compiler.
|
||||
// (compiler file 'f:\rtm\vctools\compiler\utc\src\P2\main.c[0x00498D00:0x00498D00]', line 182)
|
||||
|
||||
double result;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (int)sizeof(double); i++) {
|
||||
((TRIO_VOLATILE unsigned char *)&result)[TRIO_DOUBLE_INDEX(i)] = values[i];
|
||||
(( unsigned char *)&result)[TRIO_DOUBLE_INDEX(i)] = values[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user