Interface VisualEmbedding
- All Superinterfaces:
VisualizationContext
This is intended to be used for large meta-visuals that may be composed of many block entities or entities.
Invoking a visualizer with a VisualEmbedding will create a "subvisual". The parent visual is responsible for managing
the lifecycle of subvisuals: deleting them, and optionally invoking their frame and tick plans. Subvisuals exist in
the real world from their perspective, and in general visuals should not care if they are within a VisualEmbedding.
However, if a visual wants to check it can use instanceof VisualEmbedding on its VisualizationContext.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete this embedding.voidtransforms(org.joml.Matrix4fc pose, org.joml.Matrix3fc normal) Set the transformation matrices for the embedding.Methods inherited from interface dev.engine_room.flywheel.api.visualization.VisualizationContext
createEmbedding, instancerProvider, renderOrigin
-
Method Details
-
transforms
void transforms(org.joml.Matrix4fc pose, org.joml.Matrix3fc normal) Set the transformation matrices for the embedding.- Parameters:
pose- The model matrix.normal- The normal matrix.
-
delete
void delete()Delete this embedding.After this method exits, the embedding will continue to function in the state it was in before this method was called. Once all child instancers are deleted, the resources owned by this embedding will be freed. Creating new instancers after calling this method will throw an error.
-