Struct ambient_guest_bridge::core::primitives::concepts::Torus
source · pub struct Torus {
pub torus: (),
pub torus_inner_radius: f32,
pub torus_outer_radius: f32,
pub torus_slices: u32,
pub torus_loops: u32,
}
Expand description
Torus: A primitive Torus, surface of revolution generated by revolving a circle in three-dimensional space one full revolution.
Required:
torus
: If attached to an entity alongside the othertorus_*
components, the entity will be converted to a torus primitive. To easily instantiate a defaulttorus
, consider using theTorus
concept.torus_inner_radius
: Set the inner radius of atorus
entity, spanning XY-plane.torus_outer_radius
: Set the outer radius of atorus
entity, spanning XY-plane.torus_slices
: Set the slices of atorus
entity, spanning XY-plane.torus_loops
: Set the loops of atorus
entity, spanning XY-plane.
Fields§
§torus: ()
Component: ambient_core::primitives::torus
Suggested value: ()
Component description: If attached to an entity alongside the other torus_*
components, the entity will be converted to a torus primitive.
To easily instantiate a default torus
, consider using the Torus
concept.
torus_inner_radius: f32
Component: ambient_core::primitives::torus_inner_radius
Suggested value: 0.25f32
Component description: Set the inner radius of a torus
entity, spanning XY-plane.
torus_outer_radius: f32
Component: ambient_core::primitives::torus_outer_radius
Suggested value: 0.35f32
Component description: Set the outer radius of a torus
entity, spanning XY-plane.
torus_slices: u32
Component: ambient_core::primitives::torus_slices
Suggested value: 32u32
Component description: Set the slices of a torus
entity, spanning XY-plane.
torus_loops: u32
Component: ambient_core::primitives::torus_loops
Suggested value: 16u32
Component description: Set the loops of a torus
entity, spanning XY-plane.
Trait Implementations§
source§impl Concept for Torus
impl Concept for Torus
source§fn get_spawned(id: EntityId) -> Option<Torus>
fn get_spawned(id: EntityId) -> Option<Torus>
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<Torus>
fn get_unspawned(entity: &Entity) -> Option<Torus>
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
id
exists and contains the components defined by this concept. Read moresource§impl ConceptComponents for Torus
impl ConceptComponents for Torus
§type Required = (Component<()>, Component<f32>, Component<f32>, Component<u32>, Component<u32>)
type Required = (Component<()>, Component<f32>, Component<f32>, Component<u32>, Component<u32>)
source§fn required() -> <Torus as ConceptComponents>::Required
fn required() -> <Torus as ConceptComponents>::Required
source§fn optional() -> <Torus as ConceptComponents>::Optional
fn optional() -> <Torus as ConceptComponents>::Optional
source§fn from_required_data(
required: <<Torus as ConceptComponents>::Required as ComponentsTuple>::Data
) -> Torus
fn from_required_data( required: <<Torus as ConceptComponents>::Required as ComponentsTuple>::Data ) -> Torus
source§fn as_query() -> ConceptQuery<Self>where
Self: Sized,
fn as_query() -> ConceptQuery<Self>where
Self: Sized,
ConceptQuery
that can be passed into queries. Read more