pub struct BillboardBehavior { /* private fields */ }Expand description
BBSC — Billboard behavior (v0, 48 bytes)
Turns one bone to face the camera. The only source of billboarding there is: BoneFlag::Billboard1/2 are set on no bone in the whole corpus.
StarCraft II applies these at draw time, per view, from sub_10290A890 — CBBSolver::Solve is a stub — and writes the bone’s local rotation, so the subtree follows.
Implementations§
Source§impl BillboardBehavior
impl BillboardBehavior
Sourcepub fn dependents(&self) -> &[u16]
pub fn dependents(&self) -> &[u16]
Dependent bone indices (U16_). Empty in every shipped record; the engine never reads them
Zero-copy view of the underlying std::vector.
Sourcepub fn dependents_mut(&mut self) -> &mut [u16]
pub fn dependents_mut(&mut self) -> &mut [u16]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_dependents(&mut self, values: &[u16])
pub fn resize_dependents(&mut self, count: usize)
Sourcepub fn bone_index(&self) -> u16
pub fn bone_index(&self) -> u16
Index into BONE array
pub fn set_bone_index(&mut self, value: u16)
Sourcepub fn billboard_type(&self) -> u8
pub fn billboard_type(&self) -> u8
Which axes may turn — see BillboardType
pub fn set_billboard_type(&mut self, value: u8)
Sourcepub fn camera_look_at(&self) -> u8
pub fn camera_look_at(&self) -> u8
Non-zero: aim from this bone at the eye. Zero: aim along the camera’s view direction instead, so every such bone shares one orientation
pub fn set_camera_look_at(&mut self, value: u8)
Sourcepub fn up(&self) -> Quaternion
pub fn up(&self) -> Quaternion
MISNAMED: not a direction. A rotation applied before the billboard basis, and only by the axis-locked types 0/1/2
pub fn set_up(&mut self, value: Quaternion)
Sourcepub fn forward(&self) -> Quaternion
pub fn forward(&self) -> Quaternion
MISNAMED likewise: the same kind of pre-rotation, taken only by type 6, and only on a bone whose parent is another bone. Types 3/4/5 take neither