pub struct CameraSetting { /* private fields */ }Expand description
Camera positioning and field-of-view settings for a portrait.
Defines how the camera is positioned relative to the character model when rendering a portrait. The camera has an auto-level feature that compensates for vertical rotation (pitch) exceeding 90/-90 degrees.
Implementations§
Source§impl CameraSetting
impl CameraSetting
Sourcepub fn skeleton_node(&self) -> &String
pub fn skeleton_node(&self) -> &String
Skeleton bone to use as the camera focus point.
If specified, all camera offsets and rotations are relative to this bone’s position. Common values include head or chest bones.
Source§impl CameraSetting
impl CameraSetting
Sourcepub fn distance_mut(&mut self) -> &mut f32
pub fn distance_mut(&mut self) -> &mut f32
Camera distance. Only used in version 1.
Sourcepub fn skeleton_node_mut(&mut self) -> &mut String
pub fn skeleton_node_mut(&mut self) -> &mut String
Skeleton bone to use as the camera focus point.
If specified, all camera offsets and rotations are relative to this bone’s position. Common values include head or chest bones.
Source§impl CameraSetting
impl CameraSetting
Sourcepub fn set_z(&mut self, val: f32) -> &mut Self
pub fn set_z(&mut self, val: f32) -> &mut Self
Distance from the character along the Z axis (depth).
Sourcepub fn set_y(&mut self, val: f32) -> &mut Self
pub fn set_y(&mut self, val: f32) -> &mut Self
Vertical displacement of the camera (height offset).
Sourcepub fn set_yaw(&mut self, val: f32) -> &mut Self
pub fn set_yaw(&mut self, val: f32) -> &mut Self
Horizontal rotation angle in degrees (left/right).
Sourcepub fn set_pitch(&mut self, val: f32) -> &mut Self
pub fn set_pitch(&mut self, val: f32) -> &mut Self
Vertical rotation angle in degrees (up/down).
Sourcepub fn set_distance(&mut self, val: f32) -> &mut Self
pub fn set_distance(&mut self, val: f32) -> &mut Self
Camera distance. Only used in version 1.
Sourcepub fn set_theta(&mut self, val: f32) -> &mut Self
pub fn set_theta(&mut self, val: f32) -> &mut Self
Spherical coordinate theta. Only used in version 1.
Sourcepub fn set_phi(&mut self, val: f32) -> &mut Self
pub fn set_phi(&mut self, val: f32) -> &mut Self
Spherical coordinate phi. Only used in version 1.
Sourcepub fn set_skeleton_node(&mut self, val: String) -> &mut Self
pub fn set_skeleton_node(&mut self, val: String) -> &mut Self
Skeleton bone to use as the camera focus point.
If specified, all camera offsets and rotations are relative to this bone’s position. Common values include head or chest bones.
Trait Implementations§
Source§impl Clone for CameraSetting
impl Clone for CameraSetting
Source§fn clone(&self) -> CameraSetting
fn clone(&self) -> CameraSetting
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CameraSetting
impl Debug for CameraSetting
Source§impl Default for CameraSetting
impl Default for CameraSetting
Source§fn default() -> CameraSetting
fn default() -> CameraSetting
Source§impl<'de> Deserialize<'de> for CameraSetting
impl<'de> Deserialize<'de> for CameraSetting
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CameraSetting
impl PartialEq for CameraSetting
Source§impl Serialize for CameraSetting
impl Serialize for CameraSetting
impl StructuralPartialEq for CameraSetting
Auto Trait Implementations§
impl Freeze for CameraSetting
impl RefUnwindSafe for CameraSetting
impl Send for CameraSetting
impl Sync for CameraSetting
impl Unpin for CameraSetting
impl UnsafeUnpin for CameraSetting
impl UnwindSafe for CameraSetting
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.