Expand description
Components that control the visibility of entities.
§What is the difference between visibility components
There are three components that indicate various kinds of visibility modes of an entity:
Visibility is the user-defined visibility.
It is the only component that users should typically add to an entity1,
the other two are then added automatically.
InheritedVisibility is computed by propagation through the entity hierarchy.
Entities with Visibility::Inherited copy the visibility
of their parent entities. If they have no ChildOf component, they are visible.
The propagation is done in visibility_propagate_system, which runs
in the PostUpdate schedule.
ViewVisibility indicates whether the entity should be
extracted for rendering. This component is recomputed in every frame
in the PostUpdate schedule.
If at all – most components that go together with
Visibilityalready require it, so users only need to explicitly add it if they wish to override the default value ofVisibility::Inherited. ↩
Structs§
- Cascades
Visible Entities - Cubemap
Visible Entities - Dynamic
Skinned Mesh Bounds - Use this component to enable dynamic skinned mesh bounds. The
Aabbcomponent of the skinned mesh will be automatically updated each frame based on the current joint transforms. - Inherited
Visibility - Whether or not an entity is visible in the hierarchy.
- NoAuto
Aabb - Add this component to an entity to prevent its
AABBfrom being automatically recomputed. - NoCpu
Culling - Use this component to opt-out of the built-in CPU frustum culling, see
Frustum. This can be attached to aCameraor to individual entities. - NoFrustum
Culling - Use this component to opt-out of built-in frustum culling for entities, see
Frustum. - Render
Layers - Defines which rendering layers an entity belongs to.
- View
Visibility - Algorithmically computed indication of whether an entity is visible and should be extracted for rendering.
- Visibility
Class - A bucket into which we group entities for the purposes of visibility.
- Visibility
Plugin - Visibility
Range - Specifies the range of distances that this entity must be from the camera in order to be rendered.
- Visibility
Range Plugin - A plugin that enables
VisibilityRanges, which allow entities to be hidden or shown based on distance to the camera. - Visible
Entities - Collection of entities visible from the current view.
- Visible
Entity Ranges - Stores which entities are in within the
VisibilityRanges of views. - Visible
Mesh Entities - Collection of mesh entities visible for 3D lighting.
Enums§
- Visibility
- User indication of whether an entity is visible. Propagates down the entity hierarchy.
- Visibility
Systems
Constants§
Traits§
Functions§
- add_
visibility_ class - A generic component add hook that automatically adds the appropriate
VisibilityClassto an entity. - calculate_
bounds - Computes and adds an
Aabbcomponent to entities with aMesh3dcomponent and without aNoFrustumCullingcomponent. - check_
visibility_ cpu_ culling - System updating the visibility of entities, other than those that have opted out of CPU culling, each frame.
- check_
visibility_ gpu_ culling - Updates the visibility of entities marked with
NoCpuCulling. - check_
visibility_ ranges - Checks all entities against all views in order to determine which entities
with
VisibilityRanges are potentially visible. - update_
frusta - Updates
Frustum.
Type Aliases§
- Layer
- An identifier for a rendering layer.