pub struct Skybox { /* private fields */ }Expand description
An illusion of a sky.
Implementations
sourceimpl Skybox
impl Skybox
sourcepub fn new(
context: &Context,
cpu_texture: &CpuTextureCube
) -> ThreeDResult<Self>
pub fn new(
context: &Context,
cpu_texture: &CpuTextureCube
) -> ThreeDResult<Self>
Creates a new skybox with the given cpu-side version of a TextureCubeMap.
sourcepub fn new_from_equirectangular(
context: &Context,
cpu_texture: &CpuTexture
) -> ThreeDResult<Self>
pub fn new_from_equirectangular(
context: &Context,
cpu_texture: &CpuTexture
) -> ThreeDResult<Self>
Creates a new skybox with a cube texture generated from the equirectangular texture given as input.
sourcepub fn new_with_texture(
context: &Context,
texture: TextureCubeMap
) -> ThreeDResult<Self>
pub fn new_with_texture(
context: &Context,
texture: TextureCubeMap
) -> ThreeDResult<Self>
Creates a new skybox with the given TextureCubeMap.
sourcepub fn texture(&self) -> &TextureCubeMap
pub fn texture(&self) -> &TextureCubeMap
Returns a reference to the cube map texture
Trait Implementations
sourceimpl Geometry for Skybox
impl Geometry for Skybox
sourcefn aabb(&self) -> AxisAlignedBoundingBox
fn aabb(&self) -> AxisAlignedBoundingBox
Returns the AxisAlignedBoundingBox for this geometry in the global coordinate system. Read more
sourcefn render_with_material(
&self,
material: &dyn Material,
camera: &Camera,
lights: &[&dyn Light]
) -> ThreeDResult<()>
fn render_with_material(
&self,
material: &dyn Material,
camera: &Camera,
lights: &[&dyn Light]
) -> ThreeDResult<()>
Render the geometry with the given material.
Must be called in a render target render function,
for example in the callback function of Screen::write.
You can use an empty array for the lights argument, if you know the object does not require lights to be rendered. Read more
sourceimpl Object for Skybox
impl Object for Skybox
sourcefn render(&self, camera: &Camera, lights: &[&dyn Light]) -> ThreeDResult<()>
fn render(&self, camera: &Camera, lights: &[&dyn Light]) -> ThreeDResult<()>
Render the object.
Must be called in a render target render function,
for example in the callback function of Screen::write.
You can use an empty array for the lights argument, if you know the object does not require lights to be rendered. Read more
sourcefn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether or not this object should be considered transparent. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Skybox
impl !Send for Skybox
impl !Sync for Skybox
impl Unpin for Skybox
impl !UnwindSafe for Skybox
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
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>
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