Contents

class

SushiEngine::Simulation::IWorldEditor

The editor's read/write surface onto the live world.

Declared in
engine/world/simulation/include/SushiEngine/simulation/world_editor.hpp

See also

engine/world/simulation/include/EDITOR.md

Public Methods

~IWorldEditor
entities

The live entities in display order.

exists

Whether id names a live entity.

name

The entity's display name (empty if it does not exist).

entity_id

Returns which entity this is, within its scene document.

prefab_entity_id

Returns which member of a prefab document this entity is.

transform

The entity's transform (identity if it does not exist).

world_transform

The entity's world transform.

gravity_at

Returns the gravitational acceleration the world applies at position, m/s2.

color

The entity's base colour (zero if it does not exist).

material

Returns the material painting one of the entity's submeshes.

material_slot

Returns one of the entity's material slots, binding and overrides included.

material_slot_count

How many material slots the entity's Mesh Renderer holds.

environment

The scene-global lighting environment (sun, planet, atmosphere).

visible

Whether the entity is drawn.

enabled

Whether the entity's own flag is set (Unity's activeSelf).

enabled_in_hierarchy

Whether the entity and every ancestor above it are enabled (Unity's activeInHierarchy).

create

Creates a static entity at the origin and selects nothing.

destroy

Destroys id; a no-op if it does not exist.

request_destroy

Queues id and its whole subtree for removal at this tick's flush point.

request_instantiate

Queues a new entity for creation at this tick's flush point.

set_name

Sets the entity's display name.

set_entity_id

Sets which entity this is, within its scene document.

set_prefab_entity_id

Sets which member of a prefab document this entity is.

set_transform

Writes the entity's local transform component.

set_world_transform

Sets the entity's world transform by recomputing its local transform.

entity_frame

The entity's reference frame (scene root if it never picked one).

set_entity_frame

Sets the entity's reference frame (body + mode).

resolved_frame_mode

Returns the FrameMode the entity's frame resolves to this step.

resolved_reference_body

Returns the body the entity's frame resolves against this step.

frame_local_transform

Returns the entity's transform expressed in its reference frame.

set_frame_local_transform

Writes the entity's scene transform from a frame-local one.

is_surface_frame

Returns whether the entity's frame resolves to Surface (ground-fixed) mode.

set_color

Writes the entity's base colour.

set_material_slot

Writes one of the entity's material slots.

set_material_slot_count

Grows or shrinks the entity's material slots to count.

resolve_bound_materials

Re-resolves every bound material slot in the world against source.

has_pending_material_resolve

Returns whether a bound material slot is waiting for its first resolve.

set_environment

Writes the scene-global lighting environment.

weather_mode

Returns where this scene's weather comes from.

set_weather_mode

Installs the provider the given mode calls for.

weather_seed

The seed Manual mode places its weather from.

set_weather_seed

Chooses the sky Manual mode places.

weather_authoring

Returns the installed weather provider's authoring surface, or null.

weather_provider

Returns the installed weather provider, read-only, or null if none is installed.

set_visible

Sets whether the entity is drawn.

set_enabled

Sets the entity's own flag (Unity's activeSelf).

parent

The entity's parent, or NULL_ENTITY if it is a root.

set_parent

Reparents child under new_parent.

move_entity

Changes the display order of an entity relative to a target entity.

has_component

Whether id carries the component component names.

set_has_component

Attaches or detaches the component component names on id.

read_component

Copies the bytes of id's component into out.

write_component

Overwrites id's component with size bytes from value.

component

Reads id's component T, or T{} when it carries none.

set_component

Overwrites id's component T with value.

particle_effect_source

Returns the effect an emitter entity owns.

set_particle_effect_source

Replaces the effect an emitter entity owns.

particle_effect_texture_assets

Returns the permanent source of each of id's emitter sprites.

set_particle_effect_texture_assets

Replaces the per-emitter asset ids id's sprites resolve from.

collision_queries

Returns the collision world's query surface: raycast, overlap, sweep and closest point.

character_service

Returns the capsule-move surface a character controller resolves through.

register_animator_skeleton

Loads a glTF skeleton into the shared animation database (design §12.3).

register_animator_clip

Loads a glTF animation clip into the shared animation database (design §12.3).

register_animator_controller

Compiles a one-clip controller for skeleton_handle and registers it.

animator_palette

Returns the Animator's current skin palette, object space, ready to upload.

animator_previous_palette

Returns the Animator's palette from the previous tick, for motion vectors.

prefab_instance_base

Returns the document the instance rooted at id was built from.

set_prefab_instance_base

Stores document as the base of the instance rooted at id.

resolve_bound_sounds

Resolves every audio emitter's authored sound id to a handle.

resolved_submeshes

The mesh handles the entity's filter last resolved to.

resolve_bound_meshes

Re-resolves every Mesh Filter in the world against source.

joint_load

Reads the load the last step left on id's joint.

joint_broken

Returns whether id's joint has broken and is gone from the solve.

physics_body_debug

Reads where a body is, how big its broadphase bound is and whether it sleeps.

physics_contacts

Returns everything touching, as of the last step.

surface_anchored

Returns whether id's orientation is currently expressed ground-locally.

surface_local_orientation

The entity's ground-local orientation (identity if not anchored).

set_surface_local_orientation

Restores id's ground-local orientation, verbatim.

set_surface_anchored

Forces id's frame universe; a legacy compatibility toggle.

surface_heading_reference

Returns the entity's carried parallel-transport heading reference.

set_surface_heading_reference

Restores id's carried heading reference, verbatim.

surface_heading_body

Returns the reference body surface_heading_reference was last advanced against.

set_surface_heading_body

Restores the chart id's carried heading reference belongs to.

surface_heading_previous_up

Returns the local vertical surface_heading_reference was last transported from.

set_surface_heading_previous_up

Restores id's previous local vertical, verbatim.

surface_heading_compass_degrees

Returns the entity's carried heading reference as a compass bearing.

reset_surface_heading_to_north

Resets id's carried heading reference to point at true north.

is_canvas

Whether id is a UI Canvas (a UI element of kind Canvas).

script_components

The type names of every script component attached to id, in order.

has_script_component

Whether id carries a script component named type_name.

script_component

The named script component's authored fields (empty if absent).

add_script_component

Attaches a script component instance to id.

set_script_component

Overwrites the fields of the like-named script component on id; a no-op if absent.

remove_script_component

Detaches the script component named type_name; a no-op if absent.

send_message

Broadcasts a named message to every behavior on target.

set_ui_target_size

Tells the world the pixel size the UI is currently being viewed at.

set_matter_debug

Asks the matter scene to publish every body's intact beams, or stops it.

forget_resolved_meshes

Drops every Mesh Filter's resolved handles, and counts what it dropped.