PiMath API
    Preparing search index...

    Interface RandomGeometryLine3Config

    Options of rndLine3.

    interface RandomGeometryLine3Config {
        A?: Point | RandomGeometryPoint3Config;
        allow?: {
            general?: number | boolean;
            parallelX?: number | boolean;
            parallelXY?: number | boolean;
            parallelXZ?: number | boolean;
            parallelY?: number | boolean;
            parallelYZ?: number | boolean;
            parallelZ?: number | boolean;
        };
        direction?: Vector
        | RandomGeometryVector3Config;
    }
    Index

    Point on the line: a 3D Point fixes it exactly (new Point(1, 2, 3)); an object is the configuration of the random point drawn by rndPoint3 (default: its own defaults).

    allow?: {
        general?: number | boolean;
        parallelX?: number | boolean;
        parallelXY?: number | boolean;
        parallelXZ?: number | boolean;
        parallelY?: number | boolean;
        parallelYZ?: number | boolean;
        parallelZ?: number | boolean;
    }

    Kind of line that may be drawn, for a random direction (a, b, c). The kinds are exclusive; each entry is false (never), a number between 0 and 1 (probability of that kind), or true (default):

    • general: no zero component (the line is parallel to no coordinate plane). true shares what the other kinds leave;
    • parallelXY (c = 0), parallelXZ (b = 0), parallelYZ (a = 0): exactly one zero component, i.e. parallel to that coordinate plane but to no axis. true means 5 %;
    • parallelX (b = c = 0), parallelY, parallelZ: two zero components, i.e. parallel to that axis. true means 2 %.

    Probabilities that do not add up are normalized, and an explicit number takes precedence over true. A kind allowed by true that the direction configuration makes impossible (e.g. a range excluding 0 for a kind that needs a zero) is skipped; the same kind asked by an explicit number throws.

    Direction of the line: a non-null 3D Vector fixes it exactly (new Vector(1, 0, 2); incompatible with an explicit allow); an object is the configuration of the random vector drawn by rndVector3 (default: its own defaults). The direction is never null. Its axis and plane are overridden by the kind of line drawn (see allow), and its allow.zero must not be true.