Hi,
I was wondering if anyone had looked at or used the Curve Class yet. I am having difficulty working out how to use it, perhap anyone could shed any light.
I was thinking initially that it is a beizer curve type class, but I can't see co-ordinate information for the control points. All I can see is that CurveKeys have a value and a posistion, presumably between 0-1. Is the value the "y" position on a graph and the x is the position.
Has anyone any more information that I can read in to determine what to use a curve for.
Kind Regards,
Paul Kinlan

Microsoft.XNA.Framework.Curve
phani kumar ---help me out
rockmanxyj
Have done it already.
Rashar
Thanks for the reponse guys.
It is just that I was looking to see how I can work out the points on a curve. It is okay though, I should be able to make one myself.
Paul
p.s I can't wait for more complete documentation
Mystagogue
Mohammad Syed
steveareno
I haven't worked with curves very much (so I can't really speak to the interfaces), but I prefer aggregation over inheritance. If the concrete classes (Bezier, Nurbs, whathaveyou) are aggregated into the Curve class(es) then the code using the curve might wind up more consistant (and simple to change out what type of curve is being used). Hopefully, if curve mechanics can share a common interface (i.e. I'm not talking out my butt), someone will consider this.
Steve Whitley
That's exactly what i've been using it for... I've got an array of 4 curves for the ARGB of each of my games objects, you can create some really cool color transitions :) It did strike me as a bit slow though so i made a simple derived class that pre-calculates the curve. I'd be happy to share it if anyone wants it.
laiseng
Hi Khass,
I don't think aggregation would be entirely appropriate here, and anyway using an interface isn't implementation inheritance either. The idea of having a common interface would be to provide access to the interpolated curve when it is passed to another object, for instance a position controller. The only thing the curves would definately have in common is the ability to retrieve a value (e.g. a Vector3) at a particular parametric value t, which is what the controller would need to access. Everything else about the curves has no commonality at all. For instance the curves would very rarely be set up using the same data - hermite curves take tangent vectors to control points, nurbs cuves have weights at control points, etc, so no, apart from interpolating the curve there is no common 'mechanic'!
Andy.
Humblepatience
Ok, my first thought is that The TangentIn and TangentOut properties smack of a Hermite curve, which is a very close relation to a Bezier curve. But then all the data is scalar; the obvious conclusion is that this is a one-dimensional hermite curve, and is intended for use in a controller - for instance controlling a scalar such as brightness, alpha or whatever.
Whether the above is right or not, I have to say that when I scanned through the framework, this class leapt out at me as being completely incorrectly named (i.e. what kind of curve ). I would have thought there should be a Curve1, Curve2, Curve3 set of interfaces that concrete curve classes can be defined for (in 1D, 2D and 3D space respectively). This way we could have BezierCurve2 or NurbsCurve3 classes derived from them. That aside, the Curve class should at least be named according to the type of curve it is, and the dimension of the space it operates in.