pub struct Sprite {Show 80 fields
pub image_id: Option<ImageId>,
pub mask_image_id: Option<ImageId>,
pub mask_offset_x: i32,
pub mask_offset_y: i32,
pub tonecurve_image_id: Option<ImageId>,
pub tonecurve_row: f32,
pub tonecurve_sat: f32,
pub fit: SpriteFit,
pub size_mode: SpriteSizeMode,
pub visible: bool,
pub alpha: u8,
pub x: i32,
pub y: i32,
pub z: f32,
pub scale_x: f32,
pub scale_y: f32,
pub scale_z: f32,
pub rotate: f32,
pub rotate_x: f32,
pub rotate_y: f32,
pub pivot_x: f32,
pub pivot_y: f32,
pub pivot_z: f32,
pub object_anchor: bool,
pub texture_center_x: f32,
pub texture_center_y: f32,
pub camera_enabled: bool,
pub camera_eye: [f32; 3],
pub camera_target: [f32; 3],
pub camera_up: [f32; 3],
pub camera_view_angle_deg: f32,
pub culling: bool,
pub alpha_test: bool,
pub alpha_blend: bool,
pub fog_use: bool,
pub light_no: i32,
pub light_enabled: bool,
pub light_diffuse: [f32; 4],
pub light_ambient: [f32; 4],
pub light_specular: [f32; 4],
pub light_factor: f32,
pub light_kind: i32,
pub light_pos: [f32; 4],
pub light_dir: [f32; 4],
pub light_atten: [f32; 4],
pub light_cone: [f32; 4],
pub mesh_runtime_lights: Vec<SpriteRuntimeLight>,
pub fog_enabled: bool,
pub fog_color: [f32; 4],
pub fog_near: f32,
pub fog_far: f32,
pub fog_scroll_x: f32,
pub fog_texture_image_id: Option<ImageId>,
pub world_no: i32,
pub billboard: bool,
pub mesh_file_name: Option<String>,
pub mesh_animation: MeshAnimationState,
pub mesh_kind: u8,
pub shadow_cast: bool,
pub shadow_receive: bool,
pub wipe_fx_mode: u8,
pub wipe_fx_params: [f32; 4],
pub wipe_src_image_id: Option<ImageId>,
pub tr: u8,
pub mono: u8,
pub reverse: u8,
pub bright: u8,
pub dark: u8,
pub color_rate: u8,
pub color_add_r: u8,
pub color_add_g: u8,
pub color_add_b: u8,
pub color_r: u8,
pub color_g: u8,
pub color_b: u8,
pub mask_mode: u8,
pub blend: SpriteBlend,
pub dst_clip: Option<ClipRect>,
pub src_clip: Option<ClipRect>,
pub order: i32,
}Fields§
§image_id: Option<ImageId>§mask_image_id: Option<ImageId>§mask_offset_x: i32§mask_offset_y: i32§tonecurve_image_id: Option<ImageId>§tonecurve_row: f32§tonecurve_sat: f32§fit: SpriteFit§size_mode: SpriteSizeMode§visible: bool§alpha: u8§x: i32§y: i32§z: f32§scale_x: f32§scale_y: f32§scale_z: f32§rotate: f32§rotate_x: f32§rotate_y: f32§pivot_x: f32§pivot_y: f32§pivot_z: f32§object_anchor: boolSiglus object sprites use OBJECT.X/Y as the render anchor. For G00/PCT object resources, vertices are offset by OBJECT.CENTER plus the texture center stored in the cut metadata. Runtime helper sprites keep this off and continue to use x/y as a top-left pixel rectangle.
texture_center_x: f32§texture_center_y: f32§camera_enabled: bool§camera_eye: [f32; 3]§camera_target: [f32; 3]§camera_up: [f32; 3]§camera_view_angle_deg: f32§culling: bool§alpha_test: bool§alpha_blend: bool§fog_use: bool§light_no: i32§light_enabled: bool§light_diffuse: [f32; 4]§light_ambient: [f32; 4]§light_specular: [f32; 4]§light_factor: f32§light_kind: i32§light_pos: [f32; 4]§light_dir: [f32; 4]§light_atten: [f32; 4]§light_cone: [f32; 4]§mesh_runtime_lights: Vec<SpriteRuntimeLight>§fog_enabled: bool§fog_color: [f32; 4]§fog_near: f32§fog_far: f32§fog_scroll_x: f32§fog_texture_image_id: Option<ImageId>§world_no: i32§billboard: bool§mesh_file_name: Option<String>§mesh_animation: MeshAnimationState§mesh_kind: u80 = regular sprite or 2D camera quad, 1 = static mesh, 2 = billboard mesh, 3 = skinned mesh.
shadow_cast: bool§shadow_receive: bool§wipe_fx_mode: u8Runtime wipe/effect family applied by the renderer. 0=none, 1=mosaic, 2=raster_h, 3=raster_v, 4=explosion_blur, 5=shimi, 6=shimi_inv, 10=cross_mosaic, 11=cross_raster_h, 12=cross_raster_v, 13=cross_explosion_blur.
wipe_fx_params: [f32; 4]§wipe_src_image_id: Option<ImageId>Optional secondary source texture for dual-source wipe/effect composition.
tr: u8§mono: u8§reverse: u8§bright: u8§dark: u8§color_rate: u8§color_add_r: u8§color_add_g: u8§color_add_b: u8§color_r: u8§color_g: u8§color_b: u8§mask_mode: u80 = off, 1 = use luminance as alpha, 2 = use texture alpha.
blend: SpriteBlend§dst_clip: Option<ClipRect>§src_clip: Option<ClipRect>§order: i32Render order within a layer (ascending).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sprite
impl RefUnwindSafe for Sprite
impl Send for Sprite
impl Sync for Sprite
impl Unpin for Sprite
impl UnsafeUnpin for Sprite
impl UnwindSafe for Sprite
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.