On Aug 31, 2010, at 11:48 AM, Kenneth Russell wrote:
> On Tue, Aug 31, 2010 at 11:05 AM, David Hyatt <[email protected]> wrote:
>> On Aug 31, 2010, at 10:36 AM, Chris Marrin wrote:
>>
>>> Or should we get rid of Vector3, added the functionality it needs to
>>> FloatPoint3D and use that? Ken Russell already has plans to do add the
>>> functions to FloatPoint3D, so I would vote for that.
>>
>> I would vote for this. I don't think the geometry classes should move to
>> wtf.
>
> I'd like to unify the math, geometry, and linear algebra classes that
> are scattered around the WebKit tree -- for example, FloatPoint,
> FloatPoint3D, FloatRect, FloatSize, the classes under
> WebCore/platform/graphics/transforms/, these Complex and Vector3
> types, ... -- under a directory like WebCore/math, remove duplicate
> functionality, and provide a cohesive set of interfaces that can be
> easily used by other modules like graphics and audio.
It would be nice if we could do this unification and then later on we can
enhance it so the classes play nice together. For instance,
TransformationMatrix deals with many, but not all of the other geometric
classes. You can't cast between FloatPoint and FloatPoint3D, etc. Maybe we
could also use this opportunity to change TransformationMatrix to Matrix. The
current name is such a mouthful. And we might also want to think about changing
FloatPoint3D to FloatPoint3. That would make it more natural if and when we
want to add a FloatPoint4. We should also change AffineTransform to
AffineMatrix so it matches Matrix.
But I think it should stay in Platform. That's where most of them are already
and it allows us to make platform specific versions as needed. For instance, we
could add an SSE implementation of Matrix that way.
Then this gets us back to an earlier issue. Currently TransformationMatrix uses
doubles and the rest use floats. Should we change it back to using floats
everywhere?
I've opened a bug for just the reorg part:
https://bugs.webkit.org/show_bug.cgi?id=44983
Please add any classes scattered around I might have missed.
-----
~Chris
[email protected]
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev