top of page

planar and spacial geometry objects and operations

as C++ class libraries

There are two object-oriented C++ class libraries available for geometric objects and operations. The XY library is for 2-dimensional geometry. The XYZ library is for 3-dimensional geometry. Each defines points, lines, angles, transformations thereon, and many other object classes. Each class has operations appropriate to that class's objects. Furthermore, operators are defined between objects, where meaningful. The operators in XYZ include the very useful cross product denoted by the '%' symbol

 

Be aware of two peculiarities. First the capitalization style matches that of English: classes are lower case (such as 'woman'). This is like the predefined data types in C/C++ ('int', 'char', and 'double'). whereas specific named objects are capitalized--as are proper nouns in English ('Jane').. This differs from some common styles used in C++. Further, the consistent indentation style differs from some conventions.

Second, a transformation acting on a point (or line,...) appears as a right operand. This differs from typical mathematical notation. Several reasons for this appear in a comment in the header for class transform.

bottom of page