|
![](/i/fill.gif) |
So why does manual bounding fix the problem?
What happens to the bounding boxes?
Margus
Ron Parker wrote:
>
>
> Ah, now it begins to make sense. See, when you scale a sphere it
> multiplies the radius and the center by the scale factor unless it
> either already has a nonuniform transform in its list or the scale
> factor itself is nonuniform; in those two cases it uses the usual,
> more sophisticated methods.
>
> Obviously, making the radius negative is a bad thing. Here's the
> fix, in the function Scale_Sphere in spheres.c:
>
> if (Sphere->Trans == NULL)
> {
> VScaleEq(Sphere->Center, Vector[X]);
>
> - Sphere->Radius *= Vector[X];
> + Sphere->Radius *= fabs(Vector[X]);
>
> Compute_Sphere_BBox(Sphere);
> }
Post a reply to this message
|
![](/i/fill.gif) |