pub struct Skybox<T: TextureCube> { /* private fields */ }Expand description
An illusion of a sky.
Implementations
sourceimpl<T: TextureDataType> Skybox<TextureCubeMap<T>>
impl<T: TextureDataType> Skybox<TextureCubeMap<T>>
sourcepub fn new(
context: &Context,
cpu_texture: &CPUTextureCube<T>
) -> ThreeDResult<Skybox<TextureCubeMap<T>>>
pub fn new(
context: &Context,
cpu_texture: &CPUTextureCube<T>
) -> ThreeDResult<Skybox<TextureCubeMap<T>>>
Creates a new skybox with the given cpu-side version of a TextureCubeMap.
sourcepub fn new_from_equirectangular(
context: &Context,
cpu_texture: &CPUTexture<T>
) -> ThreeDResult<Skybox<TextureCubeMap<T>>>
pub fn new_from_equirectangular(
context: &Context,
cpu_texture: &CPUTexture<T>
) -> ThreeDResult<Skybox<TextureCubeMap<T>>>
Creates a new skybox with a cube texture generated from the equirectangular texture given as input.
sourceimpl<T: TextureCube> Skybox<T>
impl<T: TextureCube> Skybox<T>
sourcepub fn new_with_texture(
context: &Context,
texture: T
) -> ThreeDResult<Skybox<T>>
pub fn new_with_texture(
context: &Context,
texture: T
) -> ThreeDResult<Skybox<T>>
Creates a new skybox with the given TextureCubeMap.
sourcepub fn texture(&self) -> &impl TextureCube
pub fn texture(&self) -> &impl TextureCube
Returns a reference to the cube map texture
sourcepub fn render(&self, camera: &Camera) -> ThreeDResult<()>
pub fn render(&self, camera: &Camera) -> ThreeDResult<()>
Render the skybox.
Auto Trait Implementations
impl<T> !RefUnwindSafe for Skybox<T>
impl<T> !Send for Skybox<T>
impl<T> !Sync for Skybox<T>
impl<T> Unpin for Skybox<T> where
T: Unpin,
impl<T> !UnwindSafe for Skybox<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more