Kuba,

>> It seems like selectarea(), in the OBJINST case, is pushing a premultiplied
>> matrix on the stack before recursing into the object. Is that necessary?
>> I can't see offhand where would that matrix be used.
> 
> Same happens in recurselect(), BTW.
> 
> Per the C++ compiler, it seems that nothing that is called from selectarea()
> *or* recurselect() has access to the matrix stack, thus any stack operations
> are ignored anyway.

I discovered an additional error in the transformation of the select
area box points in selectarea().  It transforms only the lower left-hand
and upper right-hand points of the box.  Then, in the subsequent recursive
call to selectarea(), it treats those transformed points as the lower
left-hand and upper right-hand points of a box.  The problem is,
depending on the shape and size of the area select box, and the orientation
of the object instance, the new box could potentially be reduced to zero
area.  A more sensible approach would be to calculate the center of the
box in the coordinates of the instance, and create an area select box
that is the same height and width as the original.

                                                        ---Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: [email protected]    |
| Open Circuit Design, Inc.      | web:   http://opencircuitdesign.com |
| 22815 Timber Creek Lane        | phone: (301) 528-5030               |
| Clarksburg, MD 20871-4001      | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+
_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to