package tiny_libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module SolidSource

Sourcetype pattern =
  1. | Plain
  2. | Checker of int * float
  3. | Marble of int * float
  4. | Wood of int * float
  5. | Solid_function of Vec3.t -> int
  6. | Uv_function of u:float -> v:float -> int
Sourcetype surface = {
  1. color : int;
  2. pattern : pattern;
  3. material : Material.t;
}
Sourceval color_at : surface -> Vec3.t -> int
Sourcetype primitive =
  1. | Ball
  2. | Cube
  3. | Cylinder
  4. | Cone
  5. | Torus of float
  6. | Half_space
Sourcetype t =
  1. | Sphere of Vec3.t * float * surface
  2. | Plane of Vec3.t * float * surface
  3. | Triangle of {
    1. points : Vec3.t * Vec3.t * Vec3.t;
    2. normals : Vec3.t * Vec3.t * Vec3.t;
    3. uvs : (float * float) * (float * float) * (float * float);
    4. surface : surface;
    }
  4. | Placed of {
    1. primitive : primitive;
    2. transform : Transform.t;
    3. surface : surface;
    }
  5. | Csg of Csg.op * t * t
Sourceval csg : Csg.op -> t -> t -> t
Sourceval surface : t -> surface
Sourceval color : t -> Ray.t -> float -> int
Sourceval intervals : Ray.t -> t -> t Csg.interval list
Sourceval first_hit : ?min_t:float -> Ray.t -> t -> t Csg.boundary option
Sourceval hit : ?min_t:float -> Ray.t -> t -> float option
Sourceval normal : t -> Ray.t -> float -> Vec3.t
Sourceval contains : t -> Vec3.t -> bool
Sourceval bounds : t -> (Vec3.t * Vec3.t) option
Sourceval move : Vec3.t -> t -> t
Sourceval transform : Transform.t -> t -> t