Struct feo_oop_engine::scene::game_object::light::point_light::PointLight
source · [−]pub struct PointLight {
pub subspace: Space,
/* private fields */
}Expand description
Allows applying a directional light source to a scene.
Fields
subspace: SpaceImplementations
pub fn new(
name: Option<&str>,
parent: Option<Arc<RwLock<dyn GameObject>>>,
intensity: f32,
color: RGB,
position: Option<Vector3<f32>>,
rotation: Option<Quaternion<f32>>,
scale_factor: Option<Vector3<f32>>,
script: Option<Box<Script<Self>>>,
engine_globals: EngineGlobals
) -> Arc<RwLock<PointLight>>
pub fn new(
name: Option<&str>,
parent: Option<Arc<RwLock<dyn GameObject>>>,
intensity: f32,
color: RGB,
position: Option<Vector3<f32>>,
rotation: Option<Quaternion<f32>>,
scale_factor: Option<Vector3<f32>>,
script: Option<Box<Script<Self>>>,
engine_globals: EngineGlobals
) -> Arc<RwLock<PointLight>>
Initializes the directional lighting system.
pub fn draw<N, C, S, D>(
&self,
graphics_system: GraphicsSystem,
viewport_dimensions: [u32; 2],
normals_input: N,
diffuse_input: C,
specular_input: S,
depth_input: D,
screen_to_camera: Matrix4<f32>,
to_camera_space: Space
) -> AutoCommandBuffer where
N: ImageViewAbstract + Send + Sync + 'static,
C: ImageViewAbstract + Send + Sync + 'static,
S: ImageViewAbstract + Send + Sync + 'static,
D: ImageViewAbstract + Send + Sync + 'static,
Trait Implementations
Safety Read more
Adds self’s visible characteristics and its children to the draw pass.
fn load_into_managers(
&self,
this: ParentWrapper,
draw_pass_manager: &mut DrawPassManager,
lighting_pass_manager: &mut LightingPassManager
)
fn load_into_managers(
&self,
this: ParentWrapper,
draw_pass_manager: &mut DrawPassManager,
lighting_pass_manager: &mut LightingPassManager
)
Adds self’s relevant characteristics and its children to the pass managers.
Adds a triangle mesh to the Drawable struct
Checks if an object is visible
fn get_texture_indices_buffer(
&self
) -> Vec<Option<Arc<CpuAccessibleBuffer<[TextureIndex]>>>>
fn cast_camera_arc_rwlock(
&self,
this: Arc<RwLock<dyn GameObject>>
) -> Result<Arc<RwLock<dyn Camera>>, ()>
fn cast_light_arc_rwlock(
&self,
this: Arc<RwLock<dyn GameObject>>
) -> Result<Arc<RwLock<dyn Light>>, ()>
fn new_system<L>(gfx_queue: Arc<Queue>, subpass: Subpass<L>) -> GraphicsSystem where
L: RenderPassAbstract + Sync + Send + 'static,
fn new_system<L>(gfx_queue: Arc<Queue>, subpass: Subpass<L>) -> GraphicsSystem where
L: RenderPassAbstract + Sync + Send + 'static,
Creates a new system
Returns the index of the system.
fn pass<'b, 'p: 'b>(
&self,
pass_builder: &'b mut PassBuilder<'p>,
gfx_system: GraphicsSystem
)
fn pass<'b, 'p: 'b>(
&self,
pass_builder: &'b mut PassBuilder<'p>,
gfx_system: GraphicsSystem
)
Executes the system
fn cast_gameobject_arc_rwlock(
&self,
this: Arc<RwLock<dyn Light>>
) -> Arc<RwLock<dyn GameObject>>
Safety Read more
unsafe fn replace_child(
&mut self,
old: Arc<RwLock<dyn GameObject>>,
new: Arc<RwLock<dyn GameObject>>
) -> Result<(), ()>
unsafe fn replace_child(
&mut self,
old: Arc<RwLock<dyn GameObject>>,
new: Arc<RwLock<dyn GameObject>>
) -> Result<(), ()>
Safety Read more
Auto Trait Implementations
impl !RefUnwindSafe for PointLight
impl Send for PointLight
impl Sync for PointLight
impl Unpin for PointLight
impl !UnwindSafe for PointLight
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.