# [−][src]Crate rpt

`rpt`

is a path tracer in Rust.

## Re-exports

`pub use glm;` |

`pub use image;` |

## Structs

BoundingBox | A 3D axis-aligned bounding box |

Buffer | A buffer that stores sample results from path tracing |

Camera | A simple thin-lens perspective camera |

Cube | A unit cube centered at the origin |

Hdri | High-dynamic-range equirectangular image for lighting 3D scenes |

HitRecord | Record of when a hit occurs, and the corresponding normal |

KdTree | A kd-tree based on bounding boxes, used to accelerate ray intersections |

MarblesSystem | System that represents marbles and a glass |

Material | Represents a shader material with some physical properties |

MonomialSurface | Represents a glass-shaped surface with height and exp parameters |

Object | An object rendered in a scene |

ParticleState | Represents current state of a particle system, including positions and velocities |

Plane | A plane represented by the linear equation x • normal = value |

Ray | An infinite ray in one direction |

Renderer | Builder object for rendering a scene |

Scene | Object representing a scene that can be rendered |

SolidGravitySystem | System that represents solid gravity objects in space |

Sphere | A unit sphere centered at the origin |

Transformed | A shape that has been composed with a transformation |

Triangle | A triangle with three vertices and three normals |

## Enums

Environment | An environment map for lighting 3D scenes |

Filter | A noise reduction filter applied to the rendered image |

Light | Type representing various forms of lighting |

## Traits

Bounded | A geometric shape with a bounding box (needed for kd-tree intersections) |

ParticleSystem | A trait that represents a system formulating some physical laws |

SceneAdd | Trait that allows adding an object or light to a scene |

Shape | Represents a physical shape, which can be hit by a ray to find intersections |

Transformable | An object that can be transformed |

## Functions

color_bytes | Convert a color to a clamped triple of sRGB unsigned bytes |

cube | Helper function to construct a cube |

hex_color | Construct a new color from an sRGB hex integer, applying gamma correction to return linear intensities |

load_obj | Load a mesh geometry from a Wavefront .OBJ file |

load_obj_with_mtl | Load an object, with materials, from a Wavefront .OBJ file |

load_stl | Load a mesh from a .STL file |

monomial_surface | Helper function to construct a glass-like monomial surface |

plane | Helper function to construct a plane |

polygon | Helper function to construct a simple polygon made from triangles |

sphere | Helper function to construct a sphere |

## Type Definitions

Color | A representation of an RGB color |

Mesh | A triangle mesh, stored using a kd-tree |