metadata
Wenzel Jakob 2014-05-21 22:41:07 +02:00
parent cc84bfee3c
commit ff4a71309b
2 changed files with 5 additions and 5 deletions

View File

@ -269,7 +269,7 @@ protected:
} else {
const Shape *shape = m_shapes[shapeIdx];
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->primIndex = KNoTriangleFlag;
return true;
@ -291,7 +291,7 @@ protected:
uint32_t shapeIndex = ta.shapeIndex;
const Shape *shape = m_shapes[shapeIndex];
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->primIndex = KNoTriangleFlag;
return true;
@ -428,7 +428,7 @@ protected:
its.time = ray.time;
} else {
shape->fillIntersectionRecord(ray,
reinterpret_cast<const uint8_t*>(temp) + 8, its);
reinterpret_cast<const uint8_t*>(temp) + 2*sizeof(IndexType), its);
}
}

View File

@ -189,7 +189,7 @@ bool ShapeKDTree::rayIntersect(const Ray &ray, Float &t, ConstShapePtr &shape,
Intersection its;
its.t = t;
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;
uv = its.uv;
if (its.shape)
@ -330,7 +330,7 @@ void ShapeKDTree::rayIntersectPacket(const RayPacket4 &packet,
if (shape->rayIntersect(ray, searchStart.f[i], searchEnd.f[i], t,
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.shapeIndex.i[i] = kdTri.shapeIndex;
its.primIndex.i[i] = KNoTriangleFlag;