Class AbstractScene
java.lang.Object
dev.engine.core.scene.AbstractScene
- Direct Known Subclasses:
FlatScene, HierarchicalScene
Base class for all scene implementations.
Manages entities and their components. Emits transactions when components change.
Uses TransactionBus for thread-safe transaction delivery between
the logic thread (which emits) and render thread (which drains).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectWell-known subscriber key for the renderer.protected final TransactionBus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Entityabstract voiddestroyEntity(Handle<EntityTag> entity) voiddestroyEntity(Entity entity) Convenience: destroy by Entity reference.protected List<Transaction> getLocalTransform(Handle<EntityTag> entity) getLocalTransform(Entity entity) Convenience overload accepting Entity directly.abstract Mat4getWorldTransform(Handle<EntityTag> entity) getWorldTransform(Entity entity) Convenience overload accepting Entity directly.voidsetLocalTransform(Handle<EntityTag> entity, Mat4 transform) voidsetLocalTransform(Entity entity, Mat4 transform) Convenience overload accepting Entity directly.voidsetMaterial(Handle<EntityTag> entity, Handle<MaterialTag> material) Legacy: assign a material handle to an entity.voidsetMaterial(Entity entity, Handle<MaterialTag> material) Legacy: assign a material handle to an entity by Entity reference.voidsetMaterialProperties(Entity entity, PropertyMap<MaterialData> props) Sets all material properties at once via a PropertyMap.<T> voidsetMaterialProperty(Handle<EntityTag> entity, PropertyKey<MaterialData, T> key, T value) <T> voidsetMaterialProperty(Entity entity, PropertyKey<MaterialData, T> key, T value) Convenience overload accepting Entity directly.voidLegacy: assign a mesh handle to an entity.voidLegacy: assign a mesh handle to an entity by Entity reference.Returns the transaction bus for additional subscriber registration.
-
Field Details
-
RENDERER_SUBSCRIBER
Well-known subscriber key for the renderer. -
transactions
-
entityMap
-
-
Constructor Details
-
AbstractScene
protected AbstractScene()
-
-
Method Details
-
createEntity
-
destroyEntity
-
getWorldTransform
-
setLocalTransform
-
setLocalTransform
-
getLocalTransform
-
getLocalTransform
-
getWorldTransform
-
destroyEntity
Convenience: destroy by Entity reference. -
setMaterialProperty
public <T> void setMaterialProperty(Handle<EntityTag> entity, PropertyKey<MaterialData, T> key, T value) -
setMaterialProperty
Convenience overload accepting Entity directly. -
setMaterialProperties
Sets all material properties at once via a PropertyMap. -
setMesh
-
setMesh
-
setMaterial
Legacy: assign a material handle to an entity. -
setMaterial
Legacy: assign a material handle to an entity by Entity reference. -
entity
-
query
-
transactionBus
Returns the transaction bus for additional subscriber registration. -
drainTransactions
-