#![allow(clippy::too_many_arguments)]
#[allow(unused_imports)]
use crate::support::{BorrowedSlice, Bytes};
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum InterpolationType {
None = 0,
Linear = 1,
Bezier = 2,
Hermite = 3,
}
impl TryFrom<i32> for InterpolationType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(InterpolationType::None),
1 => Ok(InterpolationType::Linear),
2 => Ok(InterpolationType::Bezier),
3 => Ok(InterpolationType::Hermite),
other => Err(crate::Error::UnknownEnum {
name: "InterpolationType",
value: other,
}),
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct GlobalFlag(pub i32);
impl GlobalFlag {
pub const NONE: Self = Self(0);
pub const TILT_X: Self = Self(1);
pub const TILT_Y: Self = Self(2);
pub const ADD_BACK_REFERENCES: Self = Self(4);
pub const USE_TEXTURE_COMBINER_COMBOS: Self = Self(8);
pub const IS_CAMERA: Self = Self(16);
pub const UNUSED: Self = Self(32);
pub const UNK_0X_80: Self = Self(128);
pub const LOAD_PHYSICS_DATA: Self = Self(256);
pub const NEW_PARTICLE_RECORD: Self = Self(512);
pub const UNK_0X_400: Self = Self(1024);
pub const TEXTURE_TRANSFORMS_USES_BONE_SEQUENCES: Self = Self(2048);
pub const UNK_0X_1000: Self = Self(4096);
pub const CHUNKED_ANIM_FILES: Self = Self(8192);
pub const UPGRADED_FORMAT: Self = Self(2097152);
#[inline]
pub const fn contains(self, other: Self) -> bool {
(self.0 & other.0) == other.0
}
#[inline]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
impl core::ops::BitOr for GlobalFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for GlobalFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for GlobalFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for GlobalFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "GlobalFlag({:#x})", self.0)
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct SequenceFlag(pub i32);
impl SequenceFlag {
pub const NONE: Self = Self(0);
pub const TILT_IN: Self = Self(1);
pub const TILT_OUT: Self = Self(2);
pub const TILT_FIXED: Self = Self(4);
pub const LOOPING: Self = Self(32);
pub const IS_ALIAS: Self = Self(64);
pub const ANIMATED_SETUP: Self = Self(128);
pub const STORED_ANIMATED: Self = Self(256);
pub const ENABLE_COMPOSITE: Self = Self(512);
#[inline]
pub const fn contains(self, other: Self) -> bool {
(self.0 & other.0) == other.0
}
#[inline]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
impl core::ops::BitOr for SequenceFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for SequenceFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for SequenceFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for SequenceFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "SequenceFlag({:#x})", self.0)
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct BoneFlag(pub i32);
impl BoneFlag {
pub const NONE: Self = Self(0);
pub const IGNORE_PARENT_TRANSLATE: Self = Self(1);
pub const IGNORE_PARENT_SCALE: Self = Self(2);
pub const IGNORE_PARENT_ROTATION: Self = Self(4);
pub const SPHERICAL_BILLBOARD: Self = Self(8);
pub const CYLINDRICAL_BILLBOARD_X: Self = Self(16);
pub const CYLINDRICAL_BILLBOARD_Y: Self = Self(32);
pub const CYLINDRICAL_BILLBOARD_Z: Self = Self(64);
pub const TRANSFORMED: Self = Self(512);
pub const KINEMATIC: Self = Self(1024);
pub const HELMET_ANIM_SCALED: Self = Self(4096);
#[inline]
pub const fn contains(self, other: Self) -> bool {
(self.0 & other.0) == other.0
}
#[inline]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
impl core::ops::BitOr for BoneFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for BoneFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for BoneFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for BoneFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "BoneFlag({:#x})", self.0)
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct MaterialFlag(pub i32);
impl MaterialFlag {
pub const NONE: Self = Self(0);
pub const UNLIT: Self = Self(1);
pub const UNFOGGED: Self = Self(2);
pub const TWO_SIDED: Self = Self(4);
pub const DEPTH_TEST: Self = Self(8);
pub const DEPTH_WRITE: Self = Self(16);
pub const NO_ALPHA_COMPOSITE: Self = Self(2048);
#[inline]
pub const fn contains(self, other: Self) -> bool {
(self.0 & other.0) == other.0
}
#[inline]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
impl core::ops::BitOr for MaterialFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for MaterialFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for MaterialFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for MaterialFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "MaterialFlag({:#x})", self.0)
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum ParticleEmitterType {
Plane = 1,
Sphere = 2,
Spline = 3,
Bone = 4,
}
impl TryFrom<i32> for ParticleEmitterType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
1 => Ok(ParticleEmitterType::Plane),
2 => Ok(ParticleEmitterType::Sphere),
3 => Ok(ParticleEmitterType::Spline),
4 => Ok(ParticleEmitterType::Bone),
other => Err(crate::Error::UnknownEnum {
name: "ParticleEmitterType",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum ParticleBlending {
Opaque = 0,
AlphaBlend = 1,
Additive = 2,
AlphaTest = 3,
AdditiveAlphaTest = 4,
}
impl TryFrom<i32> for ParticleBlending {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(ParticleBlending::Opaque),
1 => Ok(ParticleBlending::AlphaBlend),
2 => Ok(ParticleBlending::Additive),
3 => Ok(ParticleBlending::AlphaTest),
4 => Ok(ParticleBlending::AdditiveAlphaTest),
other => Err(crate::Error::UnknownEnum {
name: "ParticleBlending",
value: other,
}),
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct ParticleFlag(pub i32);
impl ParticleFlag {
pub const NONE: Self = Self(0);
pub const SHADED: Self = Self(1);
pub const SORT_PARTICLES: Self = Self(2);
pub const VELOCITY_ORIENT: Self = Self(4);
pub const UNSHADED: Self = Self(8);
pub const WORLD_SPACE: Self = Self(16);
pub const INHERIT_BONE_SCALE: Self = Self(32);
pub const INHERIT_VELOCITY: Self = Self(64);
pub const IMPLOSION_FILTER: Self = Self(128);
pub const HEMISPHERE_UP_DIRECTION: Self = Self(256);
pub const NEGATE_SPIN_RANDOM: Self = Self(512);
pub const CLAMP_TAIL_TO_AGE: Self = Self(1024);
pub const INHERIT_POSITION: Self = Self(2048);
pub const XY_QUAD: Self = Self(4096);
pub const PROJECT_PARTICLE: Self = Self(8192);
pub const FOLLOW_POSITION: Self = Self(16384);
pub const SQUIRT: Self = Self(32768);
pub const CHOOSE_RANDOM_TEXTURE: Self = Self(65536);
pub const HEAD_STYLE: Self = Self(131072);
pub const TAIL_STYLE: Self = Self(262144);
pub const UNSCALED_SIZE_VARIATION: Self = Self(524288);
pub const UNFOGGED: Self = Self(1048576);
pub const RAND_FLIPBOOK_START: Self = Self(2097152);
pub const UNK_0X_400000: Self = Self(4194304);
pub const COMPRESSED_GRAVITY: Self = Self(8388608);
pub const BONE_GENERATOR_BONE: Self = Self(16777216);
pub const NO_GLOBAL_VIEW_SCALE: Self = Self(33554432);
pub const LOD_IGNORE_DISTANCE: Self = Self(67108864);
pub const OFFSET_HEAD_BY_SPIN: Self = Self(134217728);
pub const MULTI_TEXTURE: Self = Self(268435456);
pub const MULTITEX_USE_MODX_4: Self = Self(536870912);
pub const MULTITEX_USE_3_COLORS: Self = Self(1073741824);
pub const DYNAMIC_WIND: Self = Self(-2147483648);
#[inline]
pub const fn contains(self, other: Self) -> bool {
(self.0 & other.0) == other.0
}
#[inline]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
impl core::ops::BitOr for ParticleFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for ParticleFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for ParticleFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for ParticleFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "ParticleFlag({:#x})", self.0)
}
}
pub struct CompatQuaternion {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2CompatQuaternion>,
}
impl Drop for CompatQuaternion {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2CompatQuaternion_delete(self.raw.as_ptr()) }
}
}
impl CompatQuaternion {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2CompatQuaternion) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| CompatQuaternion { raw })
}
}
unsafe impl Send for CompatQuaternion {}
impl core::fmt::Debug for CompatQuaternion {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("CompatQuaternion").finish_non_exhaustive()
}
}
impl CompatQuaternion {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2CompatQuaternion_new();
Self::from_raw(raw).expect("native CompatQuaternion allocation failed")
}
}
}
impl Default for CompatQuaternion {
fn default() -> Self {
Self::new()
}
}
pub struct ColorBGRA {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ColorBGRA>,
}
impl Drop for ColorBGRA {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ColorBGRA_delete(self.raw.as_ptr()) }
}
}
impl ColorBGRA {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2ColorBGRA) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ColorBGRA { raw })
}
}
unsafe impl Send for ColorBGRA {}
impl core::fmt::Debug for ColorBGRA {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ColorBGRA").finish_non_exhaustive()
}
}
impl ColorBGRA {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ColorBGRA_new();
Self::from_raw(raw).expect("native ColorBGRA allocation failed")
}
}
}
impl Default for ColorBGRA {
fn default() -> Self {
Self::new()
}
}
pub struct Extent {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Extent>,
}
impl Drop for Extent {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Extent_delete(self.raw.as_ptr()) }
}
}
impl Extent {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Extent) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Extent { raw })
}
}
unsafe impl Send for Extent {}
impl core::fmt::Debug for Extent {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Extent").finish_non_exhaustive()
}
}
impl Extent {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Extent_new();
Self::from_raw(raw).expect("native Extent allocation failed")
}
}
pub fn minimum(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Extent_get_minimum(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_minimum(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Extent_set_minimum(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn maximum(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Extent_get_maximum(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_maximum(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Extent_set_maximum(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn sphere_radius(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2Extent_get_sphereRadius(self.raw.as_ptr()) }
}
pub fn set_sphere_radius(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2Extent_set_sphereRadius(self.raw.as_ptr(), value) }
}
}
impl Default for Extent {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackBase {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackBase>,
}
impl Drop for AnimationTrackBase {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackBase_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackBase {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2AnimationTrackBase) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackBase { raw })
}
}
unsafe impl Send for AnimationTrackBase {}
impl core::fmt::Debug for AnimationTrackBase {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackBase").finish_non_exhaustive()
}
}
impl AnimationTrackBase {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackBase_new();
Self::from_raw(raw).expect("native AnimationTrackBase allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_m2_M2AnimationTrackBase_get_interpolationType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackBase_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2AnimationTrackBase_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackBase_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackBase_get_timestamps_count(self.raw.as_ptr()) }
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackBase_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackBase_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackBase_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackBase_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackBase_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackBase_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackBase_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackBase {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleEmitterExtension {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ParticleEmitterExtension>,
}
impl Drop for ParticleEmitterExtension {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ParticleEmitterExtension_delete(self.raw.as_ptr()) }
}
}
impl ParticleEmitterExtension {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(
raw: *mut ffi::whiteout_M2ParticleEmitterExtension,
) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ParticleEmitterExtension { raw })
}
}
unsafe impl Send for ParticleEmitterExtension {}
impl core::fmt::Debug for ParticleEmitterExtension {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ParticleEmitterExtension")
.finish_non_exhaustive()
}
}
impl ParticleEmitterExtension {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ParticleEmitterExtension_new();
Self::from_raw(raw).expect("native ParticleEmitterExtension allocation failed")
}
}
pub fn z_source(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitterExtension_get_zSource(self.raw.as_ptr()) }
}
pub fn set_z_source(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitterExtension_set_zSource(self.raw.as_ptr(), value) }
}
pub fn color_mult(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitterExtension_get_colorMult(self.raw.as_ptr()) }
}
pub fn set_color_mult(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitterExtension_set_colorMult(self.raw.as_ptr(), value)
}
}
pub fn alpha_mult(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitterExtension_get_alphaMult(self.raw.as_ptr()) }
}
pub fn set_alpha_mult(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitterExtension_set_alphaMult(self.raw.as_ptr(), value)
}
}
}
impl Default for ParticleEmitterExtension {
fn default() -> Self {
Self::new()
}
}
pub struct LodProfile {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2LodProfile>,
}
impl Drop for LodProfile {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2LodProfile_delete(self.raw.as_ptr()) }
}
}
impl LodProfile {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2LodProfile) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| LodProfile { raw })
}
}
unsafe impl Send for LodProfile {}
impl core::fmt::Debug for LodProfile {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("LodProfile").finish_non_exhaustive()
}
}
impl LodProfile {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2LodProfile_new();
Self::from_raw(raw).expect("native LodProfile allocation failed")
}
}
pub fn flags(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_flags(self.raw.as_ptr(), value) }
}
pub fn num_lod_levels(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_numLodLevels(self.raw.as_ptr()) }
}
pub fn set_num_lod_levels(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_numLodLevels(self.raw.as_ptr(), value) }
}
pub fn lod_distance(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_lodDistance(self.raw.as_ptr()) }
}
pub fn set_lod_distance(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_lodDistance(self.raw.as_ptr(), value) }
}
pub fn particle_bone_lod_len() -> usize {
unsafe { ffi::whiteout_m2_M2LodProfile_particleBoneLod_size() }
}
pub fn particle_bone_lod(&self, index: usize) -> u8 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_particleBoneLod_at(self.raw.as_ptr(), index) }
}
pub fn set_particle_bone_lod(&mut self, index: usize, value: u8) {
unsafe {
ffi::whiteout_m2_M2LodProfile_set_particleBoneLod_at(self.raw.as_ptr(), index, value)
}
}
pub fn reserved_0(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_reserved0(self.raw.as_ptr()) }
}
pub fn set_reserved_0(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_reserved0(self.raw.as_ptr(), value) }
}
pub fn lod_flags(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_lodFlags(self.raw.as_ptr()) }
}
pub fn set_lod_flags(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_lodFlags(self.raw.as_ptr(), value) }
}
pub fn lod_batch_count(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_lodBatchCount(self.raw.as_ptr()) }
}
pub fn set_lod_batch_count(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_lodBatchCount(self.raw.as_ptr(), value) }
}
pub fn reserved_1(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2LodProfile_get_reserved1(self.raw.as_ptr()) }
}
pub fn set_reserved_1(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2LodProfile_set_reserved1(self.raw.as_ptr(), value) }
}
}
impl Default for LodProfile {
fn default() -> Self {
Self::new()
}
}
pub struct WaterfallData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2WaterfallData>,
}
impl Drop for WaterfallData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2WaterfallData_delete(self.raw.as_ptr()) }
}
}
impl WaterfallData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2WaterfallData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| WaterfallData { raw })
}
}
unsafe impl Send for WaterfallData {}
impl core::fmt::Debug for WaterfallData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("WaterfallData").finish_non_exhaustive()
}
}
impl WaterfallData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2WaterfallData_new();
Self::from_raw(raw).expect("native WaterfallData allocation failed")
}
}
pub fn bump_scale(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_bumpScale(self.raw.as_ptr()) }
}
pub fn set_bump_scale(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_bumpScale(self.raw.as_ptr(), value) }
}
pub fn value_0x(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value0_x(self.raw.as_ptr()) }
}
pub fn set_value_0x(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value0_x(self.raw.as_ptr(), value) }
}
pub fn value_0y(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value0_y(self.raw.as_ptr()) }
}
pub fn set_value_0y(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value0_y(self.raw.as_ptr(), value) }
}
pub fn value_0z(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value0_z(self.raw.as_ptr()) }
}
pub fn set_value_0z(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value0_z(self.raw.as_ptr(), value) }
}
pub fn value_1w(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value1_w(self.raw.as_ptr()) }
}
pub fn set_value_1w(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value1_w(self.raw.as_ptr(), value) }
}
pub fn value_0w(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value0_w(self.raw.as_ptr()) }
}
pub fn set_value_0w(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value0_w(self.raw.as_ptr(), value) }
}
pub fn value_1x(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value1_x(self.raw.as_ptr()) }
}
pub fn set_value_1x(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value1_x(self.raw.as_ptr(), value) }
}
pub fn value_1y(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value1_y(self.raw.as_ptr()) }
}
pub fn set_value_1y(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value1_y(self.raw.as_ptr(), value) }
}
pub fn value_2w(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value2_w(self.raw.as_ptr()) }
}
pub fn set_value_2w(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value2_w(self.raw.as_ptr(), value) }
}
pub fn value_3y(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value3_y(self.raw.as_ptr()) }
}
pub fn set_value_3y(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value3_y(self.raw.as_ptr(), value) }
}
pub fn value_3x(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value3_x(self.raw.as_ptr()) }
}
pub fn set_value_3x(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value3_x(self.raw.as_ptr(), value) }
}
pub fn base_color(&self) -> crate::math::Vector4f {
unsafe {
*(ffi::whiteout_m2_M2WaterfallData_get_baseColor(self.raw.as_ptr())
as *const crate::math::Vector4f)
}
}
pub fn set_base_color(&mut self, value: crate::math::Vector4f) {
unsafe {
ffi::whiteout_m2_M2WaterfallData_set_baseColor(
self.raw.as_ptr(),
&value as *const crate::math::Vector4f as *const _,
)
}
}
pub fn flags(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_flags(self.raw.as_ptr(), value) }
}
pub fn unknown_0(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_unknown0(self.raw.as_ptr()) }
}
pub fn set_unknown_0(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_unknown0(self.raw.as_ptr(), value) }
}
pub fn value_3w(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value3_w(self.raw.as_ptr()) }
}
pub fn set_value_3w(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value3_w(self.raw.as_ptr(), value) }
}
pub fn value_3z(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value3_z(self.raw.as_ptr()) }
}
pub fn set_value_3z(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value3_z(self.raw.as_ptr(), value) }
}
pub fn value_4y(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_value4_y(self.raw.as_ptr()) }
}
pub fn set_value_4y(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_value4_y(self.raw.as_ptr(), value) }
}
pub fn unknown_1(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_unknown1(self.raw.as_ptr()) }
}
pub fn set_unknown_1(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_unknown1(self.raw.as_ptr(), value) }
}
pub fn unknown_2(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_unknown2(self.raw.as_ptr()) }
}
pub fn set_unknown_2(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_unknown2(self.raw.as_ptr(), value) }
}
pub fn unknown_3(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_unknown3(self.raw.as_ptr()) }
}
pub fn set_unknown_3(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_unknown3(self.raw.as_ptr(), value) }
}
pub fn unknown_4(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2WaterfallData_get_unknown4(self.raw.as_ptr()) }
}
pub fn set_unknown_4(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2WaterfallData_set_unknown4(self.raw.as_ptr(), value) }
}
}
impl Default for WaterfallData {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleGeosetData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ParticleGeosetData>,
}
impl Drop for ParticleGeosetData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ParticleGeosetData_delete(self.raw.as_ptr()) }
}
}
impl ParticleGeosetData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2ParticleGeosetData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ParticleGeosetData { raw })
}
}
unsafe impl Send for ParticleGeosetData {}
impl core::fmt::Debug for ParticleGeosetData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ParticleGeosetData").finish_non_exhaustive()
}
}
impl ParticleGeosetData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ParticleGeosetData_new();
Self::from_raw(raw).expect("native ParticleGeosetData allocation failed")
}
}
pub fn geoset(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ParticleGeosetData_get_geoset(self.raw.as_ptr()) }
}
pub fn set_geoset(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ParticleGeosetData_set_geoset(self.raw.as_ptr(), value) }
}
}
impl Default for ParticleGeosetData {
fn default() -> Self {
Self::new()
}
}
pub struct EdgeFadeData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2EdgeFadeData>,
}
impl Drop for EdgeFadeData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_delete(self.raw.as_ptr()) }
}
}
impl EdgeFadeData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2EdgeFadeData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| EdgeFadeData { raw })
}
}
unsafe impl Send for EdgeFadeData {}
impl core::fmt::Debug for EdgeFadeData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("EdgeFadeData").finish_non_exhaustive()
}
}
impl EdgeFadeData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2EdgeFadeData_new();
Self::from_raw(raw).expect("native EdgeFadeData allocation failed")
}
}
pub fn value_0_len() -> usize {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_value0_size() }
}
pub fn value_0(&self, index: usize) -> f32 {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_get_value0_at(self.raw.as_ptr(), index) }
}
pub fn set_value_0(&mut self, index: usize, value: f32) {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_set_value0_at(self.raw.as_ptr(), index, value) }
}
pub fn value_8(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_get_value8(self.raw.as_ptr()) }
}
pub fn set_value_8(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_set_value8(self.raw.as_ptr(), value) }
}
pub fn value_c_len() -> usize {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_valueC_size() }
}
pub fn value_c(&self, index: usize) -> u8 {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_get_valueC_at(self.raw.as_ptr(), index) }
}
pub fn set_value_c(&mut self, index: usize, value: u8) {
unsafe { ffi::whiteout_m2_M2EdgeFadeData_set_valueC_at(self.raw.as_ptr(), index, value) }
}
}
impl Default for EdgeFadeData {
fn default() -> Self {
Self::new()
}
}
pub struct DistanceFadeData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2DistanceFadeData>,
}
impl Drop for DistanceFadeData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_delete(self.raw.as_ptr()) }
}
}
impl DistanceFadeData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2DistanceFadeData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| DistanceFadeData { raw })
}
}
unsafe impl Send for DistanceFadeData {}
impl core::fmt::Debug for DistanceFadeData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("DistanceFadeData").finish_non_exhaustive()
}
}
impl DistanceFadeData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2DistanceFadeData_new();
Self::from_raw(raw).expect("native DistanceFadeData allocation failed")
}
}
pub fn squared_far_dist(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_get_squaredFarDist(self.raw.as_ptr()) }
}
pub fn set_squared_far_dist(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_set_squaredFarDist(self.raw.as_ptr(), value) }
}
pub fn squared_near_dist(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_get_squaredNearDist(self.raw.as_ptr()) }
}
pub fn set_squared_near_dist(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_set_squaredNearDist(self.raw.as_ptr(), value) }
}
pub fn reserved_len() -> usize {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_reserved_size() }
}
pub fn reserved(&self, index: usize) -> u32 {
unsafe { ffi::whiteout_m2_M2DistanceFadeData_get_reserved_at(self.raw.as_ptr(), index) }
}
pub fn set_reserved(&mut self, index: usize, value: u32) {
unsafe {
ffi::whiteout_m2_M2DistanceFadeData_set_reserved_at(self.raw.as_ptr(), index, value)
}
}
}
impl Default for DistanceFadeData {
fn default() -> Self {
Self::new()
}
}
pub struct DetailedLightData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2DetailedLightData>,
}
impl Drop for DetailedLightData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2DetailedLightData_delete(self.raw.as_ptr()) }
}
}
impl DetailedLightData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2DetailedLightData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| DetailedLightData { raw })
}
}
unsafe impl Send for DetailedLightData {}
impl core::fmt::Debug for DetailedLightData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("DetailedLightData").finish_non_exhaustive()
}
}
impl DetailedLightData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2DetailedLightData_new();
Self::from_raw(raw).expect("native DetailedLightData allocation failed")
}
}
pub fn flags(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2DetailedLightData_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2DetailedLightData_set_flags(self.raw.as_ptr(), value) }
}
pub fn unknown_0(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2DetailedLightData_get_unknown0(self.raw.as_ptr()) }
}
pub fn set_unknown_0(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2DetailedLightData_set_unknown0(self.raw.as_ptr(), value) }
}
pub fn unknown_1(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2DetailedLightData_get_unknown1(self.raw.as_ptr()) }
}
pub fn set_unknown_1(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2DetailedLightData_set_unknown1(self.raw.as_ptr(), value) }
}
}
impl Default for DetailedLightData {
fn default() -> Self {
Self::new()
}
}
pub struct DebugOcclusionData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2DebugOcclusionData>,
}
impl Drop for DebugOcclusionData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_delete(self.raw.as_ptr()) }
}
}
impl DebugOcclusionData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2DebugOcclusionData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| DebugOcclusionData { raw })
}
}
unsafe impl Send for DebugOcclusionData {}
impl core::fmt::Debug for DebugOcclusionData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("DebugOcclusionData").finish_non_exhaustive()
}
}
impl DebugOcclusionData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2DebugOcclusionData_new();
Self::from_raw(raw).expect("native DebugOcclusionData allocation failed")
}
}
pub fn unknown_1_1(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_get_unknown1_1(self.raw.as_ptr()) }
}
pub fn set_unknown_1_1(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_set_unknown1_1(self.raw.as_ptr(), value) }
}
pub fn unknown_1_2(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_get_unknown1_2(self.raw.as_ptr()) }
}
pub fn set_unknown_1_2(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_set_unknown1_2(self.raw.as_ptr(), value) }
}
pub fn unknown_1_3(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_get_unknown1_3(self.raw.as_ptr()) }
}
pub fn set_unknown_1_3(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_set_unknown1_3(self.raw.as_ptr(), value) }
}
pub fn unknown_1_4(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_get_unknown1_4(self.raw.as_ptr()) }
}
pub fn set_unknown_1_4(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2DebugOcclusionData_set_unknown1_4(self.raw.as_ptr(), value) }
}
}
impl Default for DebugOcclusionData {
fn default() -> Self {
Self::new()
}
}
pub struct TexturedLightData {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2TexturedLightData>,
}
impl Drop for TexturedLightData {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2TexturedLightData_delete(self.raw.as_ptr()) }
}
}
impl TexturedLightData {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2TexturedLightData) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TexturedLightData { raw })
}
}
unsafe impl Send for TexturedLightData {}
impl core::fmt::Debug for TexturedLightData {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TexturedLightData").finish_non_exhaustive()
}
}
impl TexturedLightData {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2TexturedLightData_new();
Self::from_raw(raw).expect("native TexturedLightData allocation failed")
}
}
pub fn unknown_0(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2TexturedLightData_get_unknown0(self.raw.as_ptr()) }
}
pub fn set_unknown_0(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2TexturedLightData_set_unknown0(self.raw.as_ptr(), value) }
}
pub fn unknown_1(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2TexturedLightData_get_unknown1(self.raw.as_ptr()) }
}
pub fn set_unknown_1(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2TexturedLightData_set_unknown1(self.raw.as_ptr(), value) }
}
pub fn texture_lookup(&self) -> i32 {
unsafe { ffi::whiteout_m2_M2TexturedLightData_get_textureLookup(self.raw.as_ptr()) }
}
pub fn set_texture_lookup(&mut self, value: i32) {
unsafe { ffi::whiteout_m2_M2TexturedLightData_set_textureLookup(self.raw.as_ptr(), value) }
}
pub fn unknown_2(&self) -> i32 {
unsafe { ffi::whiteout_m2_M2TexturedLightData_get_unknown2(self.raw.as_ptr()) }
}
pub fn set_unknown_2(&mut self, value: i32) {
unsafe { ffi::whiteout_m2_M2TexturedLightData_set_unknown2(self.raw.as_ptr(), value) }
}
}
impl Default for TexturedLightData {
fn default() -> Self {
Self::new()
}
}
pub struct PhysicsCollision {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2PhysicsCollision>,
}
impl Drop for PhysicsCollision {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2PhysicsCollision_delete(self.raw.as_ptr()) }
}
}
impl PhysicsCollision {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2PhysicsCollision) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| PhysicsCollision { raw })
}
}
unsafe impl Send for PhysicsCollision {}
impl core::fmt::Debug for PhysicsCollision {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("PhysicsCollision").finish_non_exhaustive()
}
}
impl PhysicsCollision {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2PhysicsCollision_new();
Self::from_raw(raw).expect("native PhysicsCollision allocation failed")
}
}
pub fn vertex_positions(&self) -> &[crate::math::Vector3f] {
unsafe {
let n =
ffi::whiteout_m2_M2PhysicsCollision_get_vertexPositions_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2PhysicsCollision_get_vertexPositions_data(self.raw.as_ptr())
as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn vertex_positions_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n =
ffi::whiteout_m2_M2PhysicsCollision_get_vertexPositions_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2PhysicsCollision_get_vertexPositions_data(self.raw.as_ptr())
as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_vertex_positions(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2PhysicsCollision_assign_vertexPositions(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_vertex_positions(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2PhysicsCollision_resize_vertexPositions(self.raw.as_ptr(), count)
}
}
pub fn face_normals(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2PhysicsCollision_get_faceNormals_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2PhysicsCollision_get_faceNormals_data(self.raw.as_ptr())
as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn face_normals_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2PhysicsCollision_get_faceNormals_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2PhysicsCollision_get_faceNormals_data(self.raw.as_ptr())
as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_face_normals(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2PhysicsCollision_assign_faceNormals(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_face_normals(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2PhysicsCollision_resize_faceNormals(self.raw.as_ptr(), count) }
}
pub fn indices(&self) -> &[i16] {
unsafe {
let n = ffi::whiteout_m2_M2PhysicsCollision_get_indices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2PhysicsCollision_get_indices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn indices_mut(&mut self) -> &mut [i16] {
unsafe {
let n = ffi::whiteout_m2_M2PhysicsCollision_get_indices_count(self.raw.as_ptr());
let p =
ffi::whiteout_m2_M2PhysicsCollision_get_indices_data(self.raw.as_ptr()) as *mut i16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_indices(&mut self, values: &[i16]) {
unsafe {
ffi::whiteout_m2_M2PhysicsCollision_assign_indices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_indices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2PhysicsCollision_resize_indices(self.raw.as_ptr(), count) }
}
pub fn flags(&self) -> &[i16] {
unsafe {
let n = ffi::whiteout_m2_M2PhysicsCollision_get_flags_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2PhysicsCollision_get_flags_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn flags_mut(&mut self) -> &mut [i16] {
unsafe {
let n = ffi::whiteout_m2_M2PhysicsCollision_get_flags_count(self.raw.as_ptr());
let p =
ffi::whiteout_m2_M2PhysicsCollision_get_flags_data(self.raw.as_ptr()) as *mut i16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_flags(&mut self, values: &[i16]) {
unsafe {
ffi::whiteout_m2_M2PhysicsCollision_assign_flags(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_flags(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2PhysicsCollision_resize_flags(self.raw.as_ptr(), count) }
}
}
impl Default for PhysicsCollision {
fn default() -> Self {
Self::new()
}
}
pub struct SkinSection {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2SkinSection>,
}
impl Drop for SkinSection {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2SkinSection_delete(self.raw.as_ptr()) }
}
}
impl SkinSection {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2SkinSection) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| SkinSection { raw })
}
}
unsafe impl Send for SkinSection {}
impl core::fmt::Debug for SkinSection {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("SkinSection").finish_non_exhaustive()
}
}
impl SkinSection {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2SkinSection_new();
Self::from_raw(raw).expect("native SkinSection allocation failed")
}
}
pub fn skin_section_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_skinSectionId(self.raw.as_ptr()) }
}
pub fn set_skin_section_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_skinSectionId(self.raw.as_ptr(), value) }
}
pub fn level(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_level(self.raw.as_ptr()) }
}
pub fn set_level(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_level(self.raw.as_ptr(), value) }
}
pub fn vertex_start(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_vertexStart(self.raw.as_ptr()) }
}
pub fn set_vertex_start(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_vertexStart(self.raw.as_ptr(), value) }
}
pub fn vertex_count(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_vertexCount(self.raw.as_ptr()) }
}
pub fn set_vertex_count(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_vertexCount(self.raw.as_ptr(), value) }
}
pub fn index_start(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_indexStart(self.raw.as_ptr()) }
}
pub fn set_index_start(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_indexStart(self.raw.as_ptr(), value) }
}
pub fn index_count(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_indexCount(self.raw.as_ptr()) }
}
pub fn set_index_count(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_indexCount(self.raw.as_ptr(), value) }
}
pub fn bone_count(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_boneCount(self.raw.as_ptr()) }
}
pub fn set_bone_count(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_boneCount(self.raw.as_ptr(), value) }
}
pub fn bone_combo_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_boneComboIndex(self.raw.as_ptr()) }
}
pub fn set_bone_combo_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_boneComboIndex(self.raw.as_ptr(), value) }
}
pub fn bone_influences(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_boneInfluences(self.raw.as_ptr()) }
}
pub fn set_bone_influences(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_boneInfluences(self.raw.as_ptr(), value) }
}
pub fn center_bone_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_centerBoneIndex(self.raw.as_ptr()) }
}
pub fn set_center_bone_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_centerBoneIndex(self.raw.as_ptr(), value) }
}
pub fn center_position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2SkinSection_get_centerPosition(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_center_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2SkinSection_set_centerPosition(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn sort_center_position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2SkinSection_get_sortCenterPosition(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_sort_center_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2SkinSection_set_sortCenterPosition(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn sort_radius(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2SkinSection_get_sortRadius(self.raw.as_ptr()) }
}
pub fn set_sort_radius(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2SkinSection_set_sortRadius(self.raw.as_ptr(), value) }
}
}
impl Default for SkinSection {
fn default() -> Self {
Self::new()
}
}
pub struct Batch {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Batch>,
}
impl Drop for Batch {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Batch_delete(self.raw.as_ptr()) }
}
}
impl Batch {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Batch) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Batch { raw })
}
}
unsafe impl Send for Batch {}
impl core::fmt::Debug for Batch {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Batch").finish_non_exhaustive()
}
}
impl Batch {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Batch_new();
Self::from_raw(raw).expect("native Batch allocation failed")
}
}
pub fn flags(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2Batch_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2Batch_set_flags(self.raw.as_ptr(), value) }
}
pub fn priority_plane(&self) -> i8 {
unsafe { ffi::whiteout_m2_M2Batch_get_priorityPlane(self.raw.as_ptr()) }
}
pub fn set_priority_plane(&mut self, value: i8) {
unsafe { ffi::whiteout_m2_M2Batch_set_priorityPlane(self.raw.as_ptr(), value) }
}
pub fn shader_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_shaderId(self.raw.as_ptr()) }
}
pub fn set_shader_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_shaderId(self.raw.as_ptr(), value) }
}
pub fn skin_section_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_skinSectionIndex(self.raw.as_ptr()) }
}
pub fn set_skin_section_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_skinSectionIndex(self.raw.as_ptr(), value) }
}
pub fn geoset_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_geosetIndex(self.raw.as_ptr()) }
}
pub fn set_geoset_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_geosetIndex(self.raw.as_ptr(), value) }
}
pub fn color_index(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2Batch_get_colorIndex(self.raw.as_ptr()) }
}
pub fn set_color_index(&mut self, value: i16) {
unsafe { ffi::whiteout_m2_M2Batch_set_colorIndex(self.raw.as_ptr(), value) }
}
pub fn material_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_materialIndex(self.raw.as_ptr()) }
}
pub fn set_material_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_materialIndex(self.raw.as_ptr(), value) }
}
pub fn material_layer(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_materialLayer(self.raw.as_ptr()) }
}
pub fn set_material_layer(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_materialLayer(self.raw.as_ptr(), value) }
}
pub fn texture_count(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_textureCount(self.raw.as_ptr()) }
}
pub fn set_texture_count(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_textureCount(self.raw.as_ptr(), value) }
}
pub fn texture_combo_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_textureComboIndex(self.raw.as_ptr()) }
}
pub fn set_texture_combo_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_textureComboIndex(self.raw.as_ptr(), value) }
}
pub fn texture_coord_combo_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_textureCoordComboIndex(self.raw.as_ptr()) }
}
pub fn set_texture_coord_combo_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_textureCoordComboIndex(self.raw.as_ptr(), value) }
}
pub fn texture_weight_combo_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_textureWeightComboIndex(self.raw.as_ptr()) }
}
pub fn set_texture_weight_combo_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_textureWeightComboIndex(self.raw.as_ptr(), value) }
}
pub fn texture_transform_combo_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Batch_get_textureTransformComboIndex(self.raw.as_ptr()) }
}
pub fn set_texture_transform_combo_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Batch_set_textureTransformComboIndex(self.raw.as_ptr(), value) }
}
}
impl Default for Batch {
fn default() -> Self {
Self::new()
}
}
pub struct ShadowBatch {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ShadowBatch>,
}
impl Drop for ShadowBatch {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_delete(self.raw.as_ptr()) }
}
}
impl ShadowBatch {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2ShadowBatch) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ShadowBatch { raw })
}
}
unsafe impl Send for ShadowBatch {}
impl core::fmt::Debug for ShadowBatch {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ShadowBatch").finish_non_exhaustive()
}
}
impl ShadowBatch {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ShadowBatch_new();
Self::from_raw(raw).expect("native ShadowBatch allocation failed")
}
}
pub fn flags(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_flags(self.raw.as_ptr(), value) }
}
pub fn flags_2(&self) -> u8 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_flags2(self.raw.as_ptr()) }
}
pub fn set_flags_2(&mut self, value: u8) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_flags2(self.raw.as_ptr(), value) }
}
pub fn unknown_0(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_unknown0(self.raw.as_ptr()) }
}
pub fn set_unknown_0(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_unknown0(self.raw.as_ptr(), value) }
}
pub fn submesh_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_submeshId(self.raw.as_ptr()) }
}
pub fn set_submesh_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_submeshId(self.raw.as_ptr(), value) }
}
pub fn texture_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_textureId(self.raw.as_ptr()) }
}
pub fn set_texture_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_textureId(self.raw.as_ptr(), value) }
}
pub fn color_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_colorId(self.raw.as_ptr()) }
}
pub fn set_color_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_colorId(self.raw.as_ptr(), value) }
}
pub fn transparency_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ShadowBatch_get_transparencyId(self.raw.as_ptr()) }
}
pub fn set_transparency_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ShadowBatch_set_transparencyId(self.raw.as_ptr(), value) }
}
}
impl Default for ShadowBatch {
fn default() -> Self {
Self::new()
}
}
pub struct SkinProfile {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2SkinProfile>,
}
impl Drop for SkinProfile {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2SkinProfile_delete(self.raw.as_ptr()) }
}
}
impl SkinProfile {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2SkinProfile) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| SkinProfile { raw })
}
}
unsafe impl Send for SkinProfile {}
impl core::fmt::Debug for SkinProfile {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("SkinProfile").finish_non_exhaustive()
}
}
impl SkinProfile {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2SkinProfile_new();
Self::from_raw(raw).expect("native SkinProfile allocation failed")
}
}
pub fn vertices(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2SkinProfile_get_vertices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2SkinProfile_get_vertices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn vertices_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2SkinProfile_get_vertices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2SkinProfile_get_vertices_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_vertices(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2SkinProfile_assign_vertices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_vertices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2SkinProfile_resize_vertices(self.raw.as_ptr(), count) }
}
pub fn indices(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2SkinProfile_get_indices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2SkinProfile_get_indices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn indices_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2SkinProfile_get_indices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2SkinProfile_get_indices_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_indices(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2SkinProfile_assign_indices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_indices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2SkinProfile_resize_indices(self.raw.as_ptr(), count) }
}
pub fn submeshes_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2SkinProfile_get_submeshes_count(self.raw.as_ptr()) }
}
pub fn submeshes(&self, index: usize) -> Option<crate::support::Ref<'_, SkinSection>> {
if index >= self.submeshes_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(SkinSection {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2SkinProfile_get_submeshes_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn submeshes_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, SkinSection>> {
if index >= self.submeshes_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(SkinSection {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2SkinProfile_get_submeshes_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn submeshes_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, SkinSection>> {
(0..self.submeshes_len()).map(move |i| self.submeshes(i).expect("index below len"))
}
pub fn resize_submeshes(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2SkinProfile_resize_submeshes(self.raw.as_ptr(), count) }
}
pub fn batches_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2SkinProfile_get_batches_count(self.raw.as_ptr()) }
}
pub fn batches(&self, index: usize) -> Option<crate::support::Ref<'_, Batch>> {
if index >= self.batches_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Batch {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2SkinProfile_get_batches_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn batches_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Batch>> {
if index >= self.batches_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Batch {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2SkinProfile_get_batches_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn batches_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Batch>> {
(0..self.batches_len()).map(move |i| self.batches(i).expect("index below len"))
}
pub fn resize_batches(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2SkinProfile_resize_batches(self.raw.as_ptr(), count) }
}
pub fn lod_vertex_base(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2SkinProfile_get_lodVertexBase(self.raw.as_ptr()) }
}
pub fn set_lod_vertex_base(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2SkinProfile_set_lodVertexBase(self.raw.as_ptr(), value) }
}
pub fn shadow_batches_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2SkinProfile_get_shadowBatches_count(self.raw.as_ptr()) }
}
pub fn shadow_batches(&self, index: usize) -> Option<crate::support::Ref<'_, ShadowBatch>> {
if index >= self.shadow_batches_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(ShadowBatch {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2SkinProfile_get_shadowBatches_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn shadow_batches_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, ShadowBatch>> {
if index >= self.shadow_batches_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(ShadowBatch {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2SkinProfile_get_shadowBatches_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn shadow_batches_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, ShadowBatch>> {
(0..self.shadow_batches_len())
.map(move |i| self.shadow_batches(i).expect("index below len"))
}
pub fn resize_shadow_batches(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2SkinProfile_resize_shadowBatches(self.raw.as_ptr(), count) }
}
}
impl Default for SkinProfile {
fn default() -> Self {
Self::new()
}
}
pub struct GlobalFlags {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2GlobalFlags>,
}
impl Drop for GlobalFlags {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2GlobalFlags_delete(self.raw.as_ptr()) }
}
}
impl GlobalFlags {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2GlobalFlags) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| GlobalFlags { raw })
}
}
unsafe impl Send for GlobalFlags {}
impl core::fmt::Debug for GlobalFlags {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("GlobalFlags").finish_non_exhaustive()
}
}
impl GlobalFlags {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2GlobalFlags_new();
Self::from_raw(raw).expect("native GlobalFlags allocation failed")
}
}
pub fn value(&self) -> GlobalFlag {
GlobalFlag(unsafe { ffi::whiteout_m2_M2GlobalFlags_get_value(self.raw.as_ptr()) })
}
pub fn set_value(&mut self, value: GlobalFlag) {
unsafe { ffi::whiteout_m2_M2GlobalFlags_set_value(self.raw.as_ptr(), value.0) }
}
}
impl Default for GlobalFlags {
fn default() -> Self {
Self::new()
}
}
pub struct GlobalSequence {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2GlobalSequence>,
}
impl Drop for GlobalSequence {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2GlobalSequence_delete(self.raw.as_ptr()) }
}
}
impl GlobalSequence {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2GlobalSequence) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| GlobalSequence { raw })
}
}
unsafe impl Send for GlobalSequence {}
impl core::fmt::Debug for GlobalSequence {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("GlobalSequence").finish_non_exhaustive()
}
}
impl GlobalSequence {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2GlobalSequence_new();
Self::from_raw(raw).expect("native GlobalSequence allocation failed")
}
}
pub fn timestamp(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2GlobalSequence_get_timestamp(self.raw.as_ptr()) }
}
pub fn set_timestamp(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2GlobalSequence_set_timestamp(self.raw.as_ptr(), value) }
}
}
impl Default for GlobalSequence {
fn default() -> Self {
Self::new()
}
}
pub struct Sequence {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Sequence>,
}
impl Drop for Sequence {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Sequence_delete(self.raw.as_ptr()) }
}
}
impl Sequence {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Sequence) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Sequence { raw })
}
}
unsafe impl Send for Sequence {}
impl core::fmt::Debug for Sequence {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Sequence").finish_non_exhaustive()
}
}
impl Sequence {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Sequence_new();
Self::from_raw(raw).expect("native Sequence allocation failed")
}
}
pub fn id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_id(self.raw.as_ptr()) }
}
pub fn set_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_id(self.raw.as_ptr(), value) }
}
pub fn variation_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_variationIndex(self.raw.as_ptr()) }
}
pub fn set_variation_index(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_variationIndex(self.raw.as_ptr(), value) }
}
pub fn duration(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Sequence_get_duration(self.raw.as_ptr()) }
}
pub fn set_duration(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Sequence_set_duration(self.raw.as_ptr(), value) }
}
pub fn movespeed(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2Sequence_get_movespeed(self.raw.as_ptr()) }
}
pub fn set_movespeed(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2Sequence_set_movespeed(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> SequenceFlag {
SequenceFlag(unsafe { ffi::whiteout_m2_M2Sequence_get_flags(self.raw.as_ptr()) })
}
pub fn set_flags(&mut self, value: SequenceFlag) {
unsafe { ffi::whiteout_m2_M2Sequence_set_flags(self.raw.as_ptr(), value.0) }
}
pub fn frequency(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_frequency(self.raw.as_ptr()) }
}
pub fn set_frequency(&mut self, value: i16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_frequency(self.raw.as_ptr(), value) }
}
pub fn padding(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_padding(self.raw.as_ptr()) }
}
pub fn set_padding(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_padding(self.raw.as_ptr(), value) }
}
pub fn replay_min(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Sequence_get_replayMin(self.raw.as_ptr()) }
}
pub fn set_replay_min(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Sequence_set_replayMin(self.raw.as_ptr(), value) }
}
pub fn replay_max(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Sequence_get_replayMax(self.raw.as_ptr()) }
}
pub fn set_replay_max(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Sequence_set_replayMax(self.raw.as_ptr(), value) }
}
pub fn blend_time_in(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_blendTimeIn(self.raw.as_ptr()) }
}
pub fn set_blend_time_in(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_blendTimeIn(self.raw.as_ptr(), value) }
}
pub fn blend_time_out(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_blendTimeOut(self.raw.as_ptr()) }
}
pub fn set_blend_time_out(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_blendTimeOut(self.raw.as_ptr(), value) }
}
pub fn bounding(&self) -> crate::support::Ref<'_, Extent> {
unsafe {
crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Sequence_get_bounding(
self.raw.as_ptr(),
)),
})
}
}
pub fn bounding_mut(&mut self) -> crate::support::RefMut<'_, Extent> {
unsafe {
crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Sequence_get_bounding(
self.raw.as_ptr(),
)),
})
}
}
pub fn variation_next(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_variationNext(self.raw.as_ptr()) }
}
pub fn set_variation_next(&mut self, value: i16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_variationNext(self.raw.as_ptr(), value) }
}
pub fn alias_next(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Sequence_get_aliasNext(self.raw.as_ptr()) }
}
pub fn set_alias_next(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Sequence_set_aliasNext(self.raw.as_ptr(), value) }
}
}
impl Default for Sequence {
fn default() -> Self {
Self::new()
}
}
pub struct Vertex {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Vertex>,
}
impl Drop for Vertex {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Vertex_delete(self.raw.as_ptr()) }
}
}
impl Vertex {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Vertex) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Vertex { raw })
}
}
unsafe impl Send for Vertex {}
impl core::fmt::Debug for Vertex {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Vertex").finish_non_exhaustive()
}
}
impl Vertex {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Vertex_new();
Self::from_raw(raw).expect("native Vertex allocation failed")
}
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Vertex_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Vertex_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn bone_weights_len() -> usize {
unsafe { ffi::whiteout_m2_M2Vertex_boneWeights_size() }
}
pub fn bone_weights(&self, index: usize) -> u8 {
unsafe { ffi::whiteout_m2_M2Vertex_get_boneWeights_at(self.raw.as_ptr(), index) }
}
pub fn set_bone_weights(&mut self, index: usize, value: u8) {
unsafe { ffi::whiteout_m2_M2Vertex_set_boneWeights_at(self.raw.as_ptr(), index, value) }
}
pub fn bone_indices_len() -> usize {
unsafe { ffi::whiteout_m2_M2Vertex_boneIndices_size() }
}
pub fn bone_indices(&self, index: usize) -> u8 {
unsafe { ffi::whiteout_m2_M2Vertex_get_boneIndices_at(self.raw.as_ptr(), index) }
}
pub fn set_bone_indices(&mut self, index: usize, value: u8) {
unsafe { ffi::whiteout_m2_M2Vertex_set_boneIndices_at(self.raw.as_ptr(), index, value) }
}
pub fn normal(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Vertex_get_normal(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_normal(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Vertex_set_normal(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn tex_coords_len() -> usize {
unsafe { ffi::whiteout_m2_M2Vertex_texCoords_size() }
}
pub fn tex_coords(&self, index: usize) -> crate::math::Vector2f {
unsafe {
*(ffi::whiteout_m2_M2Vertex_get_texCoords_at(self.raw.as_ptr(), index)
as *const crate::math::Vector2f)
}
}
}
impl Default for Vertex {
fn default() -> Self {
Self::new()
}
}
pub struct Bone {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Bone>,
}
impl Drop for Bone {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Bone_delete(self.raw.as_ptr()) }
}
}
impl Bone {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Bone) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Bone { raw })
}
}
unsafe impl Send for Bone {}
impl core::fmt::Debug for Bone {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Bone").finish_non_exhaustive()
}
}
impl Bone {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Bone_new();
Self::from_raw(raw).expect("native Bone allocation failed")
}
}
pub fn key_bone_id(&self) -> i32 {
unsafe { ffi::whiteout_m2_M2Bone_get_keyBoneId(self.raw.as_ptr()) }
}
pub fn set_key_bone_id(&mut self, value: i32) {
unsafe { ffi::whiteout_m2_M2Bone_set_keyBoneId(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Bone_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Bone_set_flags(self.raw.as_ptr(), value) }
}
pub fn parent_bone_id(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2Bone_get_parentBoneId(self.raw.as_ptr()) }
}
pub fn set_parent_bone_id(&mut self, value: i16) {
unsafe { ffi::whiteout_m2_M2Bone_set_parentBoneId(self.raw.as_ptr(), value) }
}
pub fn submesh_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Bone_get_submeshId(self.raw.as_ptr()) }
}
pub fn set_submesh_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Bone_set_submeshId(self.raw.as_ptr(), value) }
}
pub fn bone_name_crc(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Bone_get_boneNameCRC(self.raw.as_ptr()) }
}
pub fn set_bone_name_crc(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Bone_set_boneNameCRC(self.raw.as_ptr(), value) }
}
pub fn translation(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Bone_get_translation(
self.raw.as_ptr(),
)),
})
}
}
pub fn translation_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Bone_get_translation(
self.raw.as_ptr(),
)),
})
}
}
pub fn rotation(&self) -> crate::support::Ref<'_, AnimationTrackM2CompatQuaternion> {
unsafe {
crate::support::Ref::new(AnimationTrackM2CompatQuaternion {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Bone_get_rotation(
self.raw.as_ptr(),
)),
})
}
}
pub fn rotation_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackM2CompatQuaternion> {
unsafe {
crate::support::RefMut::new(AnimationTrackM2CompatQuaternion {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Bone_get_rotation(
self.raw.as_ptr(),
)),
})
}
}
pub fn scale(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Bone_get_scale(
self.raw.as_ptr(),
)),
})
}
}
pub fn scale_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Bone_get_scale(
self.raw.as_ptr(),
)),
})
}
}
pub fn pivot(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Bone_get_pivot(self.raw.as_ptr()) as *const crate::math::Vector3f)
}
}
pub fn set_pivot(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Bone_set_pivot(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
}
impl Default for Bone {
fn default() -> Self {
Self::new()
}
}
pub struct Texture {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Texture>,
}
impl Drop for Texture {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Texture_delete(self.raw.as_ptr()) }
}
}
impl Texture {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Texture) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Texture { raw })
}
}
unsafe impl Send for Texture {}
impl core::fmt::Debug for Texture {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Texture").finish_non_exhaustive()
}
}
impl Texture {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Texture_new();
Self::from_raw(raw).expect("native Texture allocation failed")
}
}
pub fn type_(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Texture_get_type(self.raw.as_ptr()) }
}
pub fn set_type_(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Texture_set_type(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Texture_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Texture_set_flags(self.raw.as_ptr(), value) }
}
pub fn filename(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_m2_M2Texture_get_filename(self.raw.as_ptr()))
}
}
pub fn set_filename(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_m2_M2Texture_set_filename(self.raw.as_ptr(), value.as_ptr()) }
}
}
impl Default for Texture {
fn default() -> Self {
Self::new()
}
}
pub struct Material {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Material>,
}
impl Drop for Material {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Material_delete(self.raw.as_ptr()) }
}
}
impl Material {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Material) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Material { raw })
}
}
unsafe impl Send for Material {}
impl core::fmt::Debug for Material {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Material").finish_non_exhaustive()
}
}
impl Material {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Material_new();
Self::from_raw(raw).expect("native Material allocation failed")
}
}
pub fn flags(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Material_get_flags(self.raw.as_ptr()) }
}
pub fn set_flags(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Material_set_flags(self.raw.as_ptr(), value) }
}
pub fn blending_mode(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Material_get_blendingMode(self.raw.as_ptr()) }
}
pub fn set_blending_mode(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Material_set_blendingMode(self.raw.as_ptr(), value) }
}
}
impl Default for Material {
fn default() -> Self {
Self::new()
}
}
pub struct TextureWeight {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2TextureWeight>,
}
impl Drop for TextureWeight {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2TextureWeight_delete(self.raw.as_ptr()) }
}
}
impl TextureWeight {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2TextureWeight) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TextureWeight { raw })
}
}
unsafe impl Send for TextureWeight {}
impl core::fmt::Debug for TextureWeight {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TextureWeight").finish_non_exhaustive()
}
}
impl TextureWeight {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2TextureWeight_new();
Self::from_raw(raw).expect("native TextureWeight allocation failed")
}
}
pub fn weight(&self) -> crate::support::Ref<'_, AnimationTrackI16> {
unsafe {
crate::support::Ref::new(AnimationTrackI16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureWeight_get_weight(self.raw.as_ptr()),
),
})
}
}
pub fn weight_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackI16> {
unsafe {
crate::support::RefMut::new(AnimationTrackI16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureWeight_get_weight(self.raw.as_ptr()),
),
})
}
}
}
impl Default for TextureWeight {
fn default() -> Self {
Self::new()
}
}
pub struct TextureTransform {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2TextureTransform>,
}
impl Drop for TextureTransform {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2TextureTransform_delete(self.raw.as_ptr()) }
}
}
impl TextureTransform {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2TextureTransform) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TextureTransform { raw })
}
}
unsafe impl Send for TextureTransform {}
impl core::fmt::Debug for TextureTransform {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TextureTransform").finish_non_exhaustive()
}
}
impl TextureTransform {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2TextureTransform_new();
Self::from_raw(raw).expect("native TextureTransform allocation failed")
}
}
pub fn translation(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureTransform_get_translation(self.raw.as_ptr()),
),
})
}
}
pub fn translation_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureTransform_get_translation(self.raw.as_ptr()),
),
})
}
}
pub fn rotation(&self) -> crate::support::Ref<'_, AnimationTrackM2CompatQuaternion> {
unsafe {
crate::support::Ref::new(AnimationTrackM2CompatQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureTransform_get_rotation(self.raw.as_ptr()),
),
})
}
}
pub fn rotation_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackM2CompatQuaternion> {
unsafe {
crate::support::RefMut::new(AnimationTrackM2CompatQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureTransform_get_rotation(self.raw.as_ptr()),
),
})
}
}
pub fn scaling(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureTransform_get_scaling(self.raw.as_ptr()),
),
})
}
}
pub fn scaling_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2TextureTransform_get_scaling(self.raw.as_ptr()),
),
})
}
}
}
impl Default for TextureTransform {
fn default() -> Self {
Self::new()
}
}
pub struct ColorAnimation {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ColorAnimation>,
}
impl Drop for ColorAnimation {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ColorAnimation_delete(self.raw.as_ptr()) }
}
}
impl ColorAnimation {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2ColorAnimation) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ColorAnimation { raw })
}
}
unsafe impl Send for ColorAnimation {}
impl core::fmt::Debug for ColorAnimation {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ColorAnimation").finish_non_exhaustive()
}
}
impl ColorAnimation {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ColorAnimation_new();
Self::from_raw(raw).expect("native ColorAnimation allocation failed")
}
}
pub fn color(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ColorAnimation_get_color(self.raw.as_ptr()),
),
})
}
}
pub fn color_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ColorAnimation_get_color(self.raw.as_ptr()),
),
})
}
}
pub fn alpha(&self) -> crate::support::Ref<'_, AnimationTrackI16> {
unsafe {
crate::support::Ref::new(AnimationTrackI16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ColorAnimation_get_alpha(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackI16> {
unsafe {
crate::support::RefMut::new(AnimationTrackI16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ColorAnimation_get_alpha(self.raw.as_ptr()),
),
})
}
}
}
impl Default for ColorAnimation {
fn default() -> Self {
Self::new()
}
}
pub struct Light {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Light>,
}
impl Drop for Light {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Light_delete(self.raw.as_ptr()) }
}
}
impl Light {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Light) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Light { raw })
}
}
unsafe impl Send for Light {}
impl core::fmt::Debug for Light {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Light").finish_non_exhaustive()
}
}
impl Light {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Light_new();
Self::from_raw(raw).expect("native Light allocation failed")
}
}
pub fn type_(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Light_get_type(self.raw.as_ptr()) }
}
pub fn set_type_(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Light_set_type(self.raw.as_ptr(), value) }
}
pub fn bone_id(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2Light_get_boneId(self.raw.as_ptr()) }
}
pub fn set_bone_id(&mut self, value: i16) {
unsafe { ffi::whiteout_m2_M2Light_set_boneId(self.raw.as_ptr(), value) }
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Light_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Light_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn ambient_color(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Light_get_ambientColor(
self.raw.as_ptr(),
)),
})
}
}
pub fn ambient_color_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Light_get_ambientColor(
self.raw.as_ptr(),
)),
})
}
}
pub fn ambient_intensity(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_ambientIntensity(self.raw.as_ptr()),
),
})
}
}
pub fn ambient_intensity_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_ambientIntensity(self.raw.as_ptr()),
),
})
}
}
pub fn diffuse_color(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Light_get_diffuseColor(
self.raw.as_ptr(),
)),
})
}
}
pub fn diffuse_color_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Light_get_diffuseColor(
self.raw.as_ptr(),
)),
})
}
}
pub fn diffuse_intensity(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_diffuseIntensity(self.raw.as_ptr()),
),
})
}
}
pub fn diffuse_intensity_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_diffuseIntensity(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_start(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_attenuationStart(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_start_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_attenuationStart(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_end(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_attenuationEnd(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_end_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Light_get_attenuationEnd(self.raw.as_ptr()),
),
})
}
}
pub fn visibility(&self) -> crate::support::Ref<'_, AnimationTrackU8> {
unsafe {
crate::support::Ref::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Light_get_visibility(
self.raw.as_ptr(),
)),
})
}
}
pub fn visibility_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackU8> {
unsafe {
crate::support::RefMut::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Light_get_visibility(
self.raw.as_ptr(),
)),
})
}
}
}
impl Default for Light {
fn default() -> Self {
Self::new()
}
}
pub struct CameraSpline {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2CameraSpline>,
}
impl Drop for CameraSpline {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2CameraSpline_delete(self.raw.as_ptr()) }
}
}
impl CameraSpline {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2CameraSpline) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| CameraSpline { raw })
}
}
unsafe impl Send for CameraSpline {}
impl core::fmt::Debug for CameraSpline {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("CameraSpline").finish_non_exhaustive()
}
}
impl CameraSpline {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2CameraSpline_new();
Self::from_raw(raw).expect("native CameraSpline allocation failed")
}
}
pub fn value(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2CameraSpline_get_value(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_value(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2CameraSpline_set_value(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn in_tangent(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2CameraSpline_get_inTangent(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_in_tangent(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2CameraSpline_set_inTangent(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn out_tangent(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2CameraSpline_get_outTangent(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_out_tangent(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2CameraSpline_set_outTangent(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
}
impl Default for CameraSpline {
fn default() -> Self {
Self::new()
}
}
pub struct Camera {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Camera>,
}
impl Drop for Camera {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Camera_delete(self.raw.as_ptr()) }
}
}
impl Camera {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Camera) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Camera { raw })
}
}
unsafe impl Send for Camera {}
impl core::fmt::Debug for Camera {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Camera").finish_non_exhaustive()
}
}
impl Camera {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Camera_new();
Self::from_raw(raw).expect("native Camera allocation failed")
}
}
pub fn type_(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Camera_get_type(self.raw.as_ptr()) }
}
pub fn set_type_(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Camera_set_type(self.raw.as_ptr(), value) }
}
pub fn field_of_view(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2Camera_get_fieldOfView(self.raw.as_ptr()) }
}
pub fn set_field_of_view(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2Camera_set_fieldOfView(self.raw.as_ptr(), value) }
}
pub fn far_clip(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2Camera_get_farClip(self.raw.as_ptr()) }
}
pub fn set_far_clip(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2Camera_set_farClip(self.raw.as_ptr(), value) }
}
pub fn near_clip(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2Camera_get_nearClip(self.raw.as_ptr()) }
}
pub fn set_near_clip(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2Camera_set_nearClip(self.raw.as_ptr(), value) }
}
pub fn positions(&self) -> crate::support::Ref<'_, AnimationTrackM2CameraSpline> {
unsafe {
crate::support::Ref::new(AnimationTrackM2CameraSpline {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Camera_get_positions(
self.raw.as_ptr(),
)),
})
}
}
pub fn positions_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackM2CameraSpline> {
unsafe {
crate::support::RefMut::new(AnimationTrackM2CameraSpline {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Camera_get_positions(
self.raw.as_ptr(),
)),
})
}
}
pub fn position_base(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Camera_get_positionBase(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position_base(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Camera_set_positionBase(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn target_positions(&self) -> crate::support::Ref<'_, AnimationTrackM2CameraSpline> {
unsafe {
crate::support::Ref::new(AnimationTrackM2CameraSpline {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Camera_get_targetPositions(self.raw.as_ptr()),
),
})
}
}
pub fn target_positions_mut(
&mut self,
) -> crate::support::RefMut<'_, AnimationTrackM2CameraSpline> {
unsafe {
crate::support::RefMut::new(AnimationTrackM2CameraSpline {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Camera_get_targetPositions(self.raw.as_ptr()),
),
})
}
}
pub fn target_position_base(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Camera_get_targetPositionBase(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_target_position_base(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Camera_set_targetPositionBase(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn roll(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Camera_get_roll(
self.raw.as_ptr(),
)),
})
}
}
pub fn roll_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Camera_get_roll(
self.raw.as_ptr(),
)),
})
}
}
pub fn field_of_view_track(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Camera_get_fieldOfViewTrack(self.raw.as_ptr()),
),
})
}
}
pub fn field_of_view_track_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Camera_get_fieldOfViewTrack(self.raw.as_ptr()),
),
})
}
}
}
impl Default for Camera {
fn default() -> Self {
Self::new()
}
}
pub struct Attachment {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Attachment>,
}
impl Drop for Attachment {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Attachment_delete(self.raw.as_ptr()) }
}
}
impl Attachment {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Attachment) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Attachment { raw })
}
}
unsafe impl Send for Attachment {}
impl core::fmt::Debug for Attachment {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Attachment").finish_non_exhaustive()
}
}
impl Attachment {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Attachment_new();
Self::from_raw(raw).expect("native Attachment allocation failed")
}
}
pub fn id(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Attachment_get_id(self.raw.as_ptr()) }
}
pub fn set_id(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Attachment_set_id(self.raw.as_ptr(), value) }
}
pub fn bone_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Attachment_get_boneId(self.raw.as_ptr()) }
}
pub fn set_bone_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Attachment_set_boneId(self.raw.as_ptr(), value) }
}
pub fn unknown(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2Attachment_get_unknown(self.raw.as_ptr()) }
}
pub fn set_unknown(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2Attachment_set_unknown(self.raw.as_ptr(), value) }
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Attachment_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Attachment_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn animate(&self) -> crate::support::Ref<'_, AnimationTrackU8> {
unsafe {
crate::support::Ref::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Attachment_get_animate(
self.raw.as_ptr(),
)),
})
}
}
pub fn animate_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackU8> {
unsafe {
crate::support::RefMut::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Attachment_get_animate(
self.raw.as_ptr(),
)),
})
}
}
}
impl Default for Attachment {
fn default() -> Self {
Self::new()
}
}
pub struct RibbonEmitter {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2RibbonEmitter>,
}
impl Drop for RibbonEmitter {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_delete(self.raw.as_ptr()) }
}
}
impl RibbonEmitter {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2RibbonEmitter) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| RibbonEmitter { raw })
}
}
unsafe impl Send for RibbonEmitter {}
impl core::fmt::Debug for RibbonEmitter {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("RibbonEmitter").finish_non_exhaustive()
}
}
impl RibbonEmitter {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2RibbonEmitter_new();
Self::from_raw(raw).expect("native RibbonEmitter allocation failed")
}
}
pub fn ribbon_id(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_ribbonId(self.raw.as_ptr()) }
}
pub fn set_ribbon_id(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_ribbonId(self.raw.as_ptr(), value) }
}
pub fn bone_id(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_boneId(self.raw.as_ptr()) }
}
pub fn set_bone_id(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_boneId(self.raw.as_ptr(), value) }
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2RibbonEmitter_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2RibbonEmitter_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn texture_indices(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2RibbonEmitter_get_textureIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2RibbonEmitter_get_textureIndices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_indices_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2RibbonEmitter_get_textureIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2RibbonEmitter_get_textureIndices_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_indices(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2RibbonEmitter_assign_textureIndices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_indices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_resize_textureIndices(self.raw.as_ptr(), count) }
}
pub fn material_indices(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2RibbonEmitter_get_materialIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2RibbonEmitter_get_materialIndices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn material_indices_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2RibbonEmitter_get_materialIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2RibbonEmitter_get_materialIndices_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_material_indices(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2RibbonEmitter_assign_materialIndices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_material_indices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_resize_materialIndices(self.raw.as_ptr(), count) }
}
pub fn color_track(&self) -> crate::support::Ref<'_, AnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_colorTrack(self.raw.as_ptr()),
),
})
}
}
pub fn color_track_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(AnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_colorTrack(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_track(&self) -> crate::support::Ref<'_, AnimationTrackI16> {
unsafe {
crate::support::Ref::new(AnimationTrackI16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_alphaTrack(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_track_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackI16> {
unsafe {
crate::support::RefMut::new(AnimationTrackI16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_alphaTrack(self.raw.as_ptr()),
),
})
}
}
pub fn height_above(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_heightAbove(self.raw.as_ptr()),
),
})
}
}
pub fn height_above_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_heightAbove(self.raw.as_ptr()),
),
})
}
}
pub fn height_below(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_heightBelow(self.raw.as_ptr()),
),
})
}
}
pub fn height_below_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_heightBelow(self.raw.as_ptr()),
),
})
}
}
pub fn edges_per_second(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_edgesPerSecond(self.raw.as_ptr()) }
}
pub fn set_edges_per_second(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_edgesPerSecond(self.raw.as_ptr(), value) }
}
pub fn edge_lifetime(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_edgeLifetime(self.raw.as_ptr()) }
}
pub fn set_edge_lifetime(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_edgeLifetime(self.raw.as_ptr(), value) }
}
pub fn gravity(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_gravity(self.raw.as_ptr()) }
}
pub fn set_gravity(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_gravity(self.raw.as_ptr(), value) }
}
pub fn texture_rows(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_textureRows(self.raw.as_ptr()) }
}
pub fn set_texture_rows(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_textureRows(self.raw.as_ptr(), value) }
}
pub fn texture_cols(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_textureCols(self.raw.as_ptr()) }
}
pub fn set_texture_cols(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_textureCols(self.raw.as_ptr(), value) }
}
pub fn tex_slot(&self) -> crate::support::Ref<'_, AnimationTrackU16> {
unsafe {
crate::support::Ref::new(AnimationTrackU16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_texSlot(self.raw.as_ptr()),
),
})
}
}
pub fn tex_slot_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackU16> {
unsafe {
crate::support::RefMut::new(AnimationTrackU16 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_texSlot(self.raw.as_ptr()),
),
})
}
}
pub fn visibility(&self) -> crate::support::Ref<'_, AnimationTrackU8> {
unsafe {
crate::support::Ref::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_visibility(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackU8> {
unsafe {
crate::support::RefMut::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2RibbonEmitter_get_visibility(self.raw.as_ptr()),
),
})
}
}
pub fn priority_plane(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_priorityPlane(self.raw.as_ptr()) }
}
pub fn set_priority_plane(&mut self, value: i16) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_priorityPlane(self.raw.as_ptr(), value) }
}
pub fn ribbon_color_index(&self) -> i8 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_ribbonColorIndex(self.raw.as_ptr()) }
}
pub fn set_ribbon_color_index(&mut self, value: i8) {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_set_ribbonColorIndex(self.raw.as_ptr(), value) }
}
pub fn texture_transform_index(&self) -> i8 {
unsafe { ffi::whiteout_m2_M2RibbonEmitter_get_textureTransformIndex(self.raw.as_ptr()) }
}
pub fn set_texture_transform_index(&mut self, value: i8) {
unsafe {
ffi::whiteout_m2_M2RibbonEmitter_set_textureTransformIndex(self.raw.as_ptr(), value)
}
}
}
impl Default for RibbonEmitter {
fn default() -> Self {
Self::new()
}
}
pub struct Box {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Box>,
}
impl Drop for Box {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Box_delete(self.raw.as_ptr()) }
}
}
impl Box {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Box) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Box { raw })
}
}
unsafe impl Send for Box {}
impl core::fmt::Debug for Box {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Box").finish_non_exhaustive()
}
}
impl Box {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Box_new();
Self::from_raw(raw).expect("native Box allocation failed")
}
}
pub fn minimum(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Box_get_minimum(self.raw.as_ptr()) as *const crate::math::Vector3f)
}
}
pub fn set_minimum(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Box_set_minimum(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn maximum(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Box_get_maximum(self.raw.as_ptr()) as *const crate::math::Vector3f)
}
}
pub fn set_maximum(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Box_set_maximum(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
}
impl Default for Box {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleEmitter {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ParticleEmitter>,
}
impl Drop for ParticleEmitter {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_delete(self.raw.as_ptr()) }
}
}
impl ParticleEmitter {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2ParticleEmitter) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ParticleEmitter { raw })
}
}
unsafe impl Send for ParticleEmitter {}
impl core::fmt::Debug for ParticleEmitter {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ParticleEmitter").finish_non_exhaustive()
}
}
impl ParticleEmitter {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ParticleEmitter_new();
Self::from_raw(raw).expect("native ParticleEmitter allocation failed")
}
}
pub fn particle_id(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_particleId(self.raw.as_ptr()) }
}
pub fn set_particle_id(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_particleId(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> ParticleFlag {
ParticleFlag(unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_flags(self.raw.as_ptr()) })
}
pub fn set_flags(&mut self, value: ParticleFlag) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_flags(self.raw.as_ptr(), value.0) }
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2ParticleEmitter_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn bone_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_boneId(self.raw.as_ptr()) }
}
pub fn set_bone_id(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_boneId(self.raw.as_ptr(), value) }
}
pub fn particle_model_filename(&self) -> String {
unsafe {
crate::support::take_string(
ffi::whiteout_m2_M2ParticleEmitter_get_particleModelFilename(self.raw.as_ptr()),
)
}
}
pub fn set_particle_model_filename(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_particleModelFilename(
self.raw.as_ptr(),
value.as_ptr(),
)
}
}
pub fn child_emitters_model_filename(&self) -> String {
unsafe {
crate::support::take_string(
ffi::whiteout_m2_M2ParticleEmitter_get_childEmittersModelFilename(
self.raw.as_ptr(),
),
)
}
}
pub fn set_child_emitters_model_filename(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_childEmittersModelFilename(
self.raw.as_ptr(),
value.as_ptr(),
)
}
}
pub fn blending_type(&self) -> ParticleBlending {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_blendingType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_blending_type(&mut self, value: ParticleBlending) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_blendingType(self.raw.as_ptr(), value as i32)
}
}
pub fn emitter_type(&self) -> ParticleEmitterType {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_emitterType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_emitter_type(&mut self, value: ParticleEmitterType) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_emitterType(self.raw.as_ptr(), value as i32)
}
}
pub fn particle_color_index(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_particleColorIndex(self.raw.as_ptr()) }
}
pub fn set_particle_color_index(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_particleColorIndex(self.raw.as_ptr(), value)
}
}
pub fn texture_tilerotation(&self) -> i16 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_textureTilerotation(self.raw.as_ptr()) }
}
pub fn set_texture_tilerotation(&mut self, value: i16) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_textureTilerotation(self.raw.as_ptr(), value)
}
}
pub fn rows(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_rows(self.raw.as_ptr()) }
}
pub fn set_rows(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_rows(self.raw.as_ptr(), value) }
}
pub fn columns(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_columns(self.raw.as_ptr()) }
}
pub fn set_columns(&mut self, value: u16) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_columns(self.raw.as_ptr(), value) }
}
pub fn emission_speed(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionSpeed(self.raw.as_ptr()),
),
})
}
}
pub fn emission_speed_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionSpeed(self.raw.as_ptr()),
),
})
}
}
pub fn speed_variation(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_speedVariation(self.raw.as_ptr()),
),
})
}
}
pub fn speed_variation_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_speedVariation(self.raw.as_ptr()),
),
})
}
}
pub fn vertical_range(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_verticalRange(self.raw.as_ptr()),
),
})
}
}
pub fn vertical_range_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_verticalRange(self.raw.as_ptr()),
),
})
}
}
pub fn horizontal_range(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_horizontalRange(self.raw.as_ptr()),
),
})
}
}
pub fn horizontal_range_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_horizontalRange(self.raw.as_ptr()),
),
})
}
}
pub fn gravity(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_gravity(self.raw.as_ptr()),
),
})
}
}
pub fn gravity_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_gravity(self.raw.as_ptr()),
),
})
}
}
pub fn lifespan(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_lifespan(self.raw.as_ptr()),
),
})
}
}
pub fn lifespan_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_lifespan(self.raw.as_ptr()),
),
})
}
}
pub fn lifespan_variation(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_lifespanVariation(self.raw.as_ptr()) }
}
pub fn set_lifespan_variation(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_lifespanVariation(self.raw.as_ptr(), value)
}
}
pub fn emission_rate(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionRate(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionRate(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_variation(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_emissionRateVariation(self.raw.as_ptr()) }
}
pub fn set_emission_rate_variation(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_emissionRateVariation(self.raw.as_ptr(), value)
}
}
pub fn emission_area_width(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionAreaWidth(self.raw.as_ptr()),
),
})
}
}
pub fn emission_area_width_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionAreaWidth(self.raw.as_ptr()),
),
})
}
}
pub fn emission_area_length(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionAreaLength(self.raw.as_ptr()),
),
})
}
}
pub fn emission_area_length_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_emissionAreaLength(self.raw.as_ptr()),
),
})
}
}
pub fn z_source(&self) -> crate::support::Ref<'_, AnimationTrackF32> {
unsafe {
crate::support::Ref::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_zSource(self.raw.as_ptr()),
),
})
}
}
pub fn z_source_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackF32> {
unsafe {
crate::support::RefMut::new(AnimationTrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_zSource(self.raw.as_ptr()),
),
})
}
}
pub fn color_track(&self) -> crate::support::Ref<'_, ParticleAnimationTrackVector3f> {
unsafe {
crate::support::Ref::new(ParticleAnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_colorTrack(self.raw.as_ptr()),
),
})
}
}
pub fn color_track_mut(
&mut self,
) -> crate::support::RefMut<'_, ParticleAnimationTrackVector3f> {
unsafe {
crate::support::RefMut::new(ParticleAnimationTrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_colorTrack(self.raw.as_ptr()),
),
})
}
}
pub fn scale_track(&self) -> crate::support::Ref<'_, ParticleAnimationTrackVector2f> {
unsafe {
crate::support::Ref::new(ParticleAnimationTrackVector2f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_scaleTrack(self.raw.as_ptr()),
),
})
}
}
pub fn scale_track_mut(
&mut self,
) -> crate::support::RefMut<'_, ParticleAnimationTrackVector2f> {
unsafe {
crate::support::RefMut::new(ParticleAnimationTrackVector2f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_scaleTrack(self.raw.as_ptr()),
),
})
}
}
pub fn scale_vary(&self) -> crate::math::Vector2f {
unsafe {
*(ffi::whiteout_m2_M2ParticleEmitter_get_scaleVary(self.raw.as_ptr())
as *const crate::math::Vector2f)
}
}
pub fn set_scale_vary(&mut self, value: crate::math::Vector2f) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_scaleVary(
self.raw.as_ptr(),
&value as *const crate::math::Vector2f as *const _,
)
}
}
pub fn tail_length(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_tailLength(self.raw.as_ptr()) }
}
pub fn set_tail_length(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_tailLength(self.raw.as_ptr(), value) }
}
pub fn twinkle_speed(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_twinkleSpeed(self.raw.as_ptr()) }
}
pub fn set_twinkle_speed(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_twinkleSpeed(self.raw.as_ptr(), value) }
}
pub fn twinkle_percent(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_twinklePercent(self.raw.as_ptr()) }
}
pub fn set_twinkle_percent(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_twinklePercent(self.raw.as_ptr(), value) }
}
pub fn twinkle_scale(&self) -> crate::math::Vector2f {
unsafe {
*(ffi::whiteout_m2_M2ParticleEmitter_get_twinkleScale(self.raw.as_ptr())
as *const crate::math::Vector2f)
}
}
pub fn set_twinkle_scale(&mut self, value: crate::math::Vector2f) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_twinkleScale(
self.raw.as_ptr(),
&value as *const crate::math::Vector2f as *const _,
)
}
}
pub fn inherit_velocity_scale(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_inheritVelocityScale(self.raw.as_ptr()) }
}
pub fn set_inherit_velocity_scale(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_inheritVelocityScale(self.raw.as_ptr(), value)
}
}
pub fn drag(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_drag(self.raw.as_ptr()) }
}
pub fn set_drag(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_drag(self.raw.as_ptr(), value) }
}
pub fn base_spin(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_baseSpin(self.raw.as_ptr()) }
}
pub fn set_base_spin(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_baseSpin(self.raw.as_ptr(), value) }
}
pub fn base_spin_variation(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_baseSpinVariation(self.raw.as_ptr()) }
}
pub fn set_base_spin_variation(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_baseSpinVariation(self.raw.as_ptr(), value)
}
}
pub fn spin_speed(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_spinSpeed(self.raw.as_ptr()) }
}
pub fn set_spin_speed(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_spinSpeed(self.raw.as_ptr(), value) }
}
pub fn spin_speed_variation(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_spinSpeedVariation(self.raw.as_ptr()) }
}
pub fn set_spin_speed_variation(&mut self, value: f32) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_spinSpeedVariation(self.raw.as_ptr(), value)
}
}
pub fn tumble(&self) -> crate::support::Ref<'_, Box> {
unsafe {
crate::support::Ref::new(Box {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_tumble(self.raw.as_ptr()),
),
})
}
}
pub fn tumble_mut(&mut self) -> crate::support::RefMut<'_, Box> {
unsafe {
crate::support::RefMut::new(Box {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_tumble(self.raw.as_ptr()),
),
})
}
}
pub fn wind_vector(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2ParticleEmitter_get_windVector(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_wind_vector(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_set_windVector(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn wind_time(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_windTime(self.raw.as_ptr()) }
}
pub fn set_wind_time(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_windTime(self.raw.as_ptr(), value) }
}
pub fn follow_speed_1(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_followSpeed1(self.raw.as_ptr()) }
}
pub fn set_follow_speed_1(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_followSpeed1(self.raw.as_ptr(), value) }
}
pub fn follow_scale_1(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_followScale1(self.raw.as_ptr()) }
}
pub fn set_follow_scale_1(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_followScale1(self.raw.as_ptr(), value) }
}
pub fn follow_speed_2(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_followSpeed2(self.raw.as_ptr()) }
}
pub fn set_follow_speed_2(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_followSpeed2(self.raw.as_ptr(), value) }
}
pub fn follow_scale_2(&self) -> f32 {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_get_followScale2(self.raw.as_ptr()) }
}
pub fn set_follow_scale_2(&mut self, value: f32) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_set_followScale2(self.raw.as_ptr(), value) }
}
pub fn spline_points(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2ParticleEmitter_get_splinePoints_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2ParticleEmitter_get_splinePoints_data(self.raw.as_ptr())
as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn spline_points_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2ParticleEmitter_get_splinePoints_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2ParticleEmitter_get_splinePoints_data(self.raw.as_ptr())
as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_spline_points(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2ParticleEmitter_assign_splinePoints(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_spline_points(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2ParticleEmitter_resize_splinePoints(self.raw.as_ptr(), count) }
}
pub fn enabled_in(&self) -> crate::support::Ref<'_, AnimationTrackU8> {
unsafe {
crate::support::Ref::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_enabledIn(self.raw.as_ptr()),
),
})
}
}
pub fn enabled_in_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackU8> {
unsafe {
crate::support::RefMut::new(AnimationTrackU8 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2ParticleEmitter_get_enabledIn(self.raw.as_ptr()),
),
})
}
}
}
impl Default for ParticleEmitter {
fn default() -> Self {
Self::new()
}
}
pub struct Event {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Event>,
}
impl Drop for Event {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Event_delete(self.raw.as_ptr()) }
}
}
impl Event {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Event) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Event { raw })
}
}
unsafe impl Send for Event {}
impl core::fmt::Debug for Event {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Event").finish_non_exhaustive()
}
}
impl Event {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Event_new();
Self::from_raw(raw).expect("native Event allocation failed")
}
}
pub fn identifier(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Event_get_identifier(self.raw.as_ptr()) }
}
pub fn set_identifier(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Event_set_identifier(self.raw.as_ptr(), value) }
}
pub fn data(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Event_get_data(self.raw.as_ptr()) }
}
pub fn set_data(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Event_set_data(self.raw.as_ptr(), value) }
}
pub fn bone_id(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Event_get_boneId(self.raw.as_ptr()) }
}
pub fn set_bone_id(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Event_set_boneId(self.raw.as_ptr(), value) }
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_m2_M2Event_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_m2_M2Event_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn enabled(&self) -> crate::support::Ref<'_, AnimationTrackBase> {
unsafe {
crate::support::Ref::new(AnimationTrackBase {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Event_get_enabled(
self.raw.as_ptr(),
)),
})
}
}
pub fn enabled_mut(&mut self) -> crate::support::RefMut<'_, AnimationTrackBase> {
unsafe {
crate::support::RefMut::new(AnimationTrackBase {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Event_get_enabled(
self.raw.as_ptr(),
)),
})
}
}
}
impl Default for Event {
fn default() -> Self {
Self::new()
}
}
pub struct Model {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Model>,
}
impl Drop for Model {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Model_delete(self.raw.as_ptr()) }
}
}
impl Model {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Model) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Model { raw })
}
}
unsafe impl Send for Model {}
impl core::fmt::Debug for Model {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Model").finish_non_exhaustive()
}
}
impl Model {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Model_new();
Self::from_raw(raw).expect("native Model allocation failed")
}
}
pub fn model_name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_m2_M2Model_get_modelName(self.raw.as_ptr()))
}
}
pub fn set_model_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_m2_M2Model_set_modelName(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn global_flags(&self) -> crate::support::Ref<'_, GlobalFlags> {
unsafe {
crate::support::Ref::new(GlobalFlags {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_globalFlags(
self.raw.as_ptr(),
)),
})
}
}
pub fn global_flags_mut(&mut self) -> crate::support::RefMut<'_, GlobalFlags> {
unsafe {
crate::support::RefMut::new(GlobalFlags {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_globalFlags(
self.raw.as_ptr(),
)),
})
}
}
pub fn global_loops_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_globalLoops_count(self.raw.as_ptr()) }
}
pub fn global_loops(&self, index: usize) -> Option<crate::support::Ref<'_, GlobalSequence>> {
if index >= self.global_loops_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(GlobalSequence {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_globalLoops_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn global_loops_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, GlobalSequence>> {
if index >= self.global_loops_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(GlobalSequence {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_globalLoops_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn global_loops_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, GlobalSequence>> {
(0..self.global_loops_len()).map(move |i| self.global_loops(i).expect("index below len"))
}
pub fn resize_global_loops(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_globalLoops(self.raw.as_ptr(), count) }
}
pub fn sequences_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_sequences_count(self.raw.as_ptr()) }
}
pub fn sequences(&self, index: usize) -> Option<crate::support::Ref<'_, Sequence>> {
if index >= self.sequences_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Sequence {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_sequences_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn sequences_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Sequence>> {
if index >= self.sequences_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Sequence {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_sequences_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn sequences_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Sequence>> {
(0..self.sequences_len()).map(move |i| self.sequences(i).expect("index below len"))
}
pub fn resize_sequences(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_sequences(self.raw.as_ptr(), count) }
}
pub fn sequence_idx_hash_by_id(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_sequenceIdxHashById_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_sequenceIdxHashById_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn sequence_idx_hash_by_id_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_sequenceIdxHashById_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_sequenceIdxHashById_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_sequence_idx_hash_by_id(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_sequenceIdxHashById(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_sequence_idx_hash_by_id(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_sequenceIdxHashById(self.raw.as_ptr(), count) }
}
pub fn bones_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_bones_count(self.raw.as_ptr()) }
}
pub fn bones(&self, index: usize) -> Option<crate::support::Ref<'_, Bone>> {
if index >= self.bones_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Bone {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_bones_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn bones_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Bone>> {
if index >= self.bones_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Bone {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_bones_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn bones_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Bone>> {
(0..self.bones_len()).map(move |i| self.bones(i).expect("index below len"))
}
pub fn resize_bones(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_bones(self.raw.as_ptr(), count) }
}
pub fn key_bone_ids(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_keyBoneIds_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_keyBoneIds_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn key_bone_ids_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_keyBoneIds_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_keyBoneIds_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_key_bone_ids(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_keyBoneIds(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_key_bone_ids(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_keyBoneIds(self.raw.as_ptr(), count) }
}
pub fn vertices_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_vertices_count(self.raw.as_ptr()) }
}
pub fn vertices(&self, index: usize) -> Option<crate::support::Ref<'_, Vertex>> {
if index >= self.vertices_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Vertex {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_vertices_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn vertices_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Vertex>> {
if index >= self.vertices_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Vertex {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_vertices_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn vertices_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Vertex>> {
(0..self.vertices_len()).map(move |i| self.vertices(i).expect("index below len"))
}
pub fn resize_vertices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_vertices(self.raw.as_ptr(), count) }
}
pub fn skin_profiles_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_skinProfiles_count(self.raw.as_ptr()) }
}
pub fn skin_profiles(&self, index: usize) -> Option<crate::support::Ref<'_, SkinProfile>> {
if index >= self.skin_profiles_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(SkinProfile {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_skinProfiles_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn skin_profiles_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, SkinProfile>> {
if index >= self.skin_profiles_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(SkinProfile {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_skinProfiles_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn skin_profiles_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, SkinProfile>> {
(0..self.skin_profiles_len()).map(move |i| self.skin_profiles(i).expect("index below len"))
}
pub fn resize_skin_profiles(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_skinProfiles(self.raw.as_ptr(), count) }
}
pub fn lod_profiles_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_lodProfiles_count(self.raw.as_ptr()) }
}
pub fn lod_profiles(&self, index: usize) -> Option<crate::support::Ref<'_, SkinProfile>> {
if index >= self.lod_profiles_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(SkinProfile {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_lodProfiles_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn lod_profiles_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, SkinProfile>> {
if index >= self.lod_profiles_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(SkinProfile {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_lodProfiles_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn lod_profiles_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, SkinProfile>> {
(0..self.lod_profiles_len()).map(move |i| self.lod_profiles(i).expect("index below len"))
}
pub fn resize_lod_profiles(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_lodProfiles(self.raw.as_ptr(), count) }
}
pub fn num_skin_profiles(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2Model_get_numSkinProfiles(self.raw.as_ptr()) }
}
pub fn set_num_skin_profiles(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2Model_set_numSkinProfiles(self.raw.as_ptr(), value) }
}
pub fn colors_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_colors_count(self.raw.as_ptr()) }
}
pub fn colors(&self, index: usize) -> Option<crate::support::Ref<'_, ColorAnimation>> {
if index >= self.colors_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(ColorAnimation {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_colors_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn colors_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, ColorAnimation>> {
if index >= self.colors_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(ColorAnimation {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_colors_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn colors_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, ColorAnimation>> {
(0..self.colors_len()).map(move |i| self.colors(i).expect("index below len"))
}
pub fn resize_colors(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_colors(self.raw.as_ptr(), count) }
}
pub fn textures_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_textures_count(self.raw.as_ptr()) }
}
pub fn textures(&self, index: usize) -> Option<crate::support::Ref<'_, Texture>> {
if index >= self.textures_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Texture {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_textures_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn textures_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Texture>> {
if index >= self.textures_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Texture {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_textures_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn textures_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Texture>> {
(0..self.textures_len()).map(move |i| self.textures(i).expect("index below len"))
}
pub fn resize_textures(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textures(self.raw.as_ptr(), count) }
}
pub fn texture_weights_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_textureWeights_count(self.raw.as_ptr()) }
}
pub fn texture_weights(&self, index: usize) -> Option<crate::support::Ref<'_, TextureWeight>> {
if index >= self.texture_weights_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(TextureWeight {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_textureWeights_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn texture_weights_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, TextureWeight>> {
if index >= self.texture_weights_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(TextureWeight {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_textureWeights_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn texture_weights_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, TextureWeight>> {
(0..self.texture_weights_len())
.map(move |i| self.texture_weights(i).expect("index below len"))
}
pub fn resize_texture_weights(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureWeights(self.raw.as_ptr(), count) }
}
pub fn texture_transforms_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_textureTransforms_count(self.raw.as_ptr()) }
}
pub fn texture_transforms(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, TextureTransform>> {
if index >= self.texture_transforms_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(TextureTransform {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_textureTransforms_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn texture_transforms_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, TextureTransform>> {
if index >= self.texture_transforms_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(TextureTransform {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_textureTransforms_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn texture_transforms_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, TextureTransform>> {
(0..self.texture_transforms_len())
.map(move |i| self.texture_transforms(i).expect("index below len"))
}
pub fn resize_texture_transforms(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureTransforms(self.raw.as_ptr(), count) }
}
pub fn texture_indices_by_id(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureIndicesById_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureIndicesById_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_indices_by_id_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureIndicesById_count(self.raw.as_ptr());
let p =
ffi::whiteout_m2_M2Model_get_textureIndicesById_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_indices_by_id(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_textureIndicesById(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_indices_by_id(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureIndicesById(self.raw.as_ptr(), count) }
}
pub fn materials_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_materials_count(self.raw.as_ptr()) }
}
pub fn materials(&self, index: usize) -> Option<crate::support::Ref<'_, Material>> {
if index >= self.materials_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Material {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_materials_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn materials_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Material>> {
if index >= self.materials_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Material {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_materials_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn materials_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Material>> {
(0..self.materials_len()).map(move |i| self.materials(i).expect("index below len"))
}
pub fn resize_materials(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_materials(self.raw.as_ptr(), count) }
}
pub fn bone_combos(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_boneCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_boneCombos_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn bone_combos_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_boneCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_boneCombos_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_bone_combos(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_boneCombos(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_bone_combos(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_boneCombos(self.raw.as_ptr(), count) }
}
pub fn texture_combos(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureCombos_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_combos_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureCombos_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_combos(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_textureCombos(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_combos(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureCombos(self.raw.as_ptr(), count) }
}
pub fn texture_coord_combos(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureCoordCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureCoordCombos_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_coord_combos_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureCoordCombos_count(self.raw.as_ptr());
let p =
ffi::whiteout_m2_M2Model_get_textureCoordCombos_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_coord_combos(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_textureCoordCombos(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_coord_combos(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureCoordCombos(self.raw.as_ptr(), count) }
}
pub fn texture_weight_combos(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureWeightCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureWeightCombos_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_weight_combos_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureWeightCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureWeightCombos_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_weight_combos(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_textureWeightCombos(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_weight_combos(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureWeightCombos(self.raw.as_ptr(), count) }
}
pub fn texture_transform_combos(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureTransformCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureTransformCombos_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_transform_combos_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureTransformCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureTransformCombos_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_transform_combos(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_textureTransformCombos(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_transform_combos(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureTransformCombos(self.raw.as_ptr(), count) }
}
pub fn bounding(&self) -> crate::support::Ref<'_, Extent> {
unsafe {
crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_bounding(
self.raw.as_ptr(),
)),
})
}
}
pub fn bounding_mut(&mut self) -> crate::support::RefMut<'_, Extent> {
unsafe {
crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_bounding(
self.raw.as_ptr(),
)),
})
}
}
pub fn collision(&self) -> crate::support::Ref<'_, Extent> {
unsafe {
crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_collision(
self.raw.as_ptr(),
)),
})
}
}
pub fn collision_mut(&mut self) -> crate::support::RefMut<'_, Extent> {
unsafe {
crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_collision(
self.raw.as_ptr(),
)),
})
}
}
pub fn collision_triangle_indices(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_collisionTriangleIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_collisionTriangleIndices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn collision_triangle_indices_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_collisionTriangleIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_collisionTriangleIndices_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_collision_triangle_indices(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_collisionTriangleIndices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_collision_triangle_indices(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2Model_resize_collisionTriangleIndices(self.raw.as_ptr(), count)
}
}
pub fn collision_vertices(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_collisionVertices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_collisionVertices_data(self.raw.as_ptr())
as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn collision_vertices_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_collisionVertices_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_collisionVertices_data(self.raw.as_ptr())
as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_collision_vertices(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_collisionVertices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_collision_vertices(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_collisionVertices(self.raw.as_ptr(), count) }
}
pub fn collision_face_normals(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_collisionFaceNormals_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_collisionFaceNormals_data(self.raw.as_ptr())
as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn collision_face_normals_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_collisionFaceNormals_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_collisionFaceNormals_data(self.raw.as_ptr())
as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_collision_face_normals(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_collisionFaceNormals(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_collision_face_normals(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_collisionFaceNormals(self.raw.as_ptr(), count) }
}
pub fn attachments_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_attachments_count(self.raw.as_ptr()) }
}
pub fn attachments(&self, index: usize) -> Option<crate::support::Ref<'_, Attachment>> {
if index >= self.attachments_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Attachment {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_attachments_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn attachments_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, Attachment>> {
if index >= self.attachments_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Attachment {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_attachments_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn attachments_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Attachment>> {
(0..self.attachments_len()).map(move |i| self.attachments(i).expect("index below len"))
}
pub fn resize_attachments(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_attachments(self.raw.as_ptr(), count) }
}
pub fn attachment_indices_by_id(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_attachmentIndicesById_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_attachmentIndicesById_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn attachment_indices_by_id_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_attachmentIndicesById_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_attachmentIndicesById_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_attachment_indices_by_id(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_attachmentIndicesById(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_attachment_indices_by_id(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_attachmentIndicesById(self.raw.as_ptr(), count) }
}
pub fn events_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_events_count(self.raw.as_ptr()) }
}
pub fn events(&self, index: usize) -> Option<crate::support::Ref<'_, Event>> {
if index >= self.events_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Event {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_events_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn events_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Event>> {
if index >= self.events_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Event {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_events_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn events_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Event>> {
(0..self.events_len()).map(move |i| self.events(i).expect("index below len"))
}
pub fn resize_events(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_events(self.raw.as_ptr(), count) }
}
pub fn lights_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_lights_count(self.raw.as_ptr()) }
}
pub fn lights(&self, index: usize) -> Option<crate::support::Ref<'_, Light>> {
if index >= self.lights_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Light {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_lights_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn lights_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Light>> {
if index >= self.lights_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Light {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_lights_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn lights_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Light>> {
(0..self.lights_len()).map(move |i| self.lights(i).expect("index below len"))
}
pub fn resize_lights(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_lights(self.raw.as_ptr(), count) }
}
pub fn cameras_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_cameras_count(self.raw.as_ptr()) }
}
pub fn cameras(&self, index: usize) -> Option<crate::support::Ref<'_, Camera>> {
if index >= self.cameras_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Camera {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_cameras_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn cameras_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Camera>> {
if index >= self.cameras_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Camera {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_m2_M2Model_get_cameras_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn cameras_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Camera>> {
(0..self.cameras_len()).map(move |i| self.cameras(i).expect("index below len"))
}
pub fn resize_cameras(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_cameras(self.raw.as_ptr(), count) }
}
pub fn camera_indices_by_id(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_cameraIndicesById_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_cameraIndicesById_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn camera_indices_by_id_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_cameraIndicesById_count(self.raw.as_ptr());
let p =
ffi::whiteout_m2_M2Model_get_cameraIndicesById_data(self.raw.as_ptr()) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_camera_indices_by_id(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_cameraIndicesById(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_camera_indices_by_id(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_cameraIndicesById(self.raw.as_ptr(), count) }
}
pub fn ribbon_emitters_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_ribbonEmitters_count(self.raw.as_ptr()) }
}
pub fn ribbon_emitters(&self, index: usize) -> Option<crate::support::Ref<'_, RibbonEmitter>> {
if index >= self.ribbon_emitters_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(RibbonEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_ribbonEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn ribbon_emitters_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, RibbonEmitter>> {
if index >= self.ribbon_emitters_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(RibbonEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_ribbonEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn ribbon_emitters_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, RibbonEmitter>> {
(0..self.ribbon_emitters_len())
.map(move |i| self.ribbon_emitters(i).expect("index below len"))
}
pub fn resize_ribbon_emitters(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_ribbonEmitters(self.raw.as_ptr(), count) }
}
pub fn particle_emitters_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_particleEmitters_count(self.raw.as_ptr()) }
}
pub fn particle_emitters(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, ParticleEmitter>> {
if index >= self.particle_emitters_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(ParticleEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_particleEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn particle_emitters_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, ParticleEmitter>> {
if index >= self.particle_emitters_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(ParticleEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_particleEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn particle_emitters_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, ParticleEmitter>> {
(0..self.particle_emitters_len())
.map(move |i| self.particle_emitters(i).expect("index below len"))
}
pub fn resize_particle_emitters(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_particleEmitters(self.raw.as_ptr(), count) }
}
pub fn texture_combiner_combos(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureCombinerCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureCombinerCombos_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_combiner_combos_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_textureCombinerCombos_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_textureCombinerCombos_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_combiner_combos(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_textureCombinerCombos(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_combiner_combos(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_textureCombinerCombos(self.raw.as_ptr(), count) }
}
pub fn texture_ids(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_texture_ids_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_texture_ids_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_ids_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_texture_ids_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_texture_ids_data(self.raw.as_ptr()) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_texture_ids(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_texture_ids(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_ids(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_texture_ids(self.raw.as_ptr(), count) }
}
pub fn parent_sequence_replacements(&self) -> &[u16] {
unsafe {
let n =
ffi::whiteout_m2_M2Model_get_parentSequenceReplacements_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_parentSequenceReplacements_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn parent_sequence_replacements_mut(&mut self) -> &mut [u16] {
unsafe {
let n =
ffi::whiteout_m2_M2Model_get_parentSequenceReplacements_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_parentSequenceReplacements_data(self.raw.as_ptr())
as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_parent_sequence_replacements(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_parentSequenceReplacements(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_parent_sequence_replacements(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2Model_resize_parentSequenceReplacements(self.raw.as_ptr(), count)
}
}
pub fn parent_texture_weights_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_parentTextureWeights_count(self.raw.as_ptr()) }
}
pub fn parent_texture_weights(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, TextureWeight>> {
if index >= self.parent_texture_weights_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(TextureWeight {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_parentTextureWeights_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn parent_texture_weights_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, TextureWeight>> {
if index >= self.parent_texture_weights_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(TextureWeight {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_parentTextureWeights_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn parent_texture_weights_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, TextureWeight>> {
(0..self.parent_texture_weights_len())
.map(move |i| self.parent_texture_weights(i).expect("index below len"))
}
pub fn resize_parent_texture_weights(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_parentTextureWeights(self.raw.as_ptr(), count) }
}
pub fn parent_sequence_bounds_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_parentSequenceBounds_count(self.raw.as_ptr()) }
}
pub fn parent_sequence_bounds(&self, index: usize) -> Option<crate::support::Ref<'_, Extent>> {
if index >= self.parent_sequence_bounds_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_parentSequenceBounds_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn parent_sequence_bounds_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, Extent>> {
if index >= self.parent_sequence_bounds_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_parentSequenceBounds_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn parent_sequence_bounds_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Extent>> {
(0..self.parent_sequence_bounds_len())
.map(move |i| self.parent_sequence_bounds(i).expect("index below len"))
}
pub fn resize_parent_sequence_bounds(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_parentSequenceBounds(self.raw.as_ptr(), count) }
}
pub fn parent_event_data_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_parentEventData_count(self.raw.as_ptr()) }
}
pub fn parent_event_data(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, AnimationTrackBase>> {
if index >= self.parent_event_data_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(AnimationTrackBase {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_parentEventData_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn parent_event_data_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, AnimationTrackBase>> {
if index >= self.parent_event_data_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(AnimationTrackBase {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_parentEventData_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn parent_event_data_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, AnimationTrackBase>> {
(0..self.parent_event_data_len())
.map(move |i| self.parent_event_data(i).expect("index below len"))
}
pub fn resize_parent_event_data(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_parentEventData(self.raw.as_ptr(), count) }
}
pub fn recursive_particle_model_ids(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_recursiveParticleModelIds_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_recursiveParticleModelIds_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn recursive_particle_model_ids_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_recursiveParticleModelIds_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_recursiveParticleModelIds_data(self.raw.as_ptr())
as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_recursive_particle_model_ids(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_recursiveParticleModelIds(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_recursive_particle_model_ids(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2Model_resize_recursiveParticleModelIds(self.raw.as_ptr(), count)
}
}
pub fn geometry_particle_model_ids(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_geometryParticleModelIds_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_geometryParticleModelIds_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn geometry_particle_model_ids_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_geometryParticleModelIds_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_geometryParticleModelIds_data(self.raw.as_ptr())
as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_geometry_particle_model_ids(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_geometryParticleModelIds(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_geometry_particle_model_ids(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2Model_resize_geometryParticleModelIds(self.raw.as_ptr(), count)
}
}
pub fn particle_geosets_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_particleGeosets_count(self.raw.as_ptr()) }
}
pub fn particle_geosets(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, ParticleGeosetData>> {
if index >= self.particle_geosets_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(ParticleGeosetData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_particleGeosets_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn particle_geosets_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, ParticleGeosetData>> {
if index >= self.particle_geosets_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(ParticleGeosetData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_particleGeosets_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn particle_geosets_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, ParticleGeosetData>> {
(0..self.particle_geosets_len())
.map(move |i| self.particle_geosets(i).expect("index below len"))
}
pub fn resize_particle_geosets(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_particleGeosets(self.raw.as_ptr(), count) }
}
pub fn physics_file_data(&self) -> &[u8] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_physicsFileData_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_physicsFileData_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn physics_file_data_mut(&mut self) -> &mut [u8] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_physicsFileData_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_physicsFileData_data(self.raw.as_ptr()) as *mut u8;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_physics_file_data(&mut self, values: &[u8]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_physicsFileData(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_physics_file_data(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_physicsFileData(self.raw.as_ptr(), count) }
}
pub fn edge_fade_entries_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_edgeFadeEntries_count(self.raw.as_ptr()) }
}
pub fn edge_fade_entries(&self, index: usize) -> Option<crate::support::Ref<'_, EdgeFadeData>> {
if index >= self.edge_fade_entries_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(EdgeFadeData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_edgeFadeEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn edge_fade_entries_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, EdgeFadeData>> {
if index >= self.edge_fade_entries_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(EdgeFadeData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_edgeFadeEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn edge_fade_entries_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, EdgeFadeData>> {
(0..self.edge_fade_entries_len())
.map(move |i| self.edge_fade_entries(i).expect("index below len"))
}
pub fn resize_edge_fade_entries(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_edgeFadeEntries(self.raw.as_ptr(), count) }
}
pub fn nerf_entries_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_nerfEntries_count(self.raw.as_ptr()) }
}
pub fn nerf_entries(&self, index: usize) -> Option<crate::support::Ref<'_, DistanceFadeData>> {
if index >= self.nerf_entries_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(DistanceFadeData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_nerfEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn nerf_entries_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, DistanceFadeData>> {
if index >= self.nerf_entries_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(DistanceFadeData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_nerfEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn nerf_entries_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, DistanceFadeData>> {
(0..self.nerf_entries_len()).map(move |i| self.nerf_entries(i).expect("index below len"))
}
pub fn resize_nerf_entries(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_nerfEntries(self.raw.as_ptr(), count) }
}
pub fn detailed_light_entries_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_detailedLightEntries_count(self.raw.as_ptr()) }
}
pub fn detailed_light_entries(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, DetailedLightData>> {
if index >= self.detailed_light_entries_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(DetailedLightData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_detailedLightEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn detailed_light_entries_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, DetailedLightData>> {
if index >= self.detailed_light_entries_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(DetailedLightData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_detailedLightEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn detailed_light_entries_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, DetailedLightData>> {
(0..self.detailed_light_entries_len())
.map(move |i| self.detailed_light_entries(i).expect("index below len"))
}
pub fn resize_detailed_light_entries(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_detailedLightEntries(self.raw.as_ptr(), count) }
}
pub fn debug_occlusion_entries_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_debugOcclusionEntries_count(self.raw.as_ptr()) }
}
pub fn debug_occlusion_entries(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, DebugOcclusionData>> {
if index >= self.debug_occlusion_entries_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(DebugOcclusionData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_debugOcclusionEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn debug_occlusion_entries_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, DebugOcclusionData>> {
if index >= self.debug_occlusion_entries_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(DebugOcclusionData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_debugOcclusionEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn debug_occlusion_entries_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, DebugOcclusionData>> {
(0..self.debug_occlusion_entries_len())
.map(move |i| self.debug_occlusion_entries(i).expect("index below len"))
}
pub fn resize_debug_occlusion_entries(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_debugOcclusionEntries(self.raw.as_ptr(), count) }
}
pub fn anim_frame_data(&self) -> &[u8] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_animFrameData_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_animFrameData_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn anim_frame_data_mut(&mut self) -> &mut [u8] {
unsafe {
let n = ffi::whiteout_m2_M2Model_get_animFrameData_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2Model_get_animFrameData_data(self.raw.as_ptr()) as *mut u8;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_anim_frame_data(&mut self, values: &[u8]) {
unsafe {
ffi::whiteout_m2_M2Model_assign_animFrameData(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_anim_frame_data(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_animFrameData(self.raw.as_ptr(), count) }
}
pub fn textured_light_entries_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2Model_get_texturedLightEntries_count(self.raw.as_ptr()) }
}
pub fn textured_light_entries(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, TexturedLightData>> {
if index >= self.textured_light_entries_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(TexturedLightData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_texturedLightEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn textured_light_entries_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, TexturedLightData>> {
if index >= self.textured_light_entries_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(TexturedLightData {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2Model_get_texturedLightEntries_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn textured_light_entries_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, TexturedLightData>> {
(0..self.textured_light_entries_len())
.map(move |i| self.textured_light_entries(i).expect("index below len"))
}
pub fn resize_textured_light_entries(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2Model_resize_texturedLightEntries(self.raw.as_ptr(), count) }
}
}
impl Default for Model {
fn default() -> Self {
Self::new()
}
}
pub struct Parser {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Parser>,
}
impl Drop for Parser {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Parser_delete(self.raw.as_ptr()) }
}
}
impl Parser {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Parser) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Parser { raw })
}
}
unsafe impl Send for Parser {}
impl core::fmt::Debug for Parser {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Parser").finish_non_exhaustive()
}
}
impl Parser {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Parser_new();
Self::from_raw(raw).expect("native Parser allocation failed")
}
}
pub fn parse_file(
&mut self,
fs: Option<&crate::interfaces::HostFileSystem>,
file_path: &str,
) -> Option<Model> {
let file_path_cstr = std::ffi::CString::new(file_path).unwrap_or_default();
unsafe {
Model::from_raw(ffi::whiteout_m2_M2Parser_parse(
self.raw.as_ptr(),
fs.map_or(core::ptr::null_mut(), |v| v.as_ptr()),
file_path_cstr.as_ptr(),
))
}
}
pub fn parse_casc_fs_buffer(&mut self, casc_fs: &[u8], buffer: &[u8]) -> Option<Model> {
unsafe {
Model::from_raw(ffi::whiteout_m2_M2Parser_parse_cascFs_buffer(
self.raw.as_ptr(),
casc_fs.as_ptr(),
casc_fs.len(),
buffer.as_ptr(),
buffer.len(),
))
}
}
pub fn has_issues(&self) -> bool {
unsafe { ffi::whiteout_m2_M2Parser_hasIssues(self.raw.as_ptr()) != 0 }
}
pub fn issues(&self) -> Vec<String> {
unsafe {
let n = ffi::whiteout_m2_M2Parser_getIssues_count(self.raw.as_ptr());
(0..n)
.map(|i| {
crate::support::take_string(ffi::whiteout_m2_M2Parser_getIssues_at(
self.raw.as_ptr(),
i,
))
})
.collect()
}
}
}
impl Default for Parser {
fn default() -> Self {
Self::new()
}
}
pub struct WriteOptions {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2WriteOptions>,
}
impl Drop for WriteOptions {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2WriteOptions_delete(self.raw.as_ptr()) }
}
}
impl WriteOptions {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2WriteOptions) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| WriteOptions { raw })
}
}
unsafe impl Send for WriteOptions {}
impl core::fmt::Debug for WriteOptions {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("WriteOptions").finish_non_exhaustive()
}
}
impl WriteOptions {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2WriteOptions_new();
Self::from_raw(raw).expect("native WriteOptions allocation failed")
}
}
pub fn m_2_version(&self) -> u32 {
unsafe { ffi::whiteout_m2_M2WriteOptions_get_m2Version(self.raw.as_ptr()) }
}
pub fn set_m_2_version(&mut self, value: u32) {
unsafe { ffi::whiteout_m2_M2WriteOptions_set_m2Version(self.raw.as_ptr(), value) }
}
pub fn emit_skeleton(&self) -> bool {
unsafe { ffi::whiteout_m2_M2WriteOptions_get_emitSkeleton(self.raw.as_ptr()) != 0 }
}
pub fn set_emit_skeleton(&mut self, value: bool) {
unsafe {
ffi::whiteout_m2_M2WriteOptions_set_emitSkeleton(
self.raw.as_ptr(),
if value { 1 } else { 0 },
)
}
}
pub fn base_stem(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_m2_M2WriteOptions_get_baseStem(
self.raw.as_ptr(),
))
}
}
pub fn set_base_stem(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_m2_M2WriteOptions_set_baseStem(self.raw.as_ptr(), value.as_ptr()) }
}
}
impl Default for WriteOptions {
fn default() -> Self {
Self::new()
}
}
pub struct SerializeResult {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2SerializeResult>,
}
impl Drop for SerializeResult {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2SerializeResult_delete(self.raw.as_ptr()) }
}
}
impl SerializeResult {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2SerializeResult) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| SerializeResult { raw })
}
}
unsafe impl Send for SerializeResult {}
impl core::fmt::Debug for SerializeResult {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("SerializeResult").finish_non_exhaustive()
}
}
impl SerializeResult {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2SerializeResult_new();
Self::from_raw(raw).expect("native SerializeResult allocation failed")
}
}
pub fn m_2_data(&self) -> &[u8] {
unsafe {
let n = ffi::whiteout_m2_M2SerializeResult_get_m2Data_count(self.raw.as_ptr());
let p = ffi::whiteout_m2_M2SerializeResult_get_m2Data_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn m_2_data_mut(&mut self) -> &mut [u8] {
unsafe {
let n = ffi::whiteout_m2_M2SerializeResult_get_m2Data_count(self.raw.as_ptr());
let p =
ffi::whiteout_m2_M2SerializeResult_get_m2Data_data(self.raw.as_ptr()) as *mut u8;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_m_2_data(&mut self, values: &[u8]) {
unsafe {
ffi::whiteout_m2_M2SerializeResult_assign_m2Data(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_m_2_data(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2SerializeResult_resize_m2Data(self.raw.as_ptr(), count) }
}
}
impl Default for SerializeResult {
fn default() -> Self {
Self::new()
}
}
pub struct Writer {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2Writer>,
}
impl Drop for Writer {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2Writer_delete(self.raw.as_ptr()) }
}
}
impl Writer {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2Writer) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Writer { raw })
}
}
unsafe impl Send for Writer {}
impl core::fmt::Debug for Writer {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Writer").finish_non_exhaustive()
}
}
impl Writer {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2Writer_new();
Self::from_raw(raw).expect("native Writer allocation failed")
}
}
pub fn write_file(
&mut self,
fs: Option<&crate::interfaces::HostFileSystem>,
file_path: &str,
model: &Model,
) {
let file_path_cstr = std::ffi::CString::new(file_path).unwrap_or_default();
unsafe {
ffi::whiteout_m2_M2Writer_write(
self.raw.as_ptr(),
fs.map_or(core::ptr::null_mut(), |v| v.as_ptr()),
file_path_cstr.as_ptr(),
model.raw.as_ptr(),
);
}
}
pub fn write_casc_fs_model(
&mut self,
casc_fs: Option<&crate::interfaces::HostCascFileSystem>,
model: &Model,
) {
unsafe {
ffi::whiteout_m2_M2Writer_write_cascFs_model(
self.raw.as_ptr(),
casc_fs.map_or(core::ptr::null_mut(), |v| v.as_ptr()),
model.raw.as_ptr(),
);
}
}
pub fn write(&mut self, model: &Model) -> Option<SerializeResult> {
unsafe {
SerializeResult::from_raw(ffi::whiteout_m2_M2Writer_write_model(
self.raw.as_ptr(),
model.raw.as_ptr(),
))
}
}
pub fn has_issues(&self) -> bool {
unsafe { ffi::whiteout_m2_M2Writer_hasIssues(self.raw.as_ptr()) != 0 }
}
pub fn issues(&self) -> Vec<String> {
unsafe {
let n = ffi::whiteout_m2_M2Writer_getIssues_count(self.raw.as_ptr());
(0..n)
.map(|i| {
crate::support::take_string(ffi::whiteout_m2_M2Writer_getIssues_at(
self.raw.as_ptr(),
i,
))
})
.collect()
}
}
}
impl Default for Writer {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackVector3f {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackVector3f>,
}
impl Drop for AnimationTrackVector3f {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackVector3f_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackVector3f {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(
raw: *mut ffi::whiteout_M2AnimationTrackVector3f,
) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackVector3f { raw })
}
}
unsafe impl Send for AnimationTrackVector3f {}
impl core::fmt::Debug for AnimationTrackVector3f {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackVector3f")
.finish_non_exhaustive()
}
}
impl AnimationTrackVector3f {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackVector3f_new();
Self::from_raw(raw).expect("native AnimationTrackVector3f allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_get_interpolationType(self.raw.as_ptr())
}
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2AnimationTrackVector3f_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackVector3f_get_timestamps_count(self.raw.as_ptr()) }
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackVector3f_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackVector3f_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackVector3f_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackVector3f_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_resize_timestamps(self.raw.as_ptr(), count)
}
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackVector3f_get_values_count(self.raw.as_ptr()) }
}
pub fn values(&self, outer: usize) -> &[crate::math::Vector3f] {
if outer >= self.values_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackVector3f_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackVector3f_get_values_inner_data(
self.raw.as_ptr(),
outer,
) as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self, outer: usize) -> &mut [crate::math::Vector3f] {
if outer >= self.values_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackVector3f_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackVector3f_get_values_inner_data(
self.raw.as_ptr(),
outer,
) as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, outer: usize, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_assign_values_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackVector3f_resize_values(self.raw.as_ptr(), count) }
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackVector3f_resize_values_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackVector3f {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackM2CompatQuaternion {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackM2CompatQuaternion>,
}
impl Drop for AnimationTrackM2CompatQuaternion {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackM2CompatQuaternion {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(
raw: *mut ffi::whiteout_M2AnimationTrackM2CompatQuaternion,
) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackM2CompatQuaternion { raw })
}
}
unsafe impl Send for AnimationTrackM2CompatQuaternion {}
impl core::fmt::Debug for AnimationTrackM2CompatQuaternion {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackM2CompatQuaternion")
.finish_non_exhaustive()
}
}
impl AnimationTrackM2CompatQuaternion {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_new();
Self::from_raw(raw).expect("native AnimationTrackM2CompatQuaternion allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_interpolationType(
self.raw.as_ptr(),
)
}
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_globalSequenceId(
self.raw.as_ptr(),
)
}
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_set_globalSequenceId(
self.raw.as_ptr(),
value,
)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_count(
self.raw.as_ptr(),
)
}
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_timestamps(
self.raw.as_ptr(),
count,
)
}
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_count(self.raw.as_ptr())
}
}
pub fn values_inner_len(&self, outer: usize) -> usize {
if outer >= self.values_len() {
return 0;
}
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_inner_count(
self.raw.as_ptr(),
outer,
)
}
}
pub fn values(
&self,
outer: usize,
inner: usize,
) -> Option<crate::support::Ref<'_, CompatQuaternion>> {
if inner >= self.values_inner_len(outer) {
return None;
}
unsafe {
Some(crate::support::Ref::new(CompatQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_at(
self.raw.as_ptr(),
outer,
inner,
),
),
}))
}
}
pub fn values_mut(
&mut self,
outer: usize,
inner: usize,
) -> Option<crate::support::RefMut<'_, CompatQuaternion>> {
if inner >= self.values_inner_len(outer) {
return None;
}
unsafe {
Some(crate::support::RefMut::new(CompatQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_at(
self.raw.as_ptr(),
outer,
inner,
),
),
}))
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_values(
self.raw.as_ptr(),
count,
)
}
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_values_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackM2CompatQuaternion {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackI16 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackI16>,
}
impl Drop for AnimationTrackI16 {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackI16 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2AnimationTrackI16) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackI16 { raw })
}
}
unsafe impl Send for AnimationTrackI16 {}
impl core::fmt::Debug for AnimationTrackI16 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackI16").finish_non_exhaustive()
}
}
impl AnimationTrackI16 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackI16_new();
Self::from_raw(raw).expect("native AnimationTrackI16 allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_get_interpolationType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackI16_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackI16_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_get_timestamps_count(self.raw.as_ptr()) }
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackI16_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackI16_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackI16_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackI16_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackI16_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackI16_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_get_values_count(self.raw.as_ptr()) }
}
pub fn values(&self, outer: usize) -> &[i16] {
if outer >= self.values_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackI16_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackI16_get_values_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self, outer: usize) -> &mut [i16] {
if outer >= self.values_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackI16_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackI16_get_values_inner_data(
self.raw.as_ptr(),
outer,
) as *mut i16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, outer: usize, values: &[i16]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackI16_assign_values_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackI16_resize_values(self.raw.as_ptr(), count) }
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackI16_resize_values_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackI16 {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackF32 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackF32>,
}
impl Drop for AnimationTrackF32 {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackF32 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2AnimationTrackF32) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackF32 { raw })
}
}
unsafe impl Send for AnimationTrackF32 {}
impl core::fmt::Debug for AnimationTrackF32 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackF32").finish_non_exhaustive()
}
}
impl AnimationTrackF32 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackF32_new();
Self::from_raw(raw).expect("native AnimationTrackF32 allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_get_interpolationType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackF32_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackF32_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_get_timestamps_count(self.raw.as_ptr()) }
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackF32_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackF32_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackF32_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackF32_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackF32_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackF32_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_get_values_count(self.raw.as_ptr()) }
}
pub fn values(&self, outer: usize) -> &[f32] {
if outer >= self.values_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackF32_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackF32_get_values_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self, outer: usize) -> &mut [f32] {
if outer >= self.values_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackF32_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackF32_get_values_inner_data(
self.raw.as_ptr(),
outer,
) as *mut f32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, outer: usize, values: &[f32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackF32_assign_values_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackF32_resize_values(self.raw.as_ptr(), count) }
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackF32_resize_values_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackF32 {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackU8 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackU8>,
}
impl Drop for AnimationTrackU8 {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackU8 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2AnimationTrackU8) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackU8 { raw })
}
}
unsafe impl Send for AnimationTrackU8 {}
impl core::fmt::Debug for AnimationTrackU8 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackU8").finish_non_exhaustive()
}
}
impl AnimationTrackU8 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackU8_new();
Self::from_raw(raw).expect("native AnimationTrackU8 allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_get_interpolationType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU8_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU8_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_get_timestamps_count(self.raw.as_ptr()) }
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU8_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackU8_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU8_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackU8_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU8_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU8_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_get_values_count(self.raw.as_ptr()) }
}
pub fn values(&self, outer: usize) -> &[u8] {
if outer >= self.values_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU8_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p =
ffi::whiteout_m2_M2AnimationTrackU8_get_values_inner_data(self.raw.as_ptr(), outer);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self, outer: usize) -> &mut [u8] {
if outer >= self.values_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU8_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p =
ffi::whiteout_m2_M2AnimationTrackU8_get_values_inner_data(self.raw.as_ptr(), outer)
as *mut u8;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, outer: usize, values: &[u8]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU8_assign_values_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackU8_resize_values(self.raw.as_ptr(), count) }
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU8_resize_values_inner(self.raw.as_ptr(), outer, count)
}
}
}
impl Default for AnimationTrackU8 {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackM2CameraSpline {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackM2CameraSpline>,
}
impl Drop for AnimationTrackM2CameraSpline {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackM2CameraSpline {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(
raw: *mut ffi::whiteout_M2AnimationTrackM2CameraSpline,
) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackM2CameraSpline { raw })
}
}
unsafe impl Send for AnimationTrackM2CameraSpline {}
impl core::fmt::Debug for AnimationTrackM2CameraSpline {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackM2CameraSpline")
.finish_non_exhaustive()
}
}
impl AnimationTrackM2CameraSpline {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_new();
Self::from_raw(raw).expect("native AnimationTrackM2CameraSpline allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_interpolationType(self.raw.as_ptr())
}
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_globalSequenceId(self.raw.as_ptr())
}
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_set_globalSequenceId(
self.raw.as_ptr(),
value,
)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_count(self.raw.as_ptr())
}
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_resize_timestamps(
self.raw.as_ptr(),
count,
)
}
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_count(self.raw.as_ptr())
}
}
pub fn values_inner_len(&self, outer: usize) -> usize {
if outer >= self.values_len() {
return 0;
}
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_inner_count(
self.raw.as_ptr(),
outer,
)
}
}
pub fn values(
&self,
outer: usize,
inner: usize,
) -> Option<crate::support::Ref<'_, CameraSpline>> {
if inner >= self.values_inner_len(outer) {
return None;
}
unsafe {
Some(crate::support::Ref::new(CameraSpline {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_at(
self.raw.as_ptr(),
outer,
inner,
),
),
}))
}
}
pub fn values_mut(
&mut self,
outer: usize,
inner: usize,
) -> Option<crate::support::RefMut<'_, CameraSpline>> {
if inner >= self.values_inner_len(outer) {
return None;
}
unsafe {
Some(crate::support::RefMut::new(CameraSpline {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_at(
self.raw.as_ptr(),
outer,
inner,
),
),
}))
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_resize_values(self.raw.as_ptr(), count)
}
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackM2CameraSpline_resize_values_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackM2CameraSpline {
fn default() -> Self {
Self::new()
}
}
pub struct AnimationTrackU16 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2AnimationTrackU16>,
}
impl Drop for AnimationTrackU16 {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_delete(self.raw.as_ptr()) }
}
}
impl AnimationTrackU16 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_M2AnimationTrackU16) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| AnimationTrackU16 { raw })
}
}
unsafe impl Send for AnimationTrackU16 {}
impl core::fmt::Debug for AnimationTrackU16 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("AnimationTrackU16").finish_non_exhaustive()
}
}
impl AnimationTrackU16 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2AnimationTrackU16_new();
Self::from_raw(raw).expect("native AnimationTrackU16 allocation failed")
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_get_interpolationType(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_interpolation_type(&mut self, value: InterpolationType) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU16_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u16 {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u16) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU16_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn timestamps_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_get_timestamps_count(self.raw.as_ptr()) }
}
pub fn timestamps(&self, outer: usize) -> &[u32] {
if outer >= self.timestamps_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU16_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackU16_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self, outer: usize) -> &mut [u32] {
if outer >= self.timestamps_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU16_get_timestamps_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackU16_get_timestamps_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_timestamps(&mut self, outer: usize, values: &[u32]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU16_assign_timestamps_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn resize_timestamps_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU16_resize_timestamps_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
pub fn values_len(&self) -> usize {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_get_values_count(self.raw.as_ptr()) }
}
pub fn values(&self, outer: usize) -> &[u16] {
if outer >= self.values_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU16_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackU16_get_values_inner_data(
self.raw.as_ptr(),
outer,
);
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self, outer: usize) -> &mut [u16] {
if outer >= self.values_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_m2_M2AnimationTrackU16_get_values_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_m2_M2AnimationTrackU16_get_values_inner_data(
self.raw.as_ptr(),
outer,
) as *mut u16;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, outer: usize, values: &[u16]) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU16_assign_values_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe { ffi::whiteout_m2_M2AnimationTrackU16_resize_values(self.raw.as_ptr(), count) }
}
pub fn resize_values_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_m2_M2AnimationTrackU16_resize_values_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for AnimationTrackU16 {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleAnimationTrackVector3f {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ParticleAnimationTrackVector3f>,
}
impl Drop for ParticleAnimationTrackVector3f {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_delete(self.raw.as_ptr()) }
}
}
impl ParticleAnimationTrackVector3f {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(
raw: *mut ffi::whiteout_M2ParticleAnimationTrackVector3f,
) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ParticleAnimationTrackVector3f { raw })
}
}
unsafe impl Send for ParticleAnimationTrackVector3f {}
impl core::fmt::Debug for ParticleAnimationTrackVector3f {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ParticleAnimationTrackVector3f")
.finish_non_exhaustive()
}
}
impl ParticleAnimationTrackVector3f {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_new();
Self::from_raw(raw).expect("native ParticleAnimationTrackVector3f allocation failed")
}
}
pub fn values(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_get_values_count(
self.raw.as_ptr(),
);
let p = ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_get_values_data(
self.raw.as_ptr(),
) as *const crate::math::Vector3f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_get_values_count(
self.raw.as_ptr(),
);
let p = ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_get_values_data(
self.raw.as_ptr(),
) as *const crate::math::Vector3f as *mut crate::math::Vector3f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_assign_values(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2ParticleAnimationTrackVector3f_resize_values(
self.raw.as_ptr(),
count,
)
}
}
}
impl Default for ParticleAnimationTrackVector3f {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleAnimationTrackVector2f {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_M2ParticleAnimationTrackVector2f>,
}
impl Drop for ParticleAnimationTrackVector2f {
fn drop(&mut self) {
unsafe { ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_delete(self.raw.as_ptr()) }
}
}
impl ParticleAnimationTrackVector2f {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(
raw: *mut ffi::whiteout_M2ParticleAnimationTrackVector2f,
) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ParticleAnimationTrackVector2f { raw })
}
}
unsafe impl Send for ParticleAnimationTrackVector2f {}
impl core::fmt::Debug for ParticleAnimationTrackVector2f {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ParticleAnimationTrackVector2f")
.finish_non_exhaustive()
}
}
impl ParticleAnimationTrackVector2f {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_new();
Self::from_raw(raw).expect("native ParticleAnimationTrackVector2f allocation failed")
}
}
pub fn values(&self) -> &[crate::math::Vector2f] {
unsafe {
let n = ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_get_values_count(
self.raw.as_ptr(),
);
let p = ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_get_values_data(
self.raw.as_ptr(),
) as *const crate::math::Vector2f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn values_mut(&mut self) -> &mut [crate::math::Vector2f] {
unsafe {
let n = ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_get_values_count(
self.raw.as_ptr(),
);
let p = ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_get_values_data(
self.raw.as_ptr(),
) as *const crate::math::Vector2f as *mut crate::math::Vector2f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_values(&mut self, values: &[crate::math::Vector2f]) {
unsafe {
ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_assign_values(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_values(&mut self, count: usize) {
unsafe {
ffi::whiteout_m2_M2ParticleAnimationTrackVector2f_resize_values(
self.raw.as_ptr(),
count,
)
}
}
}
impl Default for ParticleAnimationTrackVector2f {
fn default() -> Self {
Self::new()
}
}
#[doc(hidden)]
pub mod ffi {
#![allow(missing_debug_implementations)]
#[allow(unused_imports)]
use crate::support::{RawBytes, RawCString};
#[repr(C)]
pub struct whiteout_M2CompatQuaternion {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ColorBGRA {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Extent {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackBase {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ParticleEmitterExtension {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2LodProfile {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2WaterfallData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ParticleGeosetData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2EdgeFadeData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2DistanceFadeData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2DetailedLightData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2DebugOcclusionData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2TexturedLightData {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2PhysicsCollision {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2SkinSection {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Batch {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ShadowBatch {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2SkinProfile {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2GlobalFlags {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2GlobalSequence {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Sequence {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Vertex {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Bone {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Texture {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Material {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2TextureWeight {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2TextureTransform {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ColorAnimation {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Light {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2CameraSpline {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Camera {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Attachment {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2RibbonEmitter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Box {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ParticleEmitter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Event {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Model {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Parser {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2WriteOptions {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2SerializeResult {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2Writer {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackVector3f {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackM2CompatQuaternion {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackI16 {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackF32 {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackU8 {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackM2CameraSpline {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2AnimationTrackU16 {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ParticleAnimationTrackVector3f {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_M2ParticleAnimationTrackVector2f {
_private: [u8; 0],
}
extern "C" {
pub fn whiteout_m2_M2CompatQuaternion_new() -> *mut whiteout_M2CompatQuaternion;
pub fn whiteout_m2_M2CompatQuaternion_delete(self_: *mut whiteout_M2CompatQuaternion);
pub fn whiteout_m2_M2ColorBGRA_new() -> *mut whiteout_M2ColorBGRA;
pub fn whiteout_m2_M2ColorBGRA_delete(self_: *mut whiteout_M2ColorBGRA);
pub fn whiteout_m2_M2Extent_new() -> *mut whiteout_M2Extent;
pub fn whiteout_m2_M2Extent_delete(self_: *mut whiteout_M2Extent);
pub fn whiteout_m2_M2Extent_get_minimum(
self_: *mut whiteout_M2Extent,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Extent_set_minimum(
self_: *mut whiteout_M2Extent,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Extent_get_maximum(
self_: *mut whiteout_M2Extent,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Extent_set_maximum(
self_: *mut whiteout_M2Extent,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Extent_get_sphereRadius(self_: *mut whiteout_M2Extent) -> f32;
pub fn whiteout_m2_M2Extent_set_sphereRadius(self_: *mut whiteout_M2Extent, value: f32);
pub fn whiteout_m2_M2AnimationTrackBase_new() -> *mut whiteout_M2AnimationTrackBase;
pub fn whiteout_m2_M2AnimationTrackBase_delete(self_: *mut whiteout_M2AnimationTrackBase);
pub fn whiteout_m2_M2AnimationTrackBase_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackBase,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackBase_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackBase,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackBase_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackBase,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackBase_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackBase,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackBase_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackBase,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackBase_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackBase,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackBase_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackBase,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackBase_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackBase,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackBase_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackBase,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackBase_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackBase,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2ParticleEmitterExtension_new(
) -> *mut whiteout_M2ParticleEmitterExtension;
pub fn whiteout_m2_M2ParticleEmitterExtension_delete(
self_: *mut whiteout_M2ParticleEmitterExtension,
);
pub fn whiteout_m2_M2ParticleEmitterExtension_get_zSource(
self_: *mut whiteout_M2ParticleEmitterExtension,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitterExtension_set_zSource(
self_: *mut whiteout_M2ParticleEmitterExtension,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitterExtension_get_colorMult(
self_: *mut whiteout_M2ParticleEmitterExtension,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitterExtension_set_colorMult(
self_: *mut whiteout_M2ParticleEmitterExtension,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitterExtension_get_alphaMult(
self_: *mut whiteout_M2ParticleEmitterExtension,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitterExtension_set_alphaMult(
self_: *mut whiteout_M2ParticleEmitterExtension,
value: f32,
);
pub fn whiteout_m2_M2LodProfile_new() -> *mut whiteout_M2LodProfile;
pub fn whiteout_m2_M2LodProfile_delete(self_: *mut whiteout_M2LodProfile);
pub fn whiteout_m2_M2LodProfile_get_flags(self_: *mut whiteout_M2LodProfile) -> u16;
pub fn whiteout_m2_M2LodProfile_set_flags(self_: *mut whiteout_M2LodProfile, value: u16);
pub fn whiteout_m2_M2LodProfile_get_numLodLevels(self_: *mut whiteout_M2LodProfile) -> u16;
pub fn whiteout_m2_M2LodProfile_set_numLodLevels(
self_: *mut whiteout_M2LodProfile,
value: u16,
);
pub fn whiteout_m2_M2LodProfile_get_lodDistance(self_: *mut whiteout_M2LodProfile) -> f32;
pub fn whiteout_m2_M2LodProfile_set_lodDistance(
self_: *mut whiteout_M2LodProfile,
value: f32,
);
pub fn whiteout_m2_M2LodProfile_particleBoneLod_size() -> usize;
pub fn whiteout_m2_M2LodProfile_get_particleBoneLod_at(
self_: *mut whiteout_M2LodProfile,
index: usize,
) -> u8;
pub fn whiteout_m2_M2LodProfile_set_particleBoneLod_at(
self_: *mut whiteout_M2LodProfile,
index: usize,
value: u8,
);
pub fn whiteout_m2_M2LodProfile_get_reserved0(self_: *mut whiteout_M2LodProfile) -> u8;
pub fn whiteout_m2_M2LodProfile_set_reserved0(self_: *mut whiteout_M2LodProfile, value: u8);
pub fn whiteout_m2_M2LodProfile_get_lodFlags(self_: *mut whiteout_M2LodProfile) -> u8;
pub fn whiteout_m2_M2LodProfile_set_lodFlags(self_: *mut whiteout_M2LodProfile, value: u8);
pub fn whiteout_m2_M2LodProfile_get_lodBatchCount(self_: *mut whiteout_M2LodProfile) -> u8;
pub fn whiteout_m2_M2LodProfile_set_lodBatchCount(
self_: *mut whiteout_M2LodProfile,
value: u8,
);
pub fn whiteout_m2_M2LodProfile_get_reserved1(self_: *mut whiteout_M2LodProfile) -> u8;
pub fn whiteout_m2_M2LodProfile_set_reserved1(self_: *mut whiteout_M2LodProfile, value: u8);
pub fn whiteout_m2_M2WaterfallData_new() -> *mut whiteout_M2WaterfallData;
pub fn whiteout_m2_M2WaterfallData_delete(self_: *mut whiteout_M2WaterfallData);
pub fn whiteout_m2_M2WaterfallData_get_bumpScale(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_bumpScale(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value0_x(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value0_x(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value0_y(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value0_y(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value0_z(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value0_z(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value1_w(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value1_w(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value0_w(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value0_w(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value1_x(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value1_x(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value1_y(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value1_y(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value2_w(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value2_w(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value3_y(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value3_y(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value3_x(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value3_x(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_baseColor(
self_: *mut whiteout_M2WaterfallData,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2WaterfallData_set_baseColor(
self_: *mut whiteout_M2WaterfallData,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2WaterfallData_get_flags(self_: *mut whiteout_M2WaterfallData) -> u16;
pub fn whiteout_m2_M2WaterfallData_set_flags(
self_: *mut whiteout_M2WaterfallData,
value: u16,
);
pub fn whiteout_m2_M2WaterfallData_get_unknown0(
self_: *mut whiteout_M2WaterfallData,
) -> u16;
pub fn whiteout_m2_M2WaterfallData_set_unknown0(
self_: *mut whiteout_M2WaterfallData,
value: u16,
);
pub fn whiteout_m2_M2WaterfallData_get_value3_w(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value3_w(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value3_z(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value3_z(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_value4_y(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_value4_y(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_unknown1(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_unknown1(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_unknown2(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_unknown2(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_unknown3(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_unknown3(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2WaterfallData_get_unknown4(
self_: *mut whiteout_M2WaterfallData,
) -> f32;
pub fn whiteout_m2_M2WaterfallData_set_unknown4(
self_: *mut whiteout_M2WaterfallData,
value: f32,
);
pub fn whiteout_m2_M2ParticleGeosetData_new() -> *mut whiteout_M2ParticleGeosetData;
pub fn whiteout_m2_M2ParticleGeosetData_delete(self_: *mut whiteout_M2ParticleGeosetData);
pub fn whiteout_m2_M2ParticleGeosetData_get_geoset(
self_: *mut whiteout_M2ParticleGeosetData,
) -> u16;
pub fn whiteout_m2_M2ParticleGeosetData_set_geoset(
self_: *mut whiteout_M2ParticleGeosetData,
value: u16,
);
pub fn whiteout_m2_M2EdgeFadeData_new() -> *mut whiteout_M2EdgeFadeData;
pub fn whiteout_m2_M2EdgeFadeData_delete(self_: *mut whiteout_M2EdgeFadeData);
pub fn whiteout_m2_M2EdgeFadeData_value0_size() -> usize;
pub fn whiteout_m2_M2EdgeFadeData_get_value0_at(
self_: *mut whiteout_M2EdgeFadeData,
index: usize,
) -> f32;
pub fn whiteout_m2_M2EdgeFadeData_set_value0_at(
self_: *mut whiteout_M2EdgeFadeData,
index: usize,
value: f32,
);
pub fn whiteout_m2_M2EdgeFadeData_get_value8(self_: *mut whiteout_M2EdgeFadeData) -> f32;
pub fn whiteout_m2_M2EdgeFadeData_set_value8(
self_: *mut whiteout_M2EdgeFadeData,
value: f32,
);
pub fn whiteout_m2_M2EdgeFadeData_valueC_size() -> usize;
pub fn whiteout_m2_M2EdgeFadeData_get_valueC_at(
self_: *mut whiteout_M2EdgeFadeData,
index: usize,
) -> u8;
pub fn whiteout_m2_M2EdgeFadeData_set_valueC_at(
self_: *mut whiteout_M2EdgeFadeData,
index: usize,
value: u8,
);
pub fn whiteout_m2_M2DistanceFadeData_new() -> *mut whiteout_M2DistanceFadeData;
pub fn whiteout_m2_M2DistanceFadeData_delete(self_: *mut whiteout_M2DistanceFadeData);
pub fn whiteout_m2_M2DistanceFadeData_get_squaredFarDist(
self_: *mut whiteout_M2DistanceFadeData,
) -> f32;
pub fn whiteout_m2_M2DistanceFadeData_set_squaredFarDist(
self_: *mut whiteout_M2DistanceFadeData,
value: f32,
);
pub fn whiteout_m2_M2DistanceFadeData_get_squaredNearDist(
self_: *mut whiteout_M2DistanceFadeData,
) -> f32;
pub fn whiteout_m2_M2DistanceFadeData_set_squaredNearDist(
self_: *mut whiteout_M2DistanceFadeData,
value: f32,
);
pub fn whiteout_m2_M2DistanceFadeData_reserved_size() -> usize;
pub fn whiteout_m2_M2DistanceFadeData_get_reserved_at(
self_: *mut whiteout_M2DistanceFadeData,
index: usize,
) -> u32;
pub fn whiteout_m2_M2DistanceFadeData_set_reserved_at(
self_: *mut whiteout_M2DistanceFadeData,
index: usize,
value: u32,
);
pub fn whiteout_m2_M2DetailedLightData_new() -> *mut whiteout_M2DetailedLightData;
pub fn whiteout_m2_M2DetailedLightData_delete(self_: *mut whiteout_M2DetailedLightData);
pub fn whiteout_m2_M2DetailedLightData_get_flags(
self_: *mut whiteout_M2DetailedLightData,
) -> u16;
pub fn whiteout_m2_M2DetailedLightData_set_flags(
self_: *mut whiteout_M2DetailedLightData,
value: u16,
);
pub fn whiteout_m2_M2DetailedLightData_get_unknown0(
self_: *mut whiteout_M2DetailedLightData,
) -> u16;
pub fn whiteout_m2_M2DetailedLightData_set_unknown0(
self_: *mut whiteout_M2DetailedLightData,
value: u16,
);
pub fn whiteout_m2_M2DetailedLightData_get_unknown1(
self_: *mut whiteout_M2DetailedLightData,
) -> u32;
pub fn whiteout_m2_M2DetailedLightData_set_unknown1(
self_: *mut whiteout_M2DetailedLightData,
value: u32,
);
pub fn whiteout_m2_M2DebugOcclusionData_new() -> *mut whiteout_M2DebugOcclusionData;
pub fn whiteout_m2_M2DebugOcclusionData_delete(self_: *mut whiteout_M2DebugOcclusionData);
pub fn whiteout_m2_M2DebugOcclusionData_get_unknown1_1(
self_: *mut whiteout_M2DebugOcclusionData,
) -> f32;
pub fn whiteout_m2_M2DebugOcclusionData_set_unknown1_1(
self_: *mut whiteout_M2DebugOcclusionData,
value: f32,
);
pub fn whiteout_m2_M2DebugOcclusionData_get_unknown1_2(
self_: *mut whiteout_M2DebugOcclusionData,
) -> f32;
pub fn whiteout_m2_M2DebugOcclusionData_set_unknown1_2(
self_: *mut whiteout_M2DebugOcclusionData,
value: f32,
);
pub fn whiteout_m2_M2DebugOcclusionData_get_unknown1_3(
self_: *mut whiteout_M2DebugOcclusionData,
) -> u32;
pub fn whiteout_m2_M2DebugOcclusionData_set_unknown1_3(
self_: *mut whiteout_M2DebugOcclusionData,
value: u32,
);
pub fn whiteout_m2_M2DebugOcclusionData_get_unknown1_4(
self_: *mut whiteout_M2DebugOcclusionData,
) -> u32;
pub fn whiteout_m2_M2DebugOcclusionData_set_unknown1_4(
self_: *mut whiteout_M2DebugOcclusionData,
value: u32,
);
pub fn whiteout_m2_M2TexturedLightData_new() -> *mut whiteout_M2TexturedLightData;
pub fn whiteout_m2_M2TexturedLightData_delete(self_: *mut whiteout_M2TexturedLightData);
pub fn whiteout_m2_M2TexturedLightData_get_unknown0(
self_: *mut whiteout_M2TexturedLightData,
) -> f32;
pub fn whiteout_m2_M2TexturedLightData_set_unknown0(
self_: *mut whiteout_M2TexturedLightData,
value: f32,
);
pub fn whiteout_m2_M2TexturedLightData_get_unknown1(
self_: *mut whiteout_M2TexturedLightData,
) -> f32;
pub fn whiteout_m2_M2TexturedLightData_set_unknown1(
self_: *mut whiteout_M2TexturedLightData,
value: f32,
);
pub fn whiteout_m2_M2TexturedLightData_get_textureLookup(
self_: *mut whiteout_M2TexturedLightData,
) -> i32;
pub fn whiteout_m2_M2TexturedLightData_set_textureLookup(
self_: *mut whiteout_M2TexturedLightData,
value: i32,
);
pub fn whiteout_m2_M2TexturedLightData_get_unknown2(
self_: *mut whiteout_M2TexturedLightData,
) -> i32;
pub fn whiteout_m2_M2TexturedLightData_set_unknown2(
self_: *mut whiteout_M2TexturedLightData,
value: i32,
);
pub fn whiteout_m2_M2PhysicsCollision_new() -> *mut whiteout_M2PhysicsCollision;
pub fn whiteout_m2_M2PhysicsCollision_delete(self_: *mut whiteout_M2PhysicsCollision);
pub fn whiteout_m2_M2PhysicsCollision_get_vertexPositions_count(
self_: *mut whiteout_M2PhysicsCollision,
) -> usize;
pub fn whiteout_m2_M2PhysicsCollision_resize_vertexPositions(
self_: *mut whiteout_M2PhysicsCollision,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_vertexPositions_data(
self_: *mut whiteout_M2PhysicsCollision,
) -> *const f32;
pub fn whiteout_m2_M2PhysicsCollision_assign_vertexPositions(
self_: *mut whiteout_M2PhysicsCollision,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_faceNormals_count(
self_: *mut whiteout_M2PhysicsCollision,
) -> usize;
pub fn whiteout_m2_M2PhysicsCollision_resize_faceNormals(
self_: *mut whiteout_M2PhysicsCollision,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_faceNormals_data(
self_: *mut whiteout_M2PhysicsCollision,
) -> *const f32;
pub fn whiteout_m2_M2PhysicsCollision_assign_faceNormals(
self_: *mut whiteout_M2PhysicsCollision,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_indices_count(
self_: *mut whiteout_M2PhysicsCollision,
) -> usize;
pub fn whiteout_m2_M2PhysicsCollision_resize_indices(
self_: *mut whiteout_M2PhysicsCollision,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_indices_data(
self_: *mut whiteout_M2PhysicsCollision,
) -> *const i16;
pub fn whiteout_m2_M2PhysicsCollision_assign_indices(
self_: *mut whiteout_M2PhysicsCollision,
data: *const i16,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_flags_count(
self_: *mut whiteout_M2PhysicsCollision,
) -> usize;
pub fn whiteout_m2_M2PhysicsCollision_resize_flags(
self_: *mut whiteout_M2PhysicsCollision,
count: usize,
);
pub fn whiteout_m2_M2PhysicsCollision_get_flags_data(
self_: *mut whiteout_M2PhysicsCollision,
) -> *const i16;
pub fn whiteout_m2_M2PhysicsCollision_assign_flags(
self_: *mut whiteout_M2PhysicsCollision,
data: *const i16,
count: usize,
);
pub fn whiteout_m2_M2SkinSection_new() -> *mut whiteout_M2SkinSection;
pub fn whiteout_m2_M2SkinSection_delete(self_: *mut whiteout_M2SkinSection);
pub fn whiteout_m2_M2SkinSection_get_skinSectionId(
self_: *mut whiteout_M2SkinSection,
) -> u16;
pub fn whiteout_m2_M2SkinSection_set_skinSectionId(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_level(self_: *mut whiteout_M2SkinSection) -> u16;
pub fn whiteout_m2_M2SkinSection_set_level(self_: *mut whiteout_M2SkinSection, value: u16);
pub fn whiteout_m2_M2SkinSection_get_vertexStart(self_: *mut whiteout_M2SkinSection)
-> u16;
pub fn whiteout_m2_M2SkinSection_set_vertexStart(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_vertexCount(self_: *mut whiteout_M2SkinSection)
-> u16;
pub fn whiteout_m2_M2SkinSection_set_vertexCount(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_indexStart(self_: *mut whiteout_M2SkinSection) -> u16;
pub fn whiteout_m2_M2SkinSection_set_indexStart(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_indexCount(self_: *mut whiteout_M2SkinSection) -> u16;
pub fn whiteout_m2_M2SkinSection_set_indexCount(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_boneCount(self_: *mut whiteout_M2SkinSection) -> u16;
pub fn whiteout_m2_M2SkinSection_set_boneCount(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_boneComboIndex(
self_: *mut whiteout_M2SkinSection,
) -> u16;
pub fn whiteout_m2_M2SkinSection_set_boneComboIndex(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_boneInfluences(
self_: *mut whiteout_M2SkinSection,
) -> u16;
pub fn whiteout_m2_M2SkinSection_set_boneInfluences(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_centerBoneIndex(
self_: *mut whiteout_M2SkinSection,
) -> u16;
pub fn whiteout_m2_M2SkinSection_set_centerBoneIndex(
self_: *mut whiteout_M2SkinSection,
value: u16,
);
pub fn whiteout_m2_M2SkinSection_get_centerPosition(
self_: *mut whiteout_M2SkinSection,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2SkinSection_set_centerPosition(
self_: *mut whiteout_M2SkinSection,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2SkinSection_get_sortCenterPosition(
self_: *mut whiteout_M2SkinSection,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2SkinSection_set_sortCenterPosition(
self_: *mut whiteout_M2SkinSection,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2SkinSection_get_sortRadius(self_: *mut whiteout_M2SkinSection) -> f32;
pub fn whiteout_m2_M2SkinSection_set_sortRadius(
self_: *mut whiteout_M2SkinSection,
value: f32,
);
pub fn whiteout_m2_M2Batch_new() -> *mut whiteout_M2Batch;
pub fn whiteout_m2_M2Batch_delete(self_: *mut whiteout_M2Batch);
pub fn whiteout_m2_M2Batch_get_flags(self_: *mut whiteout_M2Batch) -> u8;
pub fn whiteout_m2_M2Batch_set_flags(self_: *mut whiteout_M2Batch, value: u8);
pub fn whiteout_m2_M2Batch_get_priorityPlane(self_: *mut whiteout_M2Batch) -> i8;
pub fn whiteout_m2_M2Batch_set_priorityPlane(self_: *mut whiteout_M2Batch, value: i8);
pub fn whiteout_m2_M2Batch_get_shaderId(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_shaderId(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_skinSectionIndex(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_skinSectionIndex(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_geosetIndex(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_geosetIndex(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_colorIndex(self_: *mut whiteout_M2Batch) -> i16;
pub fn whiteout_m2_M2Batch_set_colorIndex(self_: *mut whiteout_M2Batch, value: i16);
pub fn whiteout_m2_M2Batch_get_materialIndex(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_materialIndex(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_materialLayer(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_materialLayer(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_textureCount(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_textureCount(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_textureComboIndex(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_textureComboIndex(self_: *mut whiteout_M2Batch, value: u16);
pub fn whiteout_m2_M2Batch_get_textureCoordComboIndex(self_: *mut whiteout_M2Batch) -> u16;
pub fn whiteout_m2_M2Batch_set_textureCoordComboIndex(
self_: *mut whiteout_M2Batch,
value: u16,
);
pub fn whiteout_m2_M2Batch_get_textureWeightComboIndex(self_: *mut whiteout_M2Batch)
-> u16;
pub fn whiteout_m2_M2Batch_set_textureWeightComboIndex(
self_: *mut whiteout_M2Batch,
value: u16,
);
pub fn whiteout_m2_M2Batch_get_textureTransformComboIndex(
self_: *mut whiteout_M2Batch,
) -> u16;
pub fn whiteout_m2_M2Batch_set_textureTransformComboIndex(
self_: *mut whiteout_M2Batch,
value: u16,
);
pub fn whiteout_m2_M2ShadowBatch_new() -> *mut whiteout_M2ShadowBatch;
pub fn whiteout_m2_M2ShadowBatch_delete(self_: *mut whiteout_M2ShadowBatch);
pub fn whiteout_m2_M2ShadowBatch_get_flags(self_: *mut whiteout_M2ShadowBatch) -> u8;
pub fn whiteout_m2_M2ShadowBatch_set_flags(self_: *mut whiteout_M2ShadowBatch, value: u8);
pub fn whiteout_m2_M2ShadowBatch_get_flags2(self_: *mut whiteout_M2ShadowBatch) -> u8;
pub fn whiteout_m2_M2ShadowBatch_set_flags2(self_: *mut whiteout_M2ShadowBatch, value: u8);
pub fn whiteout_m2_M2ShadowBatch_get_unknown0(self_: *mut whiteout_M2ShadowBatch) -> u16;
pub fn whiteout_m2_M2ShadowBatch_set_unknown0(
self_: *mut whiteout_M2ShadowBatch,
value: u16,
);
pub fn whiteout_m2_M2ShadowBatch_get_submeshId(self_: *mut whiteout_M2ShadowBatch) -> u16;
pub fn whiteout_m2_M2ShadowBatch_set_submeshId(
self_: *mut whiteout_M2ShadowBatch,
value: u16,
);
pub fn whiteout_m2_M2ShadowBatch_get_textureId(self_: *mut whiteout_M2ShadowBatch) -> u16;
pub fn whiteout_m2_M2ShadowBatch_set_textureId(
self_: *mut whiteout_M2ShadowBatch,
value: u16,
);
pub fn whiteout_m2_M2ShadowBatch_get_colorId(self_: *mut whiteout_M2ShadowBatch) -> u16;
pub fn whiteout_m2_M2ShadowBatch_set_colorId(
self_: *mut whiteout_M2ShadowBatch,
value: u16,
);
pub fn whiteout_m2_M2ShadowBatch_get_transparencyId(
self_: *mut whiteout_M2ShadowBatch,
) -> u16;
pub fn whiteout_m2_M2ShadowBatch_set_transparencyId(
self_: *mut whiteout_M2ShadowBatch,
value: u16,
);
pub fn whiteout_m2_M2SkinProfile_new() -> *mut whiteout_M2SkinProfile;
pub fn whiteout_m2_M2SkinProfile_delete(self_: *mut whiteout_M2SkinProfile);
pub fn whiteout_m2_M2SkinProfile_get_vertices_count(
self_: *mut whiteout_M2SkinProfile,
) -> usize;
pub fn whiteout_m2_M2SkinProfile_resize_vertices(
self_: *mut whiteout_M2SkinProfile,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_vertices_data(
self_: *mut whiteout_M2SkinProfile,
) -> *const u16;
pub fn whiteout_m2_M2SkinProfile_assign_vertices(
self_: *mut whiteout_M2SkinProfile,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_indices_count(
self_: *mut whiteout_M2SkinProfile,
) -> usize;
pub fn whiteout_m2_M2SkinProfile_resize_indices(
self_: *mut whiteout_M2SkinProfile,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_indices_data(
self_: *mut whiteout_M2SkinProfile,
) -> *const u16;
pub fn whiteout_m2_M2SkinProfile_assign_indices(
self_: *mut whiteout_M2SkinProfile,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_submeshes_count(
self_: *mut whiteout_M2SkinProfile,
) -> usize;
pub fn whiteout_m2_M2SkinProfile_resize_submeshes(
self_: *mut whiteout_M2SkinProfile,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_submeshes_at(
self_: *mut whiteout_M2SkinProfile,
index: usize,
) -> *mut whiteout_M2SkinSection;
pub fn whiteout_m2_M2SkinProfile_get_batches_count(
self_: *mut whiteout_M2SkinProfile,
) -> usize;
pub fn whiteout_m2_M2SkinProfile_resize_batches(
self_: *mut whiteout_M2SkinProfile,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_batches_at(
self_: *mut whiteout_M2SkinProfile,
index: usize,
) -> *mut whiteout_M2Batch;
pub fn whiteout_m2_M2SkinProfile_get_lodVertexBase(
self_: *mut whiteout_M2SkinProfile,
) -> u32;
pub fn whiteout_m2_M2SkinProfile_set_lodVertexBase(
self_: *mut whiteout_M2SkinProfile,
value: u32,
);
pub fn whiteout_m2_M2SkinProfile_get_shadowBatches_count(
self_: *mut whiteout_M2SkinProfile,
) -> usize;
pub fn whiteout_m2_M2SkinProfile_resize_shadowBatches(
self_: *mut whiteout_M2SkinProfile,
count: usize,
);
pub fn whiteout_m2_M2SkinProfile_get_shadowBatches_at(
self_: *mut whiteout_M2SkinProfile,
index: usize,
) -> *mut whiteout_M2ShadowBatch;
pub fn whiteout_m2_M2GlobalFlags_new() -> *mut whiteout_M2GlobalFlags;
pub fn whiteout_m2_M2GlobalFlags_delete(self_: *mut whiteout_M2GlobalFlags);
pub fn whiteout_m2_M2GlobalFlags_get_value(self_: *mut whiteout_M2GlobalFlags) -> i32;
pub fn whiteout_m2_M2GlobalFlags_set_value(self_: *mut whiteout_M2GlobalFlags, value: i32);
pub fn whiteout_m2_M2GlobalSequence_new() -> *mut whiteout_M2GlobalSequence;
pub fn whiteout_m2_M2GlobalSequence_delete(self_: *mut whiteout_M2GlobalSequence);
pub fn whiteout_m2_M2GlobalSequence_get_timestamp(
self_: *mut whiteout_M2GlobalSequence,
) -> u32;
pub fn whiteout_m2_M2GlobalSequence_set_timestamp(
self_: *mut whiteout_M2GlobalSequence,
value: u32,
);
pub fn whiteout_m2_M2Sequence_new() -> *mut whiteout_M2Sequence;
pub fn whiteout_m2_M2Sequence_delete(self_: *mut whiteout_M2Sequence);
pub fn whiteout_m2_M2Sequence_get_id(self_: *mut whiteout_M2Sequence) -> u16;
pub fn whiteout_m2_M2Sequence_set_id(self_: *mut whiteout_M2Sequence, value: u16);
pub fn whiteout_m2_M2Sequence_get_variationIndex(self_: *mut whiteout_M2Sequence) -> u16;
pub fn whiteout_m2_M2Sequence_set_variationIndex(
self_: *mut whiteout_M2Sequence,
value: u16,
);
pub fn whiteout_m2_M2Sequence_get_duration(self_: *mut whiteout_M2Sequence) -> u32;
pub fn whiteout_m2_M2Sequence_set_duration(self_: *mut whiteout_M2Sequence, value: u32);
pub fn whiteout_m2_M2Sequence_get_movespeed(self_: *mut whiteout_M2Sequence) -> f32;
pub fn whiteout_m2_M2Sequence_set_movespeed(self_: *mut whiteout_M2Sequence, value: f32);
pub fn whiteout_m2_M2Sequence_get_flags(self_: *mut whiteout_M2Sequence) -> i32;
pub fn whiteout_m2_M2Sequence_set_flags(self_: *mut whiteout_M2Sequence, value: i32);
pub fn whiteout_m2_M2Sequence_get_frequency(self_: *mut whiteout_M2Sequence) -> i16;
pub fn whiteout_m2_M2Sequence_set_frequency(self_: *mut whiteout_M2Sequence, value: i16);
pub fn whiteout_m2_M2Sequence_get_padding(self_: *mut whiteout_M2Sequence) -> u16;
pub fn whiteout_m2_M2Sequence_set_padding(self_: *mut whiteout_M2Sequence, value: u16);
pub fn whiteout_m2_M2Sequence_get_replayMin(self_: *mut whiteout_M2Sequence) -> u32;
pub fn whiteout_m2_M2Sequence_set_replayMin(self_: *mut whiteout_M2Sequence, value: u32);
pub fn whiteout_m2_M2Sequence_get_replayMax(self_: *mut whiteout_M2Sequence) -> u32;
pub fn whiteout_m2_M2Sequence_set_replayMax(self_: *mut whiteout_M2Sequence, value: u32);
pub fn whiteout_m2_M2Sequence_get_blendTimeIn(self_: *mut whiteout_M2Sequence) -> u16;
pub fn whiteout_m2_M2Sequence_set_blendTimeIn(self_: *mut whiteout_M2Sequence, value: u16);
pub fn whiteout_m2_M2Sequence_get_blendTimeOut(self_: *mut whiteout_M2Sequence) -> u16;
pub fn whiteout_m2_M2Sequence_set_blendTimeOut(self_: *mut whiteout_M2Sequence, value: u16);
pub fn whiteout_m2_M2Sequence_get_bounding(
self_: *mut whiteout_M2Sequence,
) -> *mut whiteout_M2Extent;
pub fn whiteout_m2_M2Sequence_set_bounding(
self_: *mut whiteout_M2Sequence,
value: *const whiteout_M2Extent,
);
pub fn whiteout_m2_M2Sequence_get_variationNext(self_: *mut whiteout_M2Sequence) -> i16;
pub fn whiteout_m2_M2Sequence_set_variationNext(
self_: *mut whiteout_M2Sequence,
value: i16,
);
pub fn whiteout_m2_M2Sequence_get_aliasNext(self_: *mut whiteout_M2Sequence) -> u16;
pub fn whiteout_m2_M2Sequence_set_aliasNext(self_: *mut whiteout_M2Sequence, value: u16);
pub fn whiteout_m2_M2Vertex_new() -> *mut whiteout_M2Vertex;
pub fn whiteout_m2_M2Vertex_delete(self_: *mut whiteout_M2Vertex);
pub fn whiteout_m2_M2Vertex_get_position(
self_: *mut whiteout_M2Vertex,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Vertex_set_position(
self_: *mut whiteout_M2Vertex,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Vertex_boneWeights_size() -> usize;
pub fn whiteout_m2_M2Vertex_get_boneWeights_at(
self_: *mut whiteout_M2Vertex,
index: usize,
) -> u8;
pub fn whiteout_m2_M2Vertex_set_boneWeights_at(
self_: *mut whiteout_M2Vertex,
index: usize,
value: u8,
);
pub fn whiteout_m2_M2Vertex_boneIndices_size() -> usize;
pub fn whiteout_m2_M2Vertex_get_boneIndices_at(
self_: *mut whiteout_M2Vertex,
index: usize,
) -> u8;
pub fn whiteout_m2_M2Vertex_set_boneIndices_at(
self_: *mut whiteout_M2Vertex,
index: usize,
value: u8,
);
pub fn whiteout_m2_M2Vertex_get_normal(
self_: *mut whiteout_M2Vertex,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Vertex_set_normal(
self_: *mut whiteout_M2Vertex,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Vertex_texCoords_size() -> usize;
pub fn whiteout_m2_M2Vertex_get_texCoords_at(
self_: *mut whiteout_M2Vertex,
index: usize,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Bone_new() -> *mut whiteout_M2Bone;
pub fn whiteout_m2_M2Bone_delete(self_: *mut whiteout_M2Bone);
pub fn whiteout_m2_M2Bone_get_keyBoneId(self_: *mut whiteout_M2Bone) -> i32;
pub fn whiteout_m2_M2Bone_set_keyBoneId(self_: *mut whiteout_M2Bone, value: i32);
pub fn whiteout_m2_M2Bone_get_flags(self_: *mut whiteout_M2Bone) -> u32;
pub fn whiteout_m2_M2Bone_set_flags(self_: *mut whiteout_M2Bone, value: u32);
pub fn whiteout_m2_M2Bone_get_parentBoneId(self_: *mut whiteout_M2Bone) -> i16;
pub fn whiteout_m2_M2Bone_set_parentBoneId(self_: *mut whiteout_M2Bone, value: i16);
pub fn whiteout_m2_M2Bone_get_submeshId(self_: *mut whiteout_M2Bone) -> u16;
pub fn whiteout_m2_M2Bone_set_submeshId(self_: *mut whiteout_M2Bone, value: u16);
pub fn whiteout_m2_M2Bone_get_boneNameCRC(self_: *mut whiteout_M2Bone) -> u32;
pub fn whiteout_m2_M2Bone_set_boneNameCRC(self_: *mut whiteout_M2Bone, value: u32);
pub fn whiteout_m2_M2Bone_get_translation(
self_: *mut whiteout_M2Bone,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2Bone_set_translation(
self_: *mut whiteout_M2Bone,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2Bone_get_rotation(
self_: *mut whiteout_M2Bone,
) -> *mut whiteout_M2AnimationTrackM2CompatQuaternion;
pub fn whiteout_m2_M2Bone_set_rotation(
self_: *mut whiteout_M2Bone,
value: *const whiteout_M2AnimationTrackM2CompatQuaternion,
);
pub fn whiteout_m2_M2Bone_get_scale(
self_: *mut whiteout_M2Bone,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2Bone_set_scale(
self_: *mut whiteout_M2Bone,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2Bone_get_pivot(self_: *mut whiteout_M2Bone) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Bone_set_pivot(
self_: *mut whiteout_M2Bone,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Texture_new() -> *mut whiteout_M2Texture;
pub fn whiteout_m2_M2Texture_delete(self_: *mut whiteout_M2Texture);
pub fn whiteout_m2_M2Texture_get_type(self_: *mut whiteout_M2Texture) -> u32;
pub fn whiteout_m2_M2Texture_set_type(self_: *mut whiteout_M2Texture, value: u32);
pub fn whiteout_m2_M2Texture_get_flags(self_: *mut whiteout_M2Texture) -> u32;
pub fn whiteout_m2_M2Texture_set_flags(self_: *mut whiteout_M2Texture, value: u32);
pub fn whiteout_m2_M2Texture_get_filename(self_: *mut whiteout_M2Texture) -> RawCString;
pub fn whiteout_m2_M2Texture_set_filename(
self_: *mut whiteout_M2Texture,
value: *const core::ffi::c_char,
);
pub fn whiteout_m2_M2Material_new() -> *mut whiteout_M2Material;
pub fn whiteout_m2_M2Material_delete(self_: *mut whiteout_M2Material);
pub fn whiteout_m2_M2Material_get_flags(self_: *mut whiteout_M2Material) -> u16;
pub fn whiteout_m2_M2Material_set_flags(self_: *mut whiteout_M2Material, value: u16);
pub fn whiteout_m2_M2Material_get_blendingMode(self_: *mut whiteout_M2Material) -> u16;
pub fn whiteout_m2_M2Material_set_blendingMode(self_: *mut whiteout_M2Material, value: u16);
pub fn whiteout_m2_M2TextureWeight_new() -> *mut whiteout_M2TextureWeight;
pub fn whiteout_m2_M2TextureWeight_delete(self_: *mut whiteout_M2TextureWeight);
pub fn whiteout_m2_M2TextureWeight_get_weight(
self_: *mut whiteout_M2TextureWeight,
) -> *mut whiteout_M2AnimationTrackI16;
pub fn whiteout_m2_M2TextureWeight_set_weight(
self_: *mut whiteout_M2TextureWeight,
value: *const whiteout_M2AnimationTrackI16,
);
pub fn whiteout_m2_M2TextureTransform_new() -> *mut whiteout_M2TextureTransform;
pub fn whiteout_m2_M2TextureTransform_delete(self_: *mut whiteout_M2TextureTransform);
pub fn whiteout_m2_M2TextureTransform_get_translation(
self_: *mut whiteout_M2TextureTransform,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2TextureTransform_set_translation(
self_: *mut whiteout_M2TextureTransform,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2TextureTransform_get_rotation(
self_: *mut whiteout_M2TextureTransform,
) -> *mut whiteout_M2AnimationTrackM2CompatQuaternion;
pub fn whiteout_m2_M2TextureTransform_set_rotation(
self_: *mut whiteout_M2TextureTransform,
value: *const whiteout_M2AnimationTrackM2CompatQuaternion,
);
pub fn whiteout_m2_M2TextureTransform_get_scaling(
self_: *mut whiteout_M2TextureTransform,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2TextureTransform_set_scaling(
self_: *mut whiteout_M2TextureTransform,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2ColorAnimation_new() -> *mut whiteout_M2ColorAnimation;
pub fn whiteout_m2_M2ColorAnimation_delete(self_: *mut whiteout_M2ColorAnimation);
pub fn whiteout_m2_M2ColorAnimation_get_color(
self_: *mut whiteout_M2ColorAnimation,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2ColorAnimation_set_color(
self_: *mut whiteout_M2ColorAnimation,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2ColorAnimation_get_alpha(
self_: *mut whiteout_M2ColorAnimation,
) -> *mut whiteout_M2AnimationTrackI16;
pub fn whiteout_m2_M2ColorAnimation_set_alpha(
self_: *mut whiteout_M2ColorAnimation,
value: *const whiteout_M2AnimationTrackI16,
);
pub fn whiteout_m2_M2Light_new() -> *mut whiteout_M2Light;
pub fn whiteout_m2_M2Light_delete(self_: *mut whiteout_M2Light);
pub fn whiteout_m2_M2Light_get_type(self_: *mut whiteout_M2Light) -> u16;
pub fn whiteout_m2_M2Light_set_type(self_: *mut whiteout_M2Light, value: u16);
pub fn whiteout_m2_M2Light_get_boneId(self_: *mut whiteout_M2Light) -> i16;
pub fn whiteout_m2_M2Light_set_boneId(self_: *mut whiteout_M2Light, value: i16);
pub fn whiteout_m2_M2Light_get_position(
self_: *mut whiteout_M2Light,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Light_set_position(
self_: *mut whiteout_M2Light,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Light_get_ambientColor(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2Light_set_ambientColor(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2Light_get_ambientIntensity(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2Light_set_ambientIntensity(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2Light_get_diffuseColor(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2Light_set_diffuseColor(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2Light_get_diffuseIntensity(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2Light_set_diffuseIntensity(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2Light_get_attenuationStart(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2Light_set_attenuationStart(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2Light_get_attenuationEnd(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2Light_set_attenuationEnd(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2Light_get_visibility(
self_: *mut whiteout_M2Light,
) -> *mut whiteout_M2AnimationTrackU8;
pub fn whiteout_m2_M2Light_set_visibility(
self_: *mut whiteout_M2Light,
value: *const whiteout_M2AnimationTrackU8,
);
pub fn whiteout_m2_M2CameraSpline_new() -> *mut whiteout_M2CameraSpline;
pub fn whiteout_m2_M2CameraSpline_delete(self_: *mut whiteout_M2CameraSpline);
pub fn whiteout_m2_M2CameraSpline_get_value(
self_: *mut whiteout_M2CameraSpline,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2CameraSpline_set_value(
self_: *mut whiteout_M2CameraSpline,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2CameraSpline_get_inTangent(
self_: *mut whiteout_M2CameraSpline,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2CameraSpline_set_inTangent(
self_: *mut whiteout_M2CameraSpline,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2CameraSpline_get_outTangent(
self_: *mut whiteout_M2CameraSpline,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2CameraSpline_set_outTangent(
self_: *mut whiteout_M2CameraSpline,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Camera_new() -> *mut whiteout_M2Camera;
pub fn whiteout_m2_M2Camera_delete(self_: *mut whiteout_M2Camera);
pub fn whiteout_m2_M2Camera_get_type(self_: *mut whiteout_M2Camera) -> u32;
pub fn whiteout_m2_M2Camera_set_type(self_: *mut whiteout_M2Camera, value: u32);
pub fn whiteout_m2_M2Camera_get_fieldOfView(self_: *mut whiteout_M2Camera) -> f32;
pub fn whiteout_m2_M2Camera_set_fieldOfView(self_: *mut whiteout_M2Camera, value: f32);
pub fn whiteout_m2_M2Camera_get_farClip(self_: *mut whiteout_M2Camera) -> f32;
pub fn whiteout_m2_M2Camera_set_farClip(self_: *mut whiteout_M2Camera, value: f32);
pub fn whiteout_m2_M2Camera_get_nearClip(self_: *mut whiteout_M2Camera) -> f32;
pub fn whiteout_m2_M2Camera_set_nearClip(self_: *mut whiteout_M2Camera, value: f32);
pub fn whiteout_m2_M2Camera_get_positions(
self_: *mut whiteout_M2Camera,
) -> *mut whiteout_M2AnimationTrackM2CameraSpline;
pub fn whiteout_m2_M2Camera_set_positions(
self_: *mut whiteout_M2Camera,
value: *const whiteout_M2AnimationTrackM2CameraSpline,
);
pub fn whiteout_m2_M2Camera_get_positionBase(
self_: *mut whiteout_M2Camera,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Camera_set_positionBase(
self_: *mut whiteout_M2Camera,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Camera_get_targetPositions(
self_: *mut whiteout_M2Camera,
) -> *mut whiteout_M2AnimationTrackM2CameraSpline;
pub fn whiteout_m2_M2Camera_set_targetPositions(
self_: *mut whiteout_M2Camera,
value: *const whiteout_M2AnimationTrackM2CameraSpline,
);
pub fn whiteout_m2_M2Camera_get_targetPositionBase(
self_: *mut whiteout_M2Camera,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Camera_set_targetPositionBase(
self_: *mut whiteout_M2Camera,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Camera_get_roll(
self_: *mut whiteout_M2Camera,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2Camera_set_roll(
self_: *mut whiteout_M2Camera,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2Camera_get_fieldOfViewTrack(
self_: *mut whiteout_M2Camera,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2Camera_set_fieldOfViewTrack(
self_: *mut whiteout_M2Camera,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2Attachment_new() -> *mut whiteout_M2Attachment;
pub fn whiteout_m2_M2Attachment_delete(self_: *mut whiteout_M2Attachment);
pub fn whiteout_m2_M2Attachment_get_id(self_: *mut whiteout_M2Attachment) -> u32;
pub fn whiteout_m2_M2Attachment_set_id(self_: *mut whiteout_M2Attachment, value: u32);
pub fn whiteout_m2_M2Attachment_get_boneId(self_: *mut whiteout_M2Attachment) -> u16;
pub fn whiteout_m2_M2Attachment_set_boneId(self_: *mut whiteout_M2Attachment, value: u16);
pub fn whiteout_m2_M2Attachment_get_unknown(self_: *mut whiteout_M2Attachment) -> u16;
pub fn whiteout_m2_M2Attachment_set_unknown(self_: *mut whiteout_M2Attachment, value: u16);
pub fn whiteout_m2_M2Attachment_get_position(
self_: *mut whiteout_M2Attachment,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Attachment_set_position(
self_: *mut whiteout_M2Attachment,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Attachment_get_animate(
self_: *mut whiteout_M2Attachment,
) -> *mut whiteout_M2AnimationTrackU8;
pub fn whiteout_m2_M2Attachment_set_animate(
self_: *mut whiteout_M2Attachment,
value: *const whiteout_M2AnimationTrackU8,
);
pub fn whiteout_m2_M2RibbonEmitter_new() -> *mut whiteout_M2RibbonEmitter;
pub fn whiteout_m2_M2RibbonEmitter_delete(self_: *mut whiteout_M2RibbonEmitter);
pub fn whiteout_m2_M2RibbonEmitter_get_ribbonId(
self_: *mut whiteout_M2RibbonEmitter,
) -> u32;
pub fn whiteout_m2_M2RibbonEmitter_set_ribbonId(
self_: *mut whiteout_M2RibbonEmitter,
value: u32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_boneId(self_: *mut whiteout_M2RibbonEmitter) -> u32;
pub fn whiteout_m2_M2RibbonEmitter_set_boneId(
self_: *mut whiteout_M2RibbonEmitter,
value: u32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_position(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2RibbonEmitter_set_position(
self_: *mut whiteout_M2RibbonEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2RibbonEmitter_get_textureIndices_count(
self_: *mut whiteout_M2RibbonEmitter,
) -> usize;
pub fn whiteout_m2_M2RibbonEmitter_resize_textureIndices(
self_: *mut whiteout_M2RibbonEmitter,
count: usize,
);
pub fn whiteout_m2_M2RibbonEmitter_get_textureIndices_data(
self_: *mut whiteout_M2RibbonEmitter,
) -> *const u16;
pub fn whiteout_m2_M2RibbonEmitter_assign_textureIndices(
self_: *mut whiteout_M2RibbonEmitter,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2RibbonEmitter_get_materialIndices_count(
self_: *mut whiteout_M2RibbonEmitter,
) -> usize;
pub fn whiteout_m2_M2RibbonEmitter_resize_materialIndices(
self_: *mut whiteout_M2RibbonEmitter,
count: usize,
);
pub fn whiteout_m2_M2RibbonEmitter_get_materialIndices_data(
self_: *mut whiteout_M2RibbonEmitter,
) -> *const u16;
pub fn whiteout_m2_M2RibbonEmitter_assign_materialIndices(
self_: *mut whiteout_M2RibbonEmitter,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2RibbonEmitter_get_colorTrack(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2RibbonEmitter_set_colorTrack(
self_: *mut whiteout_M2RibbonEmitter,
value: *const whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2RibbonEmitter_get_alphaTrack(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut whiteout_M2AnimationTrackI16;
pub fn whiteout_m2_M2RibbonEmitter_set_alphaTrack(
self_: *mut whiteout_M2RibbonEmitter,
value: *const whiteout_M2AnimationTrackI16,
);
pub fn whiteout_m2_M2RibbonEmitter_get_heightAbove(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2RibbonEmitter_set_heightAbove(
self_: *mut whiteout_M2RibbonEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_heightBelow(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2RibbonEmitter_set_heightBelow(
self_: *mut whiteout_M2RibbonEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_edgesPerSecond(
self_: *mut whiteout_M2RibbonEmitter,
) -> f32;
pub fn whiteout_m2_M2RibbonEmitter_set_edgesPerSecond(
self_: *mut whiteout_M2RibbonEmitter,
value: f32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_edgeLifetime(
self_: *mut whiteout_M2RibbonEmitter,
) -> f32;
pub fn whiteout_m2_M2RibbonEmitter_set_edgeLifetime(
self_: *mut whiteout_M2RibbonEmitter,
value: f32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_gravity(self_: *mut whiteout_M2RibbonEmitter)
-> f32;
pub fn whiteout_m2_M2RibbonEmitter_set_gravity(
self_: *mut whiteout_M2RibbonEmitter,
value: f32,
);
pub fn whiteout_m2_M2RibbonEmitter_get_textureRows(
self_: *mut whiteout_M2RibbonEmitter,
) -> u16;
pub fn whiteout_m2_M2RibbonEmitter_set_textureRows(
self_: *mut whiteout_M2RibbonEmitter,
value: u16,
);
pub fn whiteout_m2_M2RibbonEmitter_get_textureCols(
self_: *mut whiteout_M2RibbonEmitter,
) -> u16;
pub fn whiteout_m2_M2RibbonEmitter_set_textureCols(
self_: *mut whiteout_M2RibbonEmitter,
value: u16,
);
pub fn whiteout_m2_M2RibbonEmitter_get_texSlot(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut whiteout_M2AnimationTrackU16;
pub fn whiteout_m2_M2RibbonEmitter_set_texSlot(
self_: *mut whiteout_M2RibbonEmitter,
value: *const whiteout_M2AnimationTrackU16,
);
pub fn whiteout_m2_M2RibbonEmitter_get_visibility(
self_: *mut whiteout_M2RibbonEmitter,
) -> *mut whiteout_M2AnimationTrackU8;
pub fn whiteout_m2_M2RibbonEmitter_set_visibility(
self_: *mut whiteout_M2RibbonEmitter,
value: *const whiteout_M2AnimationTrackU8,
);
pub fn whiteout_m2_M2RibbonEmitter_get_priorityPlane(
self_: *mut whiteout_M2RibbonEmitter,
) -> i16;
pub fn whiteout_m2_M2RibbonEmitter_set_priorityPlane(
self_: *mut whiteout_M2RibbonEmitter,
value: i16,
);
pub fn whiteout_m2_M2RibbonEmitter_get_ribbonColorIndex(
self_: *mut whiteout_M2RibbonEmitter,
) -> i8;
pub fn whiteout_m2_M2RibbonEmitter_set_ribbonColorIndex(
self_: *mut whiteout_M2RibbonEmitter,
value: i8,
);
pub fn whiteout_m2_M2RibbonEmitter_get_textureTransformIndex(
self_: *mut whiteout_M2RibbonEmitter,
) -> i8;
pub fn whiteout_m2_M2RibbonEmitter_set_textureTransformIndex(
self_: *mut whiteout_M2RibbonEmitter,
value: i8,
);
pub fn whiteout_m2_M2Box_new() -> *mut whiteout_M2Box;
pub fn whiteout_m2_M2Box_delete(self_: *mut whiteout_M2Box);
pub fn whiteout_m2_M2Box_get_minimum(self_: *mut whiteout_M2Box) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Box_set_minimum(
self_: *mut whiteout_M2Box,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Box_get_maximum(self_: *mut whiteout_M2Box) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Box_set_maximum(
self_: *mut whiteout_M2Box,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2ParticleEmitter_new() -> *mut whiteout_M2ParticleEmitter;
pub fn whiteout_m2_M2ParticleEmitter_delete(self_: *mut whiteout_M2ParticleEmitter);
pub fn whiteout_m2_M2ParticleEmitter_get_particleId(
self_: *mut whiteout_M2ParticleEmitter,
) -> u32;
pub fn whiteout_m2_M2ParticleEmitter_set_particleId(
self_: *mut whiteout_M2ParticleEmitter,
value: u32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_flags(
self_: *mut whiteout_M2ParticleEmitter,
) -> i32;
pub fn whiteout_m2_M2ParticleEmitter_set_flags(
self_: *mut whiteout_M2ParticleEmitter,
value: i32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_position(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2ParticleEmitter_set_position(
self_: *mut whiteout_M2ParticleEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2ParticleEmitter_get_boneId(
self_: *mut whiteout_M2ParticleEmitter,
) -> u16;
pub fn whiteout_m2_M2ParticleEmitter_set_boneId(
self_: *mut whiteout_M2ParticleEmitter,
value: u16,
);
pub fn whiteout_m2_M2ParticleEmitter_get_particleModelFilename(
self_: *mut whiteout_M2ParticleEmitter,
) -> RawCString;
pub fn whiteout_m2_M2ParticleEmitter_set_particleModelFilename(
self_: *mut whiteout_M2ParticleEmitter,
value: *const core::ffi::c_char,
);
pub fn whiteout_m2_M2ParticleEmitter_get_childEmittersModelFilename(
self_: *mut whiteout_M2ParticleEmitter,
) -> RawCString;
pub fn whiteout_m2_M2ParticleEmitter_set_childEmittersModelFilename(
self_: *mut whiteout_M2ParticleEmitter,
value: *const core::ffi::c_char,
);
pub fn whiteout_m2_M2ParticleEmitter_get_blendingType(
self_: *mut whiteout_M2ParticleEmitter,
) -> i32;
pub fn whiteout_m2_M2ParticleEmitter_set_blendingType(
self_: *mut whiteout_M2ParticleEmitter,
value: i32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_emitterType(
self_: *mut whiteout_M2ParticleEmitter,
) -> i32;
pub fn whiteout_m2_M2ParticleEmitter_set_emitterType(
self_: *mut whiteout_M2ParticleEmitter,
value: i32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_particleColorIndex(
self_: *mut whiteout_M2ParticleEmitter,
) -> u16;
pub fn whiteout_m2_M2ParticleEmitter_set_particleColorIndex(
self_: *mut whiteout_M2ParticleEmitter,
value: u16,
);
pub fn whiteout_m2_M2ParticleEmitter_get_textureTilerotation(
self_: *mut whiteout_M2ParticleEmitter,
) -> i16;
pub fn whiteout_m2_M2ParticleEmitter_set_textureTilerotation(
self_: *mut whiteout_M2ParticleEmitter,
value: i16,
);
pub fn whiteout_m2_M2ParticleEmitter_get_rows(
self_: *mut whiteout_M2ParticleEmitter,
) -> u16;
pub fn whiteout_m2_M2ParticleEmitter_set_rows(
self_: *mut whiteout_M2ParticleEmitter,
value: u16,
);
pub fn whiteout_m2_M2ParticleEmitter_get_columns(
self_: *mut whiteout_M2ParticleEmitter,
) -> u16;
pub fn whiteout_m2_M2ParticleEmitter_set_columns(
self_: *mut whiteout_M2ParticleEmitter,
value: u16,
);
pub fn whiteout_m2_M2ParticleEmitter_get_emissionSpeed(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_emissionSpeed(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_speedVariation(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_speedVariation(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_verticalRange(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_verticalRange(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_horizontalRange(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_horizontalRange(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_gravity(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_gravity(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_lifespan(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_lifespan(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_lifespanVariation(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_lifespanVariation(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_emissionRate(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_emissionRate(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_emissionRateVariation(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_emissionRateVariation(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_emissionAreaWidth(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_emissionAreaWidth(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_emissionAreaLength(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_emissionAreaLength(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_zSource(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2ParticleEmitter_set_zSource(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackF32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_colorTrack(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2ParticleAnimationTrackVector3f;
pub fn whiteout_m2_M2ParticleEmitter_set_colorTrack(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2ParticleAnimationTrackVector3f,
);
pub fn whiteout_m2_M2ParticleEmitter_get_scaleTrack(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2ParticleAnimationTrackVector2f;
pub fn whiteout_m2_M2ParticleEmitter_set_scaleTrack(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2ParticleAnimationTrackVector2f,
);
pub fn whiteout_m2_M2ParticleEmitter_get_scaleVary(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2ParticleEmitter_set_scaleVary(
self_: *mut whiteout_M2ParticleEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2ParticleEmitter_get_tailLength(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_tailLength(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_twinkleSpeed(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_twinkleSpeed(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_twinklePercent(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_twinklePercent(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_twinkleScale(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2ParticleEmitter_set_twinkleScale(
self_: *mut whiteout_M2ParticleEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2ParticleEmitter_get_inheritVelocityScale(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_inheritVelocityScale(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_drag(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_drag(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_baseSpin(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_baseSpin(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_baseSpinVariation(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_baseSpinVariation(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_spinSpeed(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_spinSpeed(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_spinSpeedVariation(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_spinSpeedVariation(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_tumble(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2Box;
pub fn whiteout_m2_M2ParticleEmitter_set_tumble(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2Box,
);
pub fn whiteout_m2_M2ParticleEmitter_get_windVector(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2ParticleEmitter_set_windVector(
self_: *mut whiteout_M2ParticleEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2ParticleEmitter_get_windTime(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_windTime(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_followSpeed1(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_followSpeed1(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_followScale1(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_followScale1(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_followSpeed2(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_followSpeed2(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_followScale2(
self_: *mut whiteout_M2ParticleEmitter,
) -> f32;
pub fn whiteout_m2_M2ParticleEmitter_set_followScale2(
self_: *mut whiteout_M2ParticleEmitter,
value: f32,
);
pub fn whiteout_m2_M2ParticleEmitter_get_splinePoints_count(
self_: *mut whiteout_M2ParticleEmitter,
) -> usize;
pub fn whiteout_m2_M2ParticleEmitter_resize_splinePoints(
self_: *mut whiteout_M2ParticleEmitter,
count: usize,
);
pub fn whiteout_m2_M2ParticleEmitter_get_splinePoints_data(
self_: *mut whiteout_M2ParticleEmitter,
) -> *const f32;
pub fn whiteout_m2_M2ParticleEmitter_assign_splinePoints(
self_: *mut whiteout_M2ParticleEmitter,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2ParticleEmitter_get_enabledIn(
self_: *mut whiteout_M2ParticleEmitter,
) -> *mut whiteout_M2AnimationTrackU8;
pub fn whiteout_m2_M2ParticleEmitter_set_enabledIn(
self_: *mut whiteout_M2ParticleEmitter,
value: *const whiteout_M2AnimationTrackU8,
);
pub fn whiteout_m2_M2Event_new() -> *mut whiteout_M2Event;
pub fn whiteout_m2_M2Event_delete(self_: *mut whiteout_M2Event);
pub fn whiteout_m2_M2Event_get_identifier(self_: *mut whiteout_M2Event) -> u32;
pub fn whiteout_m2_M2Event_set_identifier(self_: *mut whiteout_M2Event, value: u32);
pub fn whiteout_m2_M2Event_get_data(self_: *mut whiteout_M2Event) -> u32;
pub fn whiteout_m2_M2Event_set_data(self_: *mut whiteout_M2Event, value: u32);
pub fn whiteout_m2_M2Event_get_boneId(self_: *mut whiteout_M2Event) -> u32;
pub fn whiteout_m2_M2Event_set_boneId(self_: *mut whiteout_M2Event, value: u32);
pub fn whiteout_m2_M2Event_get_position(
self_: *mut whiteout_M2Event,
) -> *mut core::ffi::c_void;
pub fn whiteout_m2_M2Event_set_position(
self_: *mut whiteout_M2Event,
value: *const core::ffi::c_void,
);
pub fn whiteout_m2_M2Event_get_enabled(
self_: *mut whiteout_M2Event,
) -> *mut whiteout_M2AnimationTrackBase;
pub fn whiteout_m2_M2Event_set_enabled(
self_: *mut whiteout_M2Event,
value: *const whiteout_M2AnimationTrackBase,
);
pub fn whiteout_m2_M2Model_new() -> *mut whiteout_M2Model;
pub fn whiteout_m2_M2Model_delete(self_: *mut whiteout_M2Model);
pub fn whiteout_m2_M2Model_get_modelName(self_: *mut whiteout_M2Model) -> RawCString;
pub fn whiteout_m2_M2Model_set_modelName(
self_: *mut whiteout_M2Model,
value: *const core::ffi::c_char,
);
pub fn whiteout_m2_M2Model_get_globalFlags(
self_: *mut whiteout_M2Model,
) -> *mut whiteout_M2GlobalFlags;
pub fn whiteout_m2_M2Model_set_globalFlags(
self_: *mut whiteout_M2Model,
value: *const whiteout_M2GlobalFlags,
);
pub fn whiteout_m2_M2Model_get_globalLoops_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_globalLoops(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_globalLoops_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2GlobalSequence;
pub fn whiteout_m2_M2Model_get_sequences_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_sequences(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_sequences_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Sequence;
pub fn whiteout_m2_M2Model_get_sequenceIdxHashById_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_sequenceIdxHashById(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_sequenceIdxHashById_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_sequenceIdxHashById(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_bones_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_bones(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_bones_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Bone;
pub fn whiteout_m2_M2Model_get_keyBoneIds_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_keyBoneIds(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_keyBoneIds_data(self_: *mut whiteout_M2Model) -> *const u16;
pub fn whiteout_m2_M2Model_assign_keyBoneIds(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_vertices_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_vertices(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_vertices_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Vertex;
pub fn whiteout_m2_M2Model_get_skinProfiles_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_skinProfiles(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_skinProfiles_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2SkinProfile;
pub fn whiteout_m2_M2Model_get_lodProfiles_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_lodProfiles(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_lodProfiles_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2SkinProfile;
pub fn whiteout_m2_M2Model_get_numSkinProfiles(self_: *mut whiteout_M2Model) -> u32;
pub fn whiteout_m2_M2Model_set_numSkinProfiles(self_: *mut whiteout_M2Model, value: u32);
pub fn whiteout_m2_M2Model_get_colors_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_colors(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_colors_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2ColorAnimation;
pub fn whiteout_m2_M2Model_get_textures_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_textures(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_textures_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Texture;
pub fn whiteout_m2_M2Model_get_textureWeights_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_textureWeights(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureWeights_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2TextureWeight;
pub fn whiteout_m2_M2Model_get_textureTransforms_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_textureTransforms(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureTransforms_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2TextureTransform;
pub fn whiteout_m2_M2Model_get_textureIndicesById_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_textureIndicesById(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureIndicesById_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_textureIndicesById(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_materials_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_materials(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_materials_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Material;
pub fn whiteout_m2_M2Model_get_boneCombos_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_boneCombos(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_boneCombos_data(self_: *mut whiteout_M2Model) -> *const u16;
pub fn whiteout_m2_M2Model_assign_boneCombos(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureCombos_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_textureCombos(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_textureCombos_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_textureCombos(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureCoordCombos_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_textureCoordCombos(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureCoordCombos_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_textureCoordCombos(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureWeightCombos_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_textureWeightCombos(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureWeightCombos_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_textureWeightCombos(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureTransformCombos_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_textureTransformCombos(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureTransformCombos_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_textureTransformCombos(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_bounding(
self_: *mut whiteout_M2Model,
) -> *mut whiteout_M2Extent;
pub fn whiteout_m2_M2Model_set_bounding(
self_: *mut whiteout_M2Model,
value: *const whiteout_M2Extent,
);
pub fn whiteout_m2_M2Model_get_collision(
self_: *mut whiteout_M2Model,
) -> *mut whiteout_M2Extent;
pub fn whiteout_m2_M2Model_set_collision(
self_: *mut whiteout_M2Model,
value: *const whiteout_M2Extent,
);
pub fn whiteout_m2_M2Model_get_collisionTriangleIndices_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_collisionTriangleIndices(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_collisionTriangleIndices_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_collisionTriangleIndices(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_collisionVertices_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_collisionVertices(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_collisionVertices_data(
self_: *mut whiteout_M2Model,
) -> *const f32;
pub fn whiteout_m2_M2Model_assign_collisionVertices(
self_: *mut whiteout_M2Model,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2Model_get_collisionFaceNormals_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_collisionFaceNormals(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_collisionFaceNormals_data(
self_: *mut whiteout_M2Model,
) -> *const f32;
pub fn whiteout_m2_M2Model_assign_collisionFaceNormals(
self_: *mut whiteout_M2Model,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2Model_get_attachments_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_attachments(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_attachments_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Attachment;
pub fn whiteout_m2_M2Model_get_attachmentIndicesById_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_attachmentIndicesById(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_attachmentIndicesById_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_attachmentIndicesById(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_events_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_events(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_events_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Event;
pub fn whiteout_m2_M2Model_get_lights_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_lights(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_lights_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Light;
pub fn whiteout_m2_M2Model_get_cameras_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_cameras(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_cameras_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Camera;
pub fn whiteout_m2_M2Model_get_cameraIndicesById_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_cameraIndicesById(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_cameraIndicesById_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_cameraIndicesById(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_ribbonEmitters_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_ribbonEmitters(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_ribbonEmitters_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2RibbonEmitter;
pub fn whiteout_m2_M2Model_get_particleEmitters_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_particleEmitters(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_particleEmitters_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2ParticleEmitter;
pub fn whiteout_m2_M2Model_get_textureCombinerCombos_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_textureCombinerCombos(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_textureCombinerCombos_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_textureCombinerCombos(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_texture_ids_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_texture_ids(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_texture_ids_data(self_: *mut whiteout_M2Model)
-> *const u32;
pub fn whiteout_m2_M2Model_assign_texture_ids(
self_: *mut whiteout_M2Model,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2Model_get_parentSequenceReplacements_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_parentSequenceReplacements(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_parentSequenceReplacements_data(
self_: *mut whiteout_M2Model,
) -> *const u16;
pub fn whiteout_m2_M2Model_assign_parentSequenceReplacements(
self_: *mut whiteout_M2Model,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2Model_get_parentTextureWeights_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_parentTextureWeights(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_parentTextureWeights_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2TextureWeight;
pub fn whiteout_m2_M2Model_get_parentSequenceBounds_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_parentSequenceBounds(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_parentSequenceBounds_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2Extent;
pub fn whiteout_m2_M2Model_get_parentEventData_count(self_: *mut whiteout_M2Model)
-> usize;
pub fn whiteout_m2_M2Model_resize_parentEventData(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_parentEventData_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2AnimationTrackBase;
pub fn whiteout_m2_M2Model_get_recursiveParticleModelIds_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_recursiveParticleModelIds(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_recursiveParticleModelIds_data(
self_: *mut whiteout_M2Model,
) -> *const u32;
pub fn whiteout_m2_M2Model_assign_recursiveParticleModelIds(
self_: *mut whiteout_M2Model,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2Model_get_geometryParticleModelIds_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_geometryParticleModelIds(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_geometryParticleModelIds_data(
self_: *mut whiteout_M2Model,
) -> *const u32;
pub fn whiteout_m2_M2Model_assign_geometryParticleModelIds(
self_: *mut whiteout_M2Model,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2Model_get_particleGeosets_count(self_: *mut whiteout_M2Model)
-> usize;
pub fn whiteout_m2_M2Model_resize_particleGeosets(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_particleGeosets_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2ParticleGeosetData;
pub fn whiteout_m2_M2Model_get_physicsFileData_count(self_: *mut whiteout_M2Model)
-> usize;
pub fn whiteout_m2_M2Model_resize_physicsFileData(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_physicsFileData_data(
self_: *mut whiteout_M2Model,
) -> *const u8;
pub fn whiteout_m2_M2Model_assign_physicsFileData(
self_: *mut whiteout_M2Model,
data: *const u8,
count: usize,
);
pub fn whiteout_m2_M2Model_get_edgeFadeEntries_count(self_: *mut whiteout_M2Model)
-> usize;
pub fn whiteout_m2_M2Model_resize_edgeFadeEntries(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_edgeFadeEntries_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2EdgeFadeData;
pub fn whiteout_m2_M2Model_get_nerfEntries_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_nerfEntries(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_nerfEntries_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2DistanceFadeData;
pub fn whiteout_m2_M2Model_get_detailedLightEntries_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_detailedLightEntries(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_detailedLightEntries_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2DetailedLightData;
pub fn whiteout_m2_M2Model_get_debugOcclusionEntries_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_debugOcclusionEntries(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_debugOcclusionEntries_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2DebugOcclusionData;
pub fn whiteout_m2_M2Model_get_animFrameData_count(self_: *mut whiteout_M2Model) -> usize;
pub fn whiteout_m2_M2Model_resize_animFrameData(self_: *mut whiteout_M2Model, count: usize);
pub fn whiteout_m2_M2Model_get_animFrameData_data(
self_: *mut whiteout_M2Model,
) -> *const u8;
pub fn whiteout_m2_M2Model_assign_animFrameData(
self_: *mut whiteout_M2Model,
data: *const u8,
count: usize,
);
pub fn whiteout_m2_M2Model_get_texturedLightEntries_count(
self_: *mut whiteout_M2Model,
) -> usize;
pub fn whiteout_m2_M2Model_resize_texturedLightEntries(
self_: *mut whiteout_M2Model,
count: usize,
);
pub fn whiteout_m2_M2Model_get_texturedLightEntries_at(
self_: *mut whiteout_M2Model,
index: usize,
) -> *mut whiteout_M2TexturedLightData;
pub fn whiteout_m2_M2Parser_new() -> *mut whiteout_M2Parser;
pub fn whiteout_m2_M2Parser_delete(self_: *mut whiteout_M2Parser);
pub fn whiteout_m2_M2Parser_parse(
self_: *mut whiteout_M2Parser,
fs: *mut core::ffi::c_void,
file_path: *const core::ffi::c_char,
) -> *mut whiteout_M2Model;
pub fn whiteout_m2_M2Parser_parse_cascFs_buffer(
self_: *mut whiteout_M2Parser,
casc_fs: *const u8,
casc_fs_size: usize,
buffer: *const u8,
buffer_size: usize,
) -> *mut whiteout_M2Model;
pub fn whiteout_m2_M2Parser_hasIssues(self_: *mut whiteout_M2Parser) -> i32;
pub fn whiteout_m2_M2Parser_getIssues_count(self_: *mut whiteout_M2Parser) -> usize;
pub fn whiteout_m2_M2Parser_getIssues_at(
self_: *mut whiteout_M2Parser,
index: usize,
) -> RawCString;
pub fn whiteout_m2_M2WriteOptions_new() -> *mut whiteout_M2WriteOptions;
pub fn whiteout_m2_M2WriteOptions_delete(self_: *mut whiteout_M2WriteOptions);
pub fn whiteout_m2_M2WriteOptions_get_m2Version(self_: *mut whiteout_M2WriteOptions)
-> u32;
pub fn whiteout_m2_M2WriteOptions_set_m2Version(
self_: *mut whiteout_M2WriteOptions,
value: u32,
);
pub fn whiteout_m2_M2WriteOptions_get_emitSkeleton(
self_: *mut whiteout_M2WriteOptions,
) -> i32;
pub fn whiteout_m2_M2WriteOptions_set_emitSkeleton(
self_: *mut whiteout_M2WriteOptions,
value: i32,
);
pub fn whiteout_m2_M2WriteOptions_get_baseStem(
self_: *mut whiteout_M2WriteOptions,
) -> RawCString;
pub fn whiteout_m2_M2WriteOptions_set_baseStem(
self_: *mut whiteout_M2WriteOptions,
value: *const core::ffi::c_char,
);
pub fn whiteout_m2_M2SerializeResult_new() -> *mut whiteout_M2SerializeResult;
pub fn whiteout_m2_M2SerializeResult_delete(self_: *mut whiteout_M2SerializeResult);
pub fn whiteout_m2_M2SerializeResult_get_m2Data_count(
self_: *mut whiteout_M2SerializeResult,
) -> usize;
pub fn whiteout_m2_M2SerializeResult_resize_m2Data(
self_: *mut whiteout_M2SerializeResult,
count: usize,
);
pub fn whiteout_m2_M2SerializeResult_get_m2Data_data(
self_: *mut whiteout_M2SerializeResult,
) -> *const u8;
pub fn whiteout_m2_M2SerializeResult_assign_m2Data(
self_: *mut whiteout_M2SerializeResult,
data: *const u8,
count: usize,
);
pub fn whiteout_m2_M2Writer_new() -> *mut whiteout_M2Writer;
pub fn whiteout_m2_M2Writer_new_options(
_0: *mut core::ffi::c_void,
) -> *mut whiteout_M2Writer;
pub fn whiteout_m2_M2Writer_delete(self_: *mut whiteout_M2Writer);
pub fn whiteout_m2_M2Writer_write(
self_: *mut whiteout_M2Writer,
fs: *mut core::ffi::c_void,
file_path: *const core::ffi::c_char,
model: *mut whiteout_M2Model,
);
pub fn whiteout_m2_M2Writer_write_cascFs_model(
self_: *mut whiteout_M2Writer,
casc_fs: *mut core::ffi::c_void,
model: *mut whiteout_M2Model,
);
pub fn whiteout_m2_M2Writer_write_model(
self_: *mut whiteout_M2Writer,
model: *mut whiteout_M2Model,
) -> *mut whiteout_M2SerializeResult;
pub fn whiteout_m2_M2Writer_hasIssues(self_: *mut whiteout_M2Writer) -> i32;
pub fn whiteout_m2_M2Writer_getIssues_count(self_: *mut whiteout_M2Writer) -> usize;
pub fn whiteout_m2_M2Writer_getIssues_at(
self_: *mut whiteout_M2Writer,
index: usize,
) -> RawCString;
pub fn whiteout_m2_M2AnimationTrackVector3f_new() -> *mut whiteout_M2AnimationTrackVector3f;
pub fn whiteout_m2_M2AnimationTrackVector3f_delete(
self_: *mut whiteout_M2AnimationTrackVector3f,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackVector3f,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackVector3f_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackVector3f,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackVector3f,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackVector3f_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackVector3f,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackVector3f,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackVector3f_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackVector3f_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackVector3f,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackVector3f_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_get_values_count(
self_: *mut whiteout_M2AnimationTrackVector3f,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackVector3f_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackVector3f_resize_values(
self_: *mut whiteout_M2AnimationTrackVector3f,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackVector3f_get_values_inner_data(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
) -> *const f32;
pub fn whiteout_m2_M2AnimationTrackVector3f_assign_values_inner(
self_: *mut whiteout_M2AnimationTrackVector3f,
outer: usize,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_new(
) -> *mut whiteout_M2AnimationTrackM2CompatQuaternion;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_delete(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_count(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_values(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CompatQuaternion_get_values_at(
self_: *mut whiteout_M2AnimationTrackM2CompatQuaternion,
outer: usize,
inner: usize,
) -> *mut whiteout_M2CompatQuaternion;
pub fn whiteout_m2_M2AnimationTrackI16_new() -> *mut whiteout_M2AnimationTrackI16;
pub fn whiteout_m2_M2AnimationTrackI16_delete(self_: *mut whiteout_M2AnimationTrackI16);
pub fn whiteout_m2_M2AnimationTrackI16_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackI16,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackI16_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackI16,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackI16_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackI16,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackI16_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackI16,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackI16_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackI16,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackI16_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackI16_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackI16,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackI16_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackI16_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackI16_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackI16_get_values_count(
self_: *mut whiteout_M2AnimationTrackI16,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackI16_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackI16_resize_values(
self_: *mut whiteout_M2AnimationTrackI16,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackI16_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackI16_get_values_inner_data(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
) -> *const i16;
pub fn whiteout_m2_M2AnimationTrackI16_assign_values_inner(
self_: *mut whiteout_M2AnimationTrackI16,
outer: usize,
data: *const i16,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackF32_new() -> *mut whiteout_M2AnimationTrackF32;
pub fn whiteout_m2_M2AnimationTrackF32_delete(self_: *mut whiteout_M2AnimationTrackF32);
pub fn whiteout_m2_M2AnimationTrackF32_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackF32,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackF32_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackF32,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackF32_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackF32,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackF32_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackF32,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackF32_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackF32,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackF32_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackF32_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackF32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackF32_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackF32_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackF32_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackF32_get_values_count(
self_: *mut whiteout_M2AnimationTrackF32,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackF32_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackF32_resize_values(
self_: *mut whiteout_M2AnimationTrackF32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackF32_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackF32_get_values_inner_data(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
) -> *const f32;
pub fn whiteout_m2_M2AnimationTrackF32_assign_values_inner(
self_: *mut whiteout_M2AnimationTrackF32,
outer: usize,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU8_new() -> *mut whiteout_M2AnimationTrackU8;
pub fn whiteout_m2_M2AnimationTrackU8_delete(self_: *mut whiteout_M2AnimationTrackU8);
pub fn whiteout_m2_M2AnimationTrackU8_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackU8,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackU8_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackU8,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackU8_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackU8,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackU8_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackU8,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackU8_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackU8,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU8_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU8_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackU8,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU8_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU8_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackU8_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU8_get_values_count(
self_: *mut whiteout_M2AnimationTrackU8,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU8_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU8_resize_values(
self_: *mut whiteout_M2AnimationTrackU8,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU8_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU8_get_values_inner_data(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
) -> *const u8;
pub fn whiteout_m2_M2AnimationTrackU8_assign_values_inner(
self_: *mut whiteout_M2AnimationTrackU8,
outer: usize,
data: *const u8,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_new(
) -> *mut whiteout_M2AnimationTrackM2CameraSpline;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_delete(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_count(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_resize_values(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackM2CameraSpline_get_values_at(
self_: *mut whiteout_M2AnimationTrackM2CameraSpline,
outer: usize,
inner: usize,
) -> *mut whiteout_M2CameraSpline;
pub fn whiteout_m2_M2AnimationTrackU16_new() -> *mut whiteout_M2AnimationTrackU16;
pub fn whiteout_m2_M2AnimationTrackU16_delete(self_: *mut whiteout_M2AnimationTrackU16);
pub fn whiteout_m2_M2AnimationTrackU16_get_interpolationType(
self_: *mut whiteout_M2AnimationTrackU16,
) -> i32;
pub fn whiteout_m2_M2AnimationTrackU16_set_interpolationType(
self_: *mut whiteout_M2AnimationTrackU16,
value: i32,
);
pub fn whiteout_m2_M2AnimationTrackU16_get_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackU16,
) -> u16;
pub fn whiteout_m2_M2AnimationTrackU16_set_globalSequenceId(
self_: *mut whiteout_M2AnimationTrackU16,
value: u16,
);
pub fn whiteout_m2_M2AnimationTrackU16_get_timestamps_count(
self_: *mut whiteout_M2AnimationTrackU16,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU16_get_timestamps_inner_count(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU16_resize_timestamps(
self_: *mut whiteout_M2AnimationTrackU16,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU16_resize_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU16_get_timestamps_inner_data(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
) -> *const u32;
pub fn whiteout_m2_M2AnimationTrackU16_assign_timestamps_inner(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
data: *const u32,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU16_get_values_count(
self_: *mut whiteout_M2AnimationTrackU16,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU16_get_values_inner_count(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
) -> usize;
pub fn whiteout_m2_M2AnimationTrackU16_resize_values(
self_: *mut whiteout_M2AnimationTrackU16,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU16_resize_values_inner(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
count: usize,
);
pub fn whiteout_m2_M2AnimationTrackU16_get_values_inner_data(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
) -> *const u16;
pub fn whiteout_m2_M2AnimationTrackU16_assign_values_inner(
self_: *mut whiteout_M2AnimationTrackU16,
outer: usize,
data: *const u16,
count: usize,
);
pub fn whiteout_m2_M2ParticleAnimationTrackVector3f_new(
) -> *mut whiteout_M2ParticleAnimationTrackVector3f;
pub fn whiteout_m2_M2ParticleAnimationTrackVector3f_delete(
self_: *mut whiteout_M2ParticleAnimationTrackVector3f,
);
pub fn whiteout_m2_M2ParticleAnimationTrackVector3f_get_values_count(
self_: *mut whiteout_M2ParticleAnimationTrackVector3f,
) -> usize;
pub fn whiteout_m2_M2ParticleAnimationTrackVector3f_resize_values(
self_: *mut whiteout_M2ParticleAnimationTrackVector3f,
count: usize,
);
pub fn whiteout_m2_M2ParticleAnimationTrackVector3f_get_values_data(
self_: *mut whiteout_M2ParticleAnimationTrackVector3f,
) -> *const f32;
pub fn whiteout_m2_M2ParticleAnimationTrackVector3f_assign_values(
self_: *mut whiteout_M2ParticleAnimationTrackVector3f,
data: *const f32,
count: usize,
);
pub fn whiteout_m2_M2ParticleAnimationTrackVector2f_new(
) -> *mut whiteout_M2ParticleAnimationTrackVector2f;
pub fn whiteout_m2_M2ParticleAnimationTrackVector2f_delete(
self_: *mut whiteout_M2ParticleAnimationTrackVector2f,
);
pub fn whiteout_m2_M2ParticleAnimationTrackVector2f_get_values_count(
self_: *mut whiteout_M2ParticleAnimationTrackVector2f,
) -> usize;
pub fn whiteout_m2_M2ParticleAnimationTrackVector2f_resize_values(
self_: *mut whiteout_M2ParticleAnimationTrackVector2f,
count: usize,
);
pub fn whiteout_m2_M2ParticleAnimationTrackVector2f_get_values_data(
self_: *mut whiteout_M2ParticleAnimationTrackVector2f,
) -> *const f32;
pub fn whiteout_m2_M2ParticleAnimationTrackVector2f_assign_values(
self_: *mut whiteout_M2ParticleAnimationTrackVector2f,
data: *const f32,
count: usize,
);
}
}