Affine transforms - matrix algebra

Jim Graham james.graham at oracle.com
Wed Aug 15 02:34:41 PDT 2012


On 8/15/2012 1:13 AM, Pavel Safrata wrote:
>>>> The appendRotation(... Point3D axis) stands out. Should we have
>>>> variants for all of the pivotXYZ methods that take a Point2D/3D?
>>>
>>> Pivot is always represented as three doubles, even with rotation.
>>> Point3D can be used only for the axis (which is unique property to
>>> rotation) and the reason is that for the orthogonal rotations you can
>>> use Rotate's X_AXIS, Y_AXIS and Z_AXIS.
>>
>> I see. I am aware of the convenience values for the axis, and that
>> makes the Point3D for axis doubly useful, but is that a reason not to
>> consider variants that use Point3D for pivot as well? (One reason I
>> can think is that the overloads might run into each other if we aren't
>> careful, but if we can find a sensible overload set then it would be
>> nice to allow specifying the "pivot point" with an actual point, no?)...
>
> Yes, it sounds useful. I just hope we don't over-complicate the class.
> We can add:
>
> public void appendScale(double sx, double sy, Point2D pivot)
> public void appendScale(double sx, double sy, double sz, Point3D pivot)
> public void appendRotation(double theta, Point2D pivot)
> public void appendRotation(double theta, Point3D pivot, double axisX,
> double axisY, double axisZ)
> public void appendRotation(double theta, Point3D pivot, Point3D axis)
> public void appendShear(double shx, double shy, Poin2D pivot)
>
> and the same set for prepend.

That sounds like a lot.  I'll leave it to someone with better API taste 
to decide if this is useful or overkill.  Richard?

			...jim


More information about the openjfx-dev mailing list