
I could not find the original message to look at the proposed code, is it on the web site some where? Here are my requirements for a Geometry library. 1. The primitives integrate with translational and rotational elements, such as homogenous transforms (4x4 matrices), quaterions, Euler angles, and translation vectors. 2. The translationals and rotation elements convert to one another where applicable. The rotational part of the homogenous transform convert to and from a rotational quaterion and to and from Euler angles, or quaterion to Euler angles. The translation parts can be extracted and set in the homogenous transform. 3. At a minimum, OpenGL array extraction from homogenous tranforms, points, and shapes. A float array in the order that OpenGL expects for these elements. Support for DirectX, and others would be good. I have done some of this in the library I wrote in 97. Dave -----Original Message----- From: Joel de Guzman [mailto:joel@boost-consulting.com] Sent: Tuesday, June 28, 2005 11:02 AM To: boost@lists.boost.org Subject: Re: [boost] Library Proposal: Boost.Geom 2D and 3D GeometricPrimitives Anis Benyelloul wrote:
Joel de Guzman <joel <at> boost-consulting.com> writes:
How do you plan to implement your regions? If your Points can use native platform points, I assume your regions can also use native platform regions? Or are we talking about different things? I'm interested on how you can make it use the Macintosh classic Region, for example.
Well, let me think of it.... What is a region ? A collection of (non- overlapping ?) boxes. Now what is a collection of boxes ? - std::vector<box> - boost::array<box, 20> - box ; // Note: a single box ! - XRegion ;// Maybe some pre-existing region object in other libraries
As you see, the problem is quite the same: for one abstraction (region) being able to choose among many implementations, and just "plug" them in some convenient wrapper class.
Actually, I haven't studied much the subject, but it doesn't seem of extrem complexity ...
Well, not so fast. Been there done that. The problem is how to interoperate on two regions. Example: I need to XOR a YRegion with a MacRegion. The thing is, a classic mac region is an opaque data type (actually, it's not implemented as a collection of boxes). The mere fact that it is opaque makes it impossible to even copy a mac region to a YRegion. Cheers, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost