Changeset 260 for cpp/frams/model/geometry/geometryutils.h
- Timestamp:
- 12/06/14 01:16:34 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/model/geometry/geometryutils.h
r238 r260 11 11 #include <frams/util/list.h> 12 12 13 //binary literals standardized in C++14 13 14 /*Binary literals like 0b010 are standardized only in C++14. We use macros as they are compatible with older compilers too. 15 16 3-bit numbers are used when iterating through octants in a 3D space. Example: when creating points that cover the surface 17 of an ellipsoid, the points are only created for the positive octant (x, y, and z coordinates are positive). Points in 18 the remaining 7 octants are created by reflecting points from the positive octant through the appropriate planes defined by 19 pairs of axes. 20 21 2-bit numbers are used for 2D. Example: cylinders are aligned along the x axis so that both bases are parallel to 22 the yz plane. When points are created along the edge of the base (these will be used later to create points along the side 23 of the cylinder), only y and z axes are important, so quadrants of the 2D are sufficient. Just as in the 3D example above, 24 only points for the positive quadrant, QuadrantYZ, are created, and points of the remaining quadrants are created by reflection. 25 QuadrantXY and QuadrantZX enumerations are never used and are provided only for completeness. 26 */ 14 27 #define b000 0 15 28 #define b01 1 … … 19 32 #define b100 4 20 33 #define b110 6 34 35 21 36 22 37 namespace CuboidFaces
Note: See TracChangeset
for help on using the changeset viewer.