Crate three_d_asset

Source
Expand description

A set of common assets that are useful when doing graphics, for example TriMesh, Texture2D or PbrMaterial. These assets can be loaded using the io module or constructed manually. When in memory, the assets can be for example be

  • visualised, for example using the three-d crate or in a CPU ray tracer
  • imported into a rust-based game engine
  • edited and saved again

Re-exports§

pub use crate::prelude::*;
pub use texture::*;
pub use material::*;
pub use geometry::*;
pub use volume::*;

Modules§

geometry
Contain geometry asset definitions.
io
Contains functionality to load any type of asset runtime as well as parsers for common 3D assets. Also includes functionality to save data which is limited to native.
material
Contain material asset definitions.
prelude
Contain the basic types used by the 3D specific data types. Mostly basic math functionality which is an re-export of cgmath.
texture
Contain texture asset definitions.
volume
Contain volume asset definitions.

Structs§

Camera
Represents a camera used for viewing 3D assets.
Frustum
The view frustum which can be used for frustum culling.
KeyFrameAnimation
A set of key frames and transformations associated with a specific animation for a specific Primitive.
KeyFrames
Contains a set of key frames for rotations, translations, scales and morph weights.
Model
A Model contain the same data as a Scene, it’s just stored in flat arrays instead of in a tree structure. You can convert from a Scene to a Model, but not the other way, because the tree structure is lost in the conversion.
Node
A node in a Scene graph. Each node may contain a set of children nodes, hence the whole Scene representaion has a tree structure.
PixelPoint
A pixel coordinate in physical pixels, where x is on the horizontal axis with zero being at the left edge and y is on the vertical axis with zero being at bottom edge.
Primitive
A part of a Model containing exactly one Geometry, an optional reference to a material and information necessary to calculate the transformation that should be applied to the geometry.
Scene
Representation of a set of objects as a scene graph. Specifically, a Scene contains a tree of Nodes, where the nodes contain the Geometry data. A Scene can easily be converted into a Model, if it is more desirable with a flat arrays instead of a tree structure.
UvCoordinate
UV coordinates which must be between (0, 0) indicating the bottom left corner and (1, 1) indicating the top right corner.
Viewport
Defines the part of the screen/render target that the camera is projecting into. All values should be in physical pixels.

Enums§

Error
Error from this crate.
ProjectionType
The type of projection used by a camera (orthographic or perspective) including parameters.

Type Aliases§

Result
A result for this crate.