Skip to main content

Module object

Module object 

Source
Expand description

A collection of objects implementing the Object trait.

Objects can be rendered directly or used in a render call, for example RenderTarget::render. Use the Gm struct to combine any geometry and material into an Object.

Structs§

Axes
Three arrows indicating the three main axes; the x-axis (red), the y-axis (green) and the z-axis (blue). Used for easily debugging where objects are placed in the 3D world.
CpuModel
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.
CpuVoxelGrid
Volume data consisting of voxel data inside a cube.
Gm
A combination of a Geometry and a Material which implements Object. Use this to combine any geometry and material into an object that can be used in a render function for example RenderTarget::render. The only requirement is that the geometry provides all the per vertex information (normals, uv coordinates, etc.) that the material requires.
Imposters
A level-of-detail technique to replace rendering of high-poly meshes. Should only be used where details cannot be seen, for example when the objects are far away. A set of objects are rendered from different angles into a set of textures and the textures are then rendered continuously instead of the expensive objects.
InstancedModel
Similar to Model, except it is possible to render many instances of the same model efficiently.
InstancedModelPart
Part of an InstancedModel consisting of a InstancedMesh, some type of material and a set of possible animations.
Model
A 3D model consisting of a set of ModelParts.
ModelPart
Part of a Model consisting of a Mesh, some type of material and a set of possible animations. Can be converted to a Gm using Into if the animations are not needed.
Skybox
An illusion of a sky.
Terrain
A terrain geometry based on a height map and with an applied material.
VoxelGrid
A voxel grid inside a cube with a material type specified by the generic parameter.
Water
A water geometry with an applied material.
WaveParameters
A set of parameters that defines one wave of the water surface.
Wireframe
Renders a triangle mesh as a screen-space wireframe.

Enums§

Lod
Specifies the Level of Detail (LOD) for a geometry.

Constants§

MAX_WAVE_COUNT
The maximum number of waves.

Traits§

Object
Represents a 3D object which can be rendered directly or used in a render call, for example RenderTarget::render.