44
55#include < algorithm>
66#include < cassert>
7+ #include < cstdint>
78
89namespace pt
910{
@@ -63,9 +64,9 @@ RayAabbIntersector::RayAabbIntersector(const Ray& ray)
6364{
6465 origin = ray.origin ;
6566 invDir = 1 .0f / ray.direction ;
66- dirNeg[0 ] = static_cast <uint32_t >(invDir.x < 0 .0f );
67- dirNeg[1 ] = static_cast <uint32_t >(invDir.y < 0 .0f );
68- dirNeg[2 ] = static_cast <uint32_t >(invDir.z < 0 .0f );
67+ dirNeg[0 ] = static_cast <std:: uint32_t >(invDir.x < 0 .0f );
68+ dirNeg[1 ] = static_cast <std:: uint32_t >(invDir.y < 0 .0f );
69+ dirNeg[2 ] = static_cast <std:: uint32_t >(invDir.z < 0 .0f );
6970}
7071
7172bool rayIntersectAabb (
@@ -117,13 +118,13 @@ bool rayIntersectBvh(
117118{
118119 const RayAabbIntersector intersector (ray);
119120
120- constexpr size_t STACK_SIZE = 32 ;
121+ constexpr std:: size_t STACK_SIZE = 32 ;
121122
122- uint32_t nodesVisited = 0 ;
123- size_t toVisitOffset = 0 ;
124- size_t currentNodeIdx = 0 ;
125- size_t nodesToVisit[STACK_SIZE ];
126- bool didIntersect = false ;
123+ std:: uint32_t nodesVisited = 0 ;
124+ std:: size_t toVisitOffset = 0 ;
125+ std:: size_t currentNodeIdx = 0 ;
126+ std:: size_t nodesToVisit[STACK_SIZE ];
127+ bool didIntersect = false ;
127128
128129 while (true )
129130 {
@@ -136,7 +137,7 @@ bool rayIntersectBvh(
136137 if (node.triangleCount > 0 )
137138 {
138139 // Check for intersection with primitives in BVH node
139- for (size_t idx = 0 ; idx < node.triangleCount ; ++idx)
140+ for (std:: size_t idx = 0 ; idx < node.triangleCount ; ++idx)
140141 {
141142 const Triangle48& triangle = bvh.triangles [node.trianglesOffset + idx];
142143 if (rayIntersectTriangle (ray, triangle, rayTMax, intersect))
0 commit comments