Changeset 260 for cpp/frams/model


Ignore:
Timestamp:
12/06/14 01:16:34 (10 years ago)
Author:
Maciej Komosinski
Message:

Added docs for quadrant and octant literals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/geometry/geometryutils.h

    r238 r260  
    1111#include <frams/util/list.h>
    1212
    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
     163-bit numbers are used when iterating through octants in a 3D space. Example: when creating points that cover the surface
     17of an ellipsoid, the points are only created for the positive octant (x, y, and z coordinates are positive). Points in
     18the remaining 7 octants are created by reflecting points from the positive octant through the appropriate planes defined by
     19pairs of axes.
     20
     212-bit numbers are used for 2D. Example: cylinders are aligned along the x axis so that both bases are parallel to
     22the yz plane. When points are created along the edge of the base (these will be used later to create points along the side
     23of the cylinder), only y and z axes are important, so quadrants of the 2D are sufficient. Just as in the 3D example above,
     24only points for the positive quadrant, QuadrantYZ, are created, and points of the remaining quadrants are created by reflection.
     25QuadrantXY and QuadrantZX enumerations are never used and are provided only for completeness.
     26*/
    1427#define b000 0
    1528#define b01 1
     
    1932#define b100 4
    2033#define b110 6
     34
     35
    2136
    2237namespace CuboidFaces
Note: See TracChangeset for help on using the changeset viewer.