[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Rotations, rotations, rotations.



> Something like this. (Still preliminary)
> typedef struct          /* vector for objects and such */
> {
>         PointType X;
>         PointType Y;
>         PointType x0;
>         PointType y0;
>         float angle; /* Radians NOT degrees (math.h reasons)*/
>         double lenght;
> } vector_t, *vector_t;
> 
> the x0,y0 are the origin, and X,Y are the 'normal' X,Y that is delt
> with everywhere.

In theory, in an element, all X,Y values are relative to the mark
anyway.  So the only thing we *need* to store is the angle, if we do
the rotation math all over the place.  Storing the original x,y would
solve the rounding error, or we could just store a pointer to a copy
of the original element.

I don't think we need to store a full vector.

> Or just a :rotateAbitrary(angle in deg).

Probably a good first step.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user