Sample scene for CSG \o/
This commit is contained in:
@@ -40,6 +40,11 @@ Intersect CSG::localIntersect(Ray r)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Intersect CSG::intersect(Ray r)
|
||||
{
|
||||
return localIntersect(r);
|
||||
}
|
||||
|
||||
Tuple CSG::localNormalAt(Tuple point, Intersection *hit)
|
||||
{
|
||||
return Vector(1, 0, 0);
|
||||
|
||||
@@ -18,11 +18,11 @@ Group::Group() : Shape(SHAPE_GROUP)
|
||||
{
|
||||
stats.addGroup();
|
||||
this->allocatedObjectCount = MIN_ALLOC;
|
||||
this->objectList = (Shape **)calloc(sizeof(Shape *), MIN_ALLOC);
|
||||
this->objectList = (Shape **)calloc(sizeof(Shape **), MIN_ALLOC);
|
||||
this->objectCount = 0;
|
||||
|
||||
this->allocatedUnboxableObjectCount = MIN_ALLOC;
|
||||
this->unboxableObjectList = (Shape **)calloc(sizeof(Shape *), MIN_ALLOC);
|
||||
this->unboxableObjectList = (Shape **)calloc(sizeof(Shape **), MIN_ALLOC);
|
||||
this->unboxableObjectCount = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ double Light::intensityAt(World &w, Tuple point)
|
||||
}
|
||||
}
|
||||
return total / this->samples;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,6 @@ static int parseFaceVertex(char *buf, uint32_t &v, uint32_t &vt, uint32_t &vn)
|
||||
{
|
||||
uint32_t bufPos = 0;
|
||||
uint32_t lineLength = strlen(buf);
|
||||
char *tmp = buf;
|
||||
vt = INT32_MAX;
|
||||
vn = INT32_MAX;
|
||||
int ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user