Ticket #59 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Point, Size, Rect, Vec2f, all, one, none, or combo

Reported by: clayasaurus Assigned to: clayasaurus
Priority: major Milestone: 0.2
Component: unspecified Version: svn
Keywords: Cc:

Description

Point, Size, Rect, all, one, none, or combo

Options

1. Use Point for all operations, then alias Point Size and perhaps union .w and .h variables with the .x and the .y variables, or have point only be get/set through funcs and provide width height funcs

2. Use Rect instead of Point, Size in args. Problems erupt from dealing with rect vs. point math, can use Rect(Point, Size) with Size alias point, or extract points from rect when needed.

I think we will need to alias Size with Point and union .w and .h values if possible.

Change History

05/24/07 18:55:37 changed by clayasaurus

Step 1.

I've union'd x with w and y with h in Point, and I've added a Size alias for Point.

05/25/07 03:26:48 changed by ChristianK

I'd love to make Point and Size distinct types as to allow overloading on them. Will play with it to see if it is doable without introducing casts or other problems all over the place (like with Radians and float).

06/03/07 14:23:10 changed by ChristianK

Point and Size split done in [1042]. Improving Rect and making use of the new ability to overload on Size,Point will be the next step.

06/03/07 20:28:36 changed by clayasaurus

Repeat of my email,

"Hrm... I was successfully able to add a separate size struct without mixin or templates before reading this ticket, as well as update all of the unittests to match the new size / point paradigm.

I think I only needed one or two op overloads , forget exactly what. I'd rather use a Plain Size struct instead of mixins or templates. Should I email you a zip of my arcunittest and arc/ directory on monday and see if you like it? :-P"

06/15/07 11:21:31 changed by clayasaurus

  • status changed from new to closed.
  • resolution set to fixed.

Let's decide upon separate structs for now.

We get better documentation and can separate point.d and size.d