#[non_exhaustive]pub enum UniverseTemplate {
Menu,
Blank,
Fail,
DemoCity,
Dungeon,
Islands,
Atrium,
CornellBox,
MengerSponge,
LightingBench,
Random,
}Expand description
Selection of initial content for constructing a new Universe.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Menu
Provides an interactive menu of other templates.
Blank
New universe with no contents at all.
Fail
Always produces an error, for testing error-handling functionality.
DemoCity
Space with assorted “exhibits” demonstrating or testing various features of All is Cubes.
Dungeon
Randomly generated connected rooms. Someday this might have challenges or become a tutorial.
Islands
Large space with separate floating islands.
Atrium
A procedural voxel version of the classic Sponza Atrium rendering test scene.
CornellBox
A procedural voxel version of the classic Cornell Box rendering test scene.
MengerSponge
A Menger sponge fractal.
LightingBench
A test scene containing various shapes and colors to exercise the lighting algorithm.
Random
Use entirely random choices.
TODO: This doesn’t yet produce anything even visible — we need more sanity constraints.
Implementations§
Source§impl UniverseTemplate
impl UniverseTemplate
Sourcepub fn include_in_lists(&self) -> bool
pub fn include_in_lists(&self) -> bool
Whether the template should be shown to users. (This does not control )
Sourcepub async fn build<I: Instant>(
self,
p: YieldProgress,
params: TemplateParameters,
) -> Result<Universe, GenError>
pub async fn build<I: Instant>( self, p: YieldProgress, params: TemplateParameters, ) -> Result<Universe, GenError>
Create a new Universe based on this template’s specifications.
Trait Implementations§
Source§impl Clone for UniverseTemplate
impl Clone for UniverseTemplate
Source§fn clone(&self) -> UniverseTemplate
fn clone(&self) -> UniverseTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UniverseTemplate
impl Debug for UniverseTemplate
Source§impl Default for UniverseTemplate
impl Default for UniverseTemplate
Source§impl Display for UniverseTemplate
impl Display for UniverseTemplate
Source§impl<'_derivative_strum> From<&'_derivative_strum UniverseTemplate> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum UniverseTemplate> for &'static str
Source§fn from(x: &'_derivative_strum UniverseTemplate) -> &'static str
fn from(x: &'_derivative_strum UniverseTemplate) -> &'static str
Source§impl From<UniverseTemplate> for &'static str
impl From<UniverseTemplate> for &'static str
Source§fn from(x: UniverseTemplate) -> &'static str
fn from(x: UniverseTemplate) -> &'static str
Source§impl FromStr for UniverseTemplate
impl FromStr for UniverseTemplate
Source§impl Hash for UniverseTemplate
impl Hash for UniverseTemplate
Source§impl IntoEnumIterator for UniverseTemplate
impl IntoEnumIterator for UniverseTemplate
type Iterator = UniverseTemplateIter
fn iter() -> UniverseTemplateIter ⓘ
Source§impl PartialEq for UniverseTemplate
impl PartialEq for UniverseTemplate
Source§impl TryFrom<&str> for UniverseTemplate
impl TryFrom<&str> for UniverseTemplate
impl Eq for UniverseTemplate
impl StructuralPartialEq for UniverseTemplate
Auto Trait Implementations§
impl Freeze for UniverseTemplate
impl RefUnwindSafe for UniverseTemplate
impl Send for UniverseTemplate
impl Sync for UniverseTemplate
impl Unpin for UniverseTemplate
impl UnwindSafe for UniverseTemplate
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more