Struct ambient_guest_bridge::core::primitives::concepts::Sphere
source · pub struct Sphere {
pub sphere: (),
pub sphere_radius: f32,
pub sphere_sectors: u32,
pub sphere_stacks: u32,
}
Expand description
Sphere: A primitive sphere.
Required:
sphere
: If attached to an entity alongside the othersphere_*
components, the entity will be converted to a sphere primitive. To easily instantiate a unit-diametersphere
, consider using theSphere
concept.sphere_radius
: Set the radius of asphere
entity.sphere_sectors
: Set the longitudinal sectors of asphere
entity.sphere_stacks
: Set the latitudinal stacks of asphere
entity.
Fields§
§sphere: ()
Component: ambient_core::primitives::sphere
Suggested value: ()
Component description: If attached to an entity alongside the other sphere_*
components, the entity will be converted to a sphere primitive.
To easily instantiate a unit-diameter sphere
, consider using the Sphere
concept.
sphere_radius: f32
Component: ambient_core::primitives::sphere_radius
Suggested value: 0.5f32
Component description: Set the radius of a sphere
entity.
sphere_sectors: u32
Component: ambient_core::primitives::sphere_sectors
Suggested value: 36u32
Component description: Set the longitudinal sectors of a sphere
entity.
sphere_stacks: u32
Component: ambient_core::primitives::sphere_stacks
Suggested value: 18u32
Component description: Set the latitudinal stacks of a sphere
entity.
Trait Implementations§
source§impl Concept for Sphere
impl Concept for Sphere
source§fn get_spawned(id: EntityId) -> Option<Sphere>
fn get_spawned(id: EntityId) -> Option<Sphere>
If the entity with
id
exists and has the components defined by this concept, returns this concept with all of the values of the components in the entity. Read moresource§fn get_unspawned(entity: &Entity) -> Option<Sphere>
fn get_unspawned(entity: &Entity) -> Option<Sphere>
If the
entity
has the components defined by this concept, returns this concept with all of the values of the components in the entity. Read moresource§fn contained_by_spawned(id: EntityId) -> bool
fn contained_by_spawned(id: EntityId) -> bool
Returns true if
id
exists and contains the components defined by this concept. Read moresource§impl ConceptComponents for Sphere
impl ConceptComponents for Sphere
§type Required = (Component<()>, Component<f32>, Component<u32>, Component<u32>)
type Required = (Component<()>, Component<f32>, Component<u32>, Component<u32>)
A tuple of the required components for this concept.
source§fn required() -> <Sphere as ConceptComponents>::Required
fn required() -> <Sphere as ConceptComponents>::Required
Returns a tuple of the required components for this concept.
source§fn optional() -> <Sphere as ConceptComponents>::Optional
fn optional() -> <Sphere as ConceptComponents>::Optional
Returns a tuple of the optional components for this concept.
source§fn from_required_data(
required: <<Sphere as ConceptComponents>::Required as ComponentsTuple>::Data
) -> Sphere
fn from_required_data( required: <<Sphere as ConceptComponents>::Required as ComponentsTuple>::Data ) -> Sphere
Converts a tuple of data back to a concept.
source§fn as_query() -> ConceptQuery<Self>where
Self: Sized,
fn as_query() -> ConceptQuery<Self>where
Self: Sized,
Creates a
ConceptQuery
that can be passed into queries. Read moresource§impl ConceptSuggested for Sphere
impl ConceptSuggested for Sphere
source§impl<'de> Deserialize<'de> for Sphere
impl<'de> Deserialize<'de> for Sphere
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Sphere, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Sphere, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Sphere
impl PartialEq for Sphere
source§impl Serialize for Sphere
impl Serialize for Sphere
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Sphere
Auto Trait Implementations§
impl RefUnwindSafe for Sphere
impl Send for Sphere
impl Sync for Sphere
impl Unpin for Sphere
impl UnwindSafe for Sphere
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more