|
|
On Wed, 6 Oct 1999 01:17:27 -0400, Mark Wagner wrote:
>The problem only occurs when scaling by <-1,-1,-1>. Scaling by <-1,1,1>,
><1,-1,1>, <1,1,-1>, or anything else doesn't cause problems.
(Crossposted to bugreports)
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
|
|