minor
parent
cc84bfee3c
commit
ff4a71309b
|
@ -269,7 +269,7 @@ protected:
|
||||||
} else {
|
} else {
|
||||||
const Shape *shape = m_shapes[shapeIdx];
|
const Shape *shape = m_shapes[shapeIdx];
|
||||||
if (shape->rayIntersect(ray, mint, maxt, t,
|
if (shape->rayIntersect(ray, mint, maxt, t,
|
||||||
reinterpret_cast<uint8_t*>(temp) + 8)) {
|
reinterpret_cast<uint8_t*>(temp) + 2*sizeof(IndexType))) {
|
||||||
cache->shapeIndex = shapeIdx;
|
cache->shapeIndex = shapeIdx;
|
||||||
cache->primIndex = KNoTriangleFlag;
|
cache->primIndex = KNoTriangleFlag;
|
||||||
return true;
|
return true;
|
||||||
|
@ -291,7 +291,7 @@ protected:
|
||||||
uint32_t shapeIndex = ta.shapeIndex;
|
uint32_t shapeIndex = ta.shapeIndex;
|
||||||
const Shape *shape = m_shapes[shapeIndex];
|
const Shape *shape = m_shapes[shapeIndex];
|
||||||
if (shape->rayIntersect(ray, mint, maxt, t,
|
if (shape->rayIntersect(ray, mint, maxt, t,
|
||||||
reinterpret_cast<uint8_t*>(temp) + 8)) {
|
reinterpret_cast<uint8_t*>(temp) + 2*sizeof(IndexType))) {
|
||||||
cache->shapeIndex = shapeIndex;
|
cache->shapeIndex = shapeIndex;
|
||||||
cache->primIndex = KNoTriangleFlag;
|
cache->primIndex = KNoTriangleFlag;
|
||||||
return true;
|
return true;
|
||||||
|
@ -428,7 +428,7 @@ protected:
|
||||||
its.time = ray.time;
|
its.time = ray.time;
|
||||||
} else {
|
} else {
|
||||||
shape->fillIntersectionRecord(ray,
|
shape->fillIntersectionRecord(ray,
|
||||||
reinterpret_cast<const uint8_t*>(temp) + 8, its);
|
reinterpret_cast<const uint8_t*>(temp) + 2*sizeof(IndexType), its);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ bool ShapeKDTree::rayIntersect(const Ray &ray, Float &t, ConstShapePtr &shape,
|
||||||
Intersection its;
|
Intersection its;
|
||||||
its.t = t;
|
its.t = t;
|
||||||
shape->fillIntersectionRecord(ray,
|
shape->fillIntersectionRecord(ray,
|
||||||
reinterpret_cast<const uint8_t*>(temp) + 8, its);
|
reinterpret_cast<const uint8_t*>(temp) + 2*sizeof(IndexType), its);
|
||||||
n = its.geoFrame.n;
|
n = its.geoFrame.n;
|
||||||
uv = its.uv;
|
uv = its.uv;
|
||||||
if (its.shape)
|
if (its.shape)
|
||||||
|
@ -330,7 +330,7 @@ void ShapeKDTree::rayIntersectPacket(const RayPacket4 &packet,
|
||||||
|
|
||||||
if (shape->rayIntersect(ray, searchStart.f[i], searchEnd.f[i], t,
|
if (shape->rayIntersect(ray, searchStart.f[i], searchEnd.f[i], t,
|
||||||
reinterpret_cast<uint8_t *>(temp)
|
reinterpret_cast<uint8_t *>(temp)
|
||||||
+ i * MTS_KD_INTERSECTION_TEMP + 8)) {
|
+ i * MTS_KD_INTERSECTION_TEMP + 2*sizeof(IndexType))) {
|
||||||
its.t.f[i] = t;
|
its.t.f[i] = t;
|
||||||
its.shapeIndex.i[i] = kdTri.shapeIndex;
|
its.shapeIndex.i[i] = kdTri.shapeIndex;
|
||||||
its.primIndex.i[i] = KNoTriangleFlag;
|
its.primIndex.i[i] = KNoTriangleFlag;
|
||||||
|
|
Loading…
Reference in New Issue