[−][src]Module tray_rust::geometry
The geometry module defines the Geometry trait implemented by the various geometry in the ray tracer and provides some standard geometry for rendering
Scene Usage Example
All geometry will appear within an object specification and requires the type of geometry being specified along with any parameters for that geometry.
An instance has a geometry along with additional information like a material and transformation to place it in the world, see the instance module for more.
"objects": [
{
"type": "The_Instance_Type",
...
"geometry": {
"type": "The_Geometry_Type",
...
}
},
...
]
Re-exports
pub use self::differential_geometry::DifferentialGeometry; |
pub use self::intersection::Intersection; |
pub use self::instance::Instance; |
pub use self::sphere::Sphere; |
pub use self::disk::Disk; |
pub use self::rectangle::Rectangle; |
pub use self::bbox::BBox; |
pub use self::bvh::BVH; |
pub use self::mesh::Mesh; |
pub use self::animated_mesh::AnimatedMesh; |
pub use self::receiver::Receiver; |
pub use self::emitter::Emitter; |
Modules
animated_mesh | Defines an animated triangle mesh geometry. It is required that the topology of the mesh being animated does not change. While properties of triangles can be changed over time triangles can't be added or removed. Intersection test are accelerated internally by storing the triangles of the mesh in a BVH |
bbox | Provide an Axis-Aligned Bounding Box type, |
bvh | Provides a simple SAH split based BVH2 that stores types implementing the Boundable trait |
differential_geometry | Defines the |
disk | Defines a Disk type which implements the Geometry, Boundable and Sampleable traits A disk with some inner and outer radius allowing it to have a hole in the middle. The disk is oriented with the center at the origin and the normal pointing along +Z. |
emitter | An emitter is an instance of geometry that both receives and emits light |
instance | Defines an instance of some piece of geometry in the scene, instances can re-use loaded geometry but apply different transformations and materials to them |
intersection | Defines the Intersection type which stores information about a full intersection, eg. hit info about the geometry and instance that was intersected |
mesh | Defines a triangle mesh geometry. Intersection tests are accelerated internally by storing the triangles of the mesh in a BVH |
receiver | A receiver is an instance of geometry that does not emit any light |
rectangle | Defines a rectangle centered at the origin, specified by its horizontal and vertical lengths |
sphere | Defines a Sphere at the origin which implements the Geometry, Boundable and Sampleable traits |
Traits
Boundable | Trait implemented by scene objects that can report an AABB describing their bounds |
BoundableGeom | |
Geometry | Trait implemented by geometric primitives |
Sampleable | Trait implemented by geometry that can sample a point on its surface |
SampleableGeom |