We've been having an ongoing discussion about pulling together all the geometry related classes (FloatPoint, TransformationMatrix, etc.) into a single place. I propose to make this place WebCore/platform/graphics/math. I propose move these classes: FloatPoint FloatPoint3D FloatQuad FloatRect FloatSize IntPoint IntRect IntSize TransformationMatrix AffineTransform There may be others scattered around.
platform/graphics/math is too specific a directory name; at least some of these classes need to be referenced from the ongoing web audio work. I would suggest platform/math. We'll also want to move wtf/Vector3 and wtf/Complex here.
(In reply to comment #1) > platform/graphics/math is too specific a directory name; at least some of these classes need to be referenced from the ongoing web audio work. I would suggest platform/math. > > We'll also want to move wtf/Vector3 and wtf/Complex here. Ok, platform/math seems reasonable. We should get rid of wtf/Vector3 and replace it with FloatPoint3D once you add cross/dot/etc. to it. And Complex is just a simple audio specific wrapper around std::complex, which I think should go into platform/audio directly. I've opened a bug for this work: https://bugs.webkit.org/show_bug.cgi?id=44991 Ken, can you add the bug number for the FloatPoint3D work and make the above bug depend on it?
I don't really care that much where Complex.h lives, but Complex::complexFromMagnitudePhase() is kind of general from a mathematical point of view, even if graphics doesn't really have a use for it.
(In reply to comment #2) > (In reply to comment #1) > > platform/graphics/math is too specific a directory name; at least some of these classes need to be referenced from the ongoing web audio work. I would suggest platform/math. > > > > We'll also want to move wtf/Vector3 and wtf/Complex here. > > Ok, platform/math seems reasonable. We should get rid of wtf/Vector3 and replace it with FloatPoint3D once you add cross/dot/etc. to it. And Complex is just a simple audio specific wrapper around std::complex, which I think should go into platform/audio directly. I've opened a bug for this work: > > https://bugs.webkit.org/show_bug.cgi?id=44991 > > Ken, can you add the bug number for the FloatPoint3D work and make the above bug depend on it? 44991 now depends on 44970, which has already been fixed.