[Gtkradiant] r4800 - GtkRadiant/trunk/libs/math
svn-noreply at zerowing.idsoftware.com
svn-noreply at zerowing.idsoftware.com
Sat Sep 25 13:50:20 CDT 2004
Author: spog
Date: 2004-09-25 13:50:04 -0500 (Sat, 25 Sep 2004)
New Revision: 4800
Modified:
GtkRadiant/trunk/libs/math/curve.h
Log:
fixed gcc build error
Modified: GtkRadiant/trunk/libs/math/curve.h
===================================================================
--- GtkRadiant/trunk/libs/math/curve.h 2004-09-25 18:29:48 UTC (rev 4799)
+++ GtkRadiant/trunk/libs/math/curve.h 2004-09-25 18:50:04 UTC (rev 4800)
@@ -171,14 +171,14 @@
const double reciprocal_alpha = 1.0 / 3.0;
Vector3 bezierPoints[4];
- bezierPoints[0] = controlPoints[i];
- bezierPoints[1] = (i > 0)
- ? controlPoints[i] + vector3_scaled(controlPoints[i + 1] - controlPoints[i - 1], reciprocal_alpha * 0.5)
- : controlPoints[i] + vector3_scaled(controlPoints[i + 1] - controlPoints[i], reciprocal_alpha);
- bezierPoints[2] = (i < controlPoints.size() - 2)
- ? controlPoints[i + 1] + vector3_scaled(controlPoints[i] - controlPoints[i + 2], reciprocal_alpha * 0.5)
- : controlPoints[i + 1] + vector3_scaled(controlPoints[i] - controlPoints[i + 1], reciprocal_alpha);
- bezierPoints[3] = controlPoints[i + 1];
+ bezierPoints[0] = controlPoints[segment];
+ bezierPoints[1] = (segment > 0)
+ ? controlPoints[segment] + vector3_scaled(controlPoints[segment + 1] - controlPoints[segment - 1], reciprocal_alpha * 0.5)
+ : controlPoints[segment] + vector3_scaled(controlPoints[segment + 1] - controlPoints[segment], reciprocal_alpha);
+ bezierPoints[2] = (segment < controlPoints.size() - 2)
+ ? controlPoints[segment + 1] + vector3_scaled(controlPoints[segment] - controlPoints[segment + 2], reciprocal_alpha * 0.5)
+ : controlPoints[segment + 1] + vector3_scaled(controlPoints[segment] - controlPoints[segment + 1], reciprocal_alpha);
+ bezierPoints[3] = controlPoints[segment + 1];
return CubicBezier_evaluate(bezierPoints, t);
}
More information about the Gtkradiant
mailing list