Raised if an OBJ file is ill-formed or if a model has a wrong type
Module OgamlGraphics.Model
Creation, loading and manipulation of 3D modelsSubmodules
Face | Represents a face of a model |
Vertex | Represents a particular vertex of a model |
This module provides helpers to manipulate and load immutable 3D models in the RAM.
Moreover, the operations provided in this module are generally costly and should not be used in performance-sensitive code.
Models stored in that form are not RAM-friendly, and should not be stored in large numbers. Use vertex arrays instead.
Type of a model
Model creation
Empty model
Returns the model associated to an OBJ file
Creates a cube from two endpoints
Transformations
Applies a transformation to a 3D model
Scales a 3D model
Translates a 3D model
Rotates a 3D model
Model modification
Adds a face to a model
Paints the whole model with a given color
Merges two models
(Re-)computes the normals of a model. If
smooth
is true
, then the normals are computed per-vertex instead of per-face
Simpifies a model (removes all redundant faces)
Appends a model to a vertex source. Uses indexing if an index source is provided. Use Triangles as DrawMode with this source.
See : OgamlGraphics.IndexArray.Source
See : OgamlGraphics.VertexArray.Source
See : OgamlGraphics.IndexArray.Source
See : OgamlGraphics.VertexArray.Source
Iterators
Iterates through all faces of a model
Folds through all faces of a model
Maps a model face by face