MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / encodeFloat

Function encodeFloat

physx/source/scenequery/src/SqBucketPruner.cpp:361–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359///////////////////////////////////////////////////////////////////////////////
360
361static PX_FORCE_INLINE PxU32 encodeFloat(PxU32 newPos)
362{
363 //we may need to check on -0 and 0
364 //But it should make no practical difference.
365 if(newPos & PX_SIGN_BITMASK) //negative?
366 return ~newPos;//reverse sequence of negative numbers
367 else
368 return newPos | PX_SIGN_BITMASK; // flip sign
369}
370
371static PX_FORCE_INLINE void computeRayLimits(float& rayMin, float& rayMax, const PxVec3& rayOrig, const PxVec3& rayDir, float maxDist, PxU32 sortAxis)
372{

Callers 4

encodeBoxMinMaxFunction · 0.70
processBucketFunction · 0.70
SqBucketPruner.cppFile · 0.70
operator()Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected