pub struct Render { /* private fields */ }
Expand description
Render component.
Lets you configure the look of a entity by assigning a mesh. Usually accessed through entity.render().
Implementations
sourceimpl Render
impl Render
sourcepub fn shape(&self) -> ValueAccessorDataReadWrite<Shape>
pub fn shape(&self) -> ValueAccessorDataReadWrite<Shape>
Returns a ValueAccessor
for the shape used by the entity.
Used to set/get the shape. Sets which render shape is attached to the render component of this entity (assuming it has one).
sourcepub fn mesh(&self) -> ValueAccessorDataReadWrite<WorldMesh>
pub fn mesh(&self) -> ValueAccessorDataReadWrite<WorldMesh>
Returns a ValueAccessor
for the mesh used by the entity.
Used to set the mesh Sets which mesh is attached to the render component of this entity (assuming it has one).
sourcepub fn mesh_style(&self) -> ValueAccessorReadWrite<Option<MeshStyle>>
pub fn mesh_style(&self) -> ValueAccessorReadWrite<Option<MeshStyle>>
Returns a ValueAccessor
for the optional mesh style.
Used to set/get the mesh style. See MeshStyle
.
sourcepub fn visible(&self) -> ValueAccessorReadWrite<bool>
pub fn visible(&self) -> ValueAccessorReadWrite<bool>
Controls whether the entity will be rendered or not.
sourcepub fn player_id_set(&self) -> ValueAccessorDataReadWrite<PlayerIdSet>
pub fn player_id_set(&self) -> ValueAccessorDataReadWrite<PlayerIdSet>
Returns a ValueAccessor
for the set of player ids this mesh should be displayed for.
Used to set/get the player id set. Sets which player id set is attached to the render component of this entity (assuming it has one).
sourcepub fn dynamic_module_data(&self) -> ValueAccessorDataReadWrite<BinaryData>
pub fn dynamic_module_data(&self) -> ValueAccessorDataReadWrite<BinaryData>
Returns a ValueAccessor
for setting dynamic data that is passed to the render module.
Data is expected to be of type “Binary”
Used to set/get the dynamic data. The dynamic data is only used if the render component has the Shape
RenderModule
.
Trait Implementations
sourceimpl ComponentTrait for Render
impl ComponentTrait for Render
sourcefn get_type() -> ComponentType
fn get_type() -> ComponentType
The type of the component, as a ComponentType
enum.
sourcefn from_entity(handle: Entity) -> Self
fn from_entity(handle: Entity) -> Self
Adopt an Entity
, wrap in a component struct.
Auto Trait Implementations
impl RefUnwindSafe for Render
impl Send for Render
impl Sync for Render
impl Unpin for Render
impl UnwindSafe for Render
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more