#![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,
Hermite = 2,
Bezier = 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::Hermite),
3 => Ok(InterpolationType::Bezier),
other => Err(crate::Error::UnknownEnum {
name: "InterpolationType",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum SequenceFlag {
None = 0,
NonLooping = 1,
}
impl TryFrom<i32> for SequenceFlag {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(SequenceFlag::None),
1 => Ok(SequenceFlag::NonLooping),
other => Err(crate::Error::UnknownEnum {
name: "SequenceFlag",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum TextureFlag {
None = 0,
WrapWidth = 1,
WrapHeight = 2,
}
impl TryFrom<i32> for TextureFlag {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(TextureFlag::None),
1 => Ok(TextureFlag::WrapWidth),
2 => Ok(TextureFlag::WrapHeight),
other => Err(crate::Error::UnknownEnum {
name: "TextureFlag",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum NodeType {
Bone = 0,
Light = 1,
Helper = 2,
Attachment = 3,
ParticleEmitter = 4,
ParticleEmitter2 = 5,
RibbonEmitter = 6,
EventObject = 7,
Camera = 8,
CollisionShape = 9,
FaceEffect = 10,
CornEmitter = 11,
}
impl TryFrom<i32> for NodeType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(NodeType::Bone),
1 => Ok(NodeType::Light),
2 => Ok(NodeType::Helper),
3 => Ok(NodeType::Attachment),
4 => Ok(NodeType::ParticleEmitter),
5 => Ok(NodeType::ParticleEmitter2),
6 => Ok(NodeType::RibbonEmitter),
7 => Ok(NodeType::EventObject),
8 => Ok(NodeType::Camera),
9 => Ok(NodeType::CollisionShape),
10 => Ok(NodeType::FaceEffect),
11 => Ok(NodeType::CornEmitter),
other => Err(crate::Error::UnknownEnum {
name: "NodeType",
value: other,
}),
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct NodeFlag(pub i32);
impl NodeFlag {
pub const NONE: Self = Self(0);
pub const DONT_INHERIT_TRANSLATION: Self = Self(1);
pub const DONT_INHERIT_SCALING: Self = Self(2);
pub const DONT_INHERIT_ROTATION: Self = Self(4);
pub const BILLBOARDED: Self = Self(8);
pub const BILLBOARDED_LOCK_X: Self = Self(16);
pub const BILLBOARDED_LOCK_Y: Self = Self(32);
pub const BILLBOARDED_LOCK_Z: Self = Self(64);
pub const CAMERA_ANCHORED: Self = Self(128);
pub const BONE: Self = Self(256);
pub const LIGHT: Self = Self(512);
pub const EVENT_OBJECT: Self = Self(1024);
pub const ATTACHMENT: Self = Self(2048);
pub const PARTICLE_EMITTER: Self = Self(4096);
pub const COLLISION_SHAPE: Self = Self(8192);
pub const RIBBON_EMITTER: Self = Self(16384);
pub const UNSHADED: Self = Self(32768);
pub const EMITTER_USES_MDL: Self = Self(32768);
pub const SORT_PRIMITIVES: Self = Self(65536);
pub const SORT_PRIMS_FAR_Z: Self = Self(65536);
pub const EMITTER_USES_TGA: Self = Self(65536);
pub const LINE_EMITTER: Self = Self(131072);
pub const POPCORN_UNFOGGED: Self = Self(131072);
pub const UNFOGGED: Self = Self(262144);
pub const POPCORN_SCALING: Self = Self(262144);
pub const MODEL_SPACE: Self = Self(524288);
pub const XY_QUAD: Self = Self(1048576);
#[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 NodeFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for NodeFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for NodeFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for NodeFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "NodeFlag({:#x})", self.0)
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum LayerFilterMode {
None = 0,
Transparent = 1,
Blend = 2,
Additive = 3,
AddAlpha = 4,
Modulate = 5,
Modulate2x = 6,
Count = 7,
}
impl TryFrom<i32> for LayerFilterMode {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(LayerFilterMode::None),
1 => Ok(LayerFilterMode::Transparent),
2 => Ok(LayerFilterMode::Blend),
3 => Ok(LayerFilterMode::Additive),
4 => Ok(LayerFilterMode::AddAlpha),
5 => Ok(LayerFilterMode::Modulate),
6 => Ok(LayerFilterMode::Modulate2x),
7 => Ok(LayerFilterMode::Count),
other => Err(crate::Error::UnknownEnum {
name: "LayerFilterMode",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum LayerShaderType {
SD = 0,
HD = 1,
SDOnHD = 2,
Terrain = 3,
Water = 4,
Fog = 5,
Foliage = 6,
FoliagePush = 7,
Sprite = 8,
DebugTexture = 9,
DepthOfField = 10,
BloomCombine = 11,
BloomExtract = 12,
GaussianBlur = 13,
Tonemap = 14,
Movie = 15,
FFXCMAAEdge0 = 16,
FFXCMAAEdge1 = 17,
FFXCMAAEdgeCombine = 18,
FFXCMAAProcessAndApply = 19,
PopcornFX = 20,
ConeIndicator = 21,
CliffBlightMiscTerrain = 22,
Distortion = 23,
Crystal = 24,
Imgui = 25,
}
impl TryFrom<i32> for LayerShaderType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(LayerShaderType::SD),
1 => Ok(LayerShaderType::HD),
2 => Ok(LayerShaderType::SDOnHD),
3 => Ok(LayerShaderType::Terrain),
4 => Ok(LayerShaderType::Water),
5 => Ok(LayerShaderType::Fog),
6 => Ok(LayerShaderType::Foliage),
7 => Ok(LayerShaderType::FoliagePush),
8 => Ok(LayerShaderType::Sprite),
9 => Ok(LayerShaderType::DebugTexture),
10 => Ok(LayerShaderType::DepthOfField),
11 => Ok(LayerShaderType::BloomCombine),
12 => Ok(LayerShaderType::BloomExtract),
13 => Ok(LayerShaderType::GaussianBlur),
14 => Ok(LayerShaderType::Tonemap),
15 => Ok(LayerShaderType::Movie),
16 => Ok(LayerShaderType::FFXCMAAEdge0),
17 => Ok(LayerShaderType::FFXCMAAEdge1),
18 => Ok(LayerShaderType::FFXCMAAEdgeCombine),
19 => Ok(LayerShaderType::FFXCMAAProcessAndApply),
20 => Ok(LayerShaderType::PopcornFX),
21 => Ok(LayerShaderType::ConeIndicator),
22 => Ok(LayerShaderType::CliffBlightMiscTerrain),
23 => Ok(LayerShaderType::Distortion),
24 => Ok(LayerShaderType::Crystal),
25 => Ok(LayerShaderType::Imgui),
other => Err(crate::Error::UnknownEnum {
name: "LayerShaderType",
value: other,
}),
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct LayerShadingFlag(pub i32);
impl LayerShadingFlag {
pub const NONE: Self = Self(0);
pub const UNSHADED: Self = Self(1);
pub const SPHERE_ENV_MAP: Self = Self(2);
pub const WRAP_WIDTH: Self = Self(4);
pub const WRAP_HEIGHT: Self = Self(8);
pub const TWO_SIDED: Self = Self(16);
pub const UNFOGGED: Self = Self(32);
pub const NO_DEPTH_TEST: Self = Self(64);
pub const NO_DEPTH_SET: Self = Self(128);
pub const UNLIT: Self = Self(256);
#[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 LayerShadingFlag {
type Output = Self;
#[inline]
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl core::ops::BitAnd for LayerShadingFlag {
type Output = Self;
#[inline]
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl core::ops::Not for LayerShadingFlag {
type Output = Self;
#[inline]
fn not(self) -> Self {
Self(!self.0)
}
}
impl core::fmt::Debug for LayerShadingFlag {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "LayerShadingFlag({:#x})", self.0)
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum LayerSlotType {
DiffuseMap = 0,
NormalMap = 1,
ORMMap = 2,
EmissiveMap = 3,
TeamColor = 4,
EnvironmentMap = 5,
Unknown = 6,
}
impl TryFrom<i32> for LayerSlotType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(LayerSlotType::DiffuseMap),
1 => Ok(LayerSlotType::NormalMap),
2 => Ok(LayerSlotType::ORMMap),
3 => Ok(LayerSlotType::EmissiveMap),
4 => Ok(LayerSlotType::TeamColor),
5 => Ok(LayerSlotType::EnvironmentMap),
6 => Ok(LayerSlotType::Unknown),
other => Err(crate::Error::UnknownEnum {
name: "LayerSlotType",
value: other,
}),
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct MaterialFlag(pub i32);
impl MaterialFlag {
pub const NONE: Self = Self(0);
pub const CONSTANT_COLOR: Self = Self(1);
pub const TWO_SIDED: Self = Self(2);
pub const UNFOGGED: Self = Self(4);
pub const SORT_PRIMS_NEAR_Z: Self = Self(8);
pub const SORT_PRIMS_FAR_Z: Self = Self(16);
pub const SORT_PRIMITIVES: Self = Self(16);
pub const FULL_RESOLUTION: Self = Self(32);
#[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 GeosetAnimationFlag {
None = 0,
DropShadow = 1,
Color = 2,
}
impl TryFrom<i32> for GeosetAnimationFlag {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(GeosetAnimationFlag::None),
1 => Ok(GeosetAnimationFlag::DropShadow),
2 => Ok(GeosetAnimationFlag::Color),
other => Err(crate::Error::UnknownEnum {
name: "GeosetAnimationFlag",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum LightType {
Omni = 0,
Directional = 1,
Ambient = 2,
}
impl TryFrom<i32> for LightType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(LightType::Omni),
1 => Ok(LightType::Directional),
2 => Ok(LightType::Ambient),
other => Err(crate::Error::UnknownEnum {
name: "LightType",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum CollisionShapeShapeType {
Box = 0,
Plane = 1,
Sphere = 2,
Cylinder = 3,
}
impl TryFrom<i32> for CollisionShapeShapeType {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(CollisionShapeShapeType::Box),
1 => Ok(CollisionShapeShapeType::Plane),
2 => Ok(CollisionShapeShapeType::Sphere),
3 => Ok(CollisionShapeShapeType::Cylinder),
other => Err(crate::Error::UnknownEnum {
name: "CollisionShapeShapeType",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum MDLXFormat {
MDX = 0,
MDL = 1,
}
impl TryFrom<i32> for MDLXFormat {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(MDLXFormat::MDX),
1 => Ok(MDLXFormat::MDL),
other => Err(crate::Error::UnknownEnum {
name: "MDLXFormat",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum UpgradeMode {
UpgradeOldVersions = 0,
PreserveOriginal = 1,
}
impl TryFrom<i32> for UpgradeMode {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(UpgradeMode::UpgradeOldVersions),
1 => Ok(UpgradeMode::PreserveOriginal),
other => Err(crate::Error::UnknownEnum {
name: "UpgradeMode",
value: other,
}),
}
}
}
#[repr(i32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum MdlFormat {
WarcraftIII = 0,
Hiveworkshop = 1,
}
impl TryFrom<i32> for MdlFormat {
type Error = crate::Error;
fn try_from(v: i32) -> Result<Self, crate::Error> {
match v {
0 => Ok(MdlFormat::WarcraftIII),
1 => Ok(MdlFormat::Hiveworkshop),
other => Err(crate::Error::UnknownEnum {
name: "MdlFormat",
value: other,
}),
}
}
}
pub struct Extent {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxExtent>,
}
impl Drop for Extent {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxExtent_delete(self.raw.as_ptr()) }
}
}
impl Extent {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxExtent) -> 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_mdx_MdxExtent_new();
Self::from_raw(raw).expect("native Extent allocation failed")
}
}
pub fn bounds_radius(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxExtent_get_boundsRadius(self.raw.as_ptr()) }
}
pub fn set_bounds_radius(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxExtent_set_boundsRadius(self.raw.as_ptr(), value) }
}
pub fn minimum(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxExtent_get_minimum(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_minimum(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxExtent_set_minimum(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn maximum(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxExtent_get_maximum(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_maximum(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxExtent_set_maximum(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
}
impl Default for Extent {
fn default() -> Self {
Self::new()
}
}
pub struct Model {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxModel>,
}
impl Drop for Model {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxModel_delete(self.raw.as_ptr()) }
}
}
impl Model {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxModel) -> 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_mdx_MdxModel_new();
Self::from_raw(raw).expect("native Model allocation failed")
}
}
pub fn version(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxModel_get_version(self.raw.as_ptr()) }
}
pub fn set_version(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxModel_set_version(self.raw.as_ptr(), value) }
}
pub fn model_name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_set_modelName(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn animation_file_name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxModel_get_animationFileName(
self.raw.as_ptr(),
))
}
}
pub fn set_animation_file_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe {
ffi::whiteout_mdx_MdxModel_set_animationFileName(self.raw.as_ptr(), value.as_ptr())
}
}
pub fn model_extent(&self) -> crate::support::Ref<'_, Extent> {
unsafe {
crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_modelExtent(
self.raw.as_ptr(),
)),
})
}
}
pub fn model_extent_mut(&mut self) -> crate::support::RefMut<'_, Extent> {
unsafe {
crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_modelExtent(
self.raw.as_ptr(),
)),
})
}
}
pub fn blend_time(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxModel_get_blendTime(self.raw.as_ptr()) }
}
pub fn set_blend_time(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxModel_set_blendTime(self.raw.as_ptr(), value) }
}
pub fn global_sequences(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxModel_get_globalSequences_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxModel_get_globalSequences_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn global_sequences_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxModel_get_globalSequences_count(self.raw.as_ptr());
let p =
ffi::whiteout_mdx_MdxModel_get_globalSequences_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_global_sequences(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxModel_assign_globalSequences(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_global_sequences(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_globalSequences(self.raw.as_ptr(), count) }
}
pub fn sequences_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_sequences(self.raw.as_ptr(), count) }
}
pub fn textures_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_textures(self.raw.as_ptr(), count) }
}
pub fn sounds_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_sounds_count(self.raw.as_ptr()) }
}
pub fn sounds(&self, index: usize) -> Option<crate::support::Ref<'_, Sound>> {
if index >= self.sounds_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Sound {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_sounds_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn sounds_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Sound>> {
if index >= self.sounds_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Sound {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_sounds_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn sounds_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Sound>> {
(0..self.sounds_len()).map(move |i| self.sounds(i).expect("index below len"))
}
pub fn resize_sounds(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_sounds(self.raw.as_ptr(), count) }
}
pub fn sound_emitters_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_soundEmitters_count(self.raw.as_ptr()) }
}
pub fn sound_emitters(&self, index: usize) -> Option<crate::support::Ref<'_, SoundEmitter>> {
if index >= self.sound_emitters_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(SoundEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_soundEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn sound_emitters_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, SoundEmitter>> {
if index >= self.sound_emitters_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(SoundEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_soundEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn sound_emitters_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, SoundEmitter>> {
(0..self.sound_emitters_len())
.map(move |i| self.sound_emitters(i).expect("index below len"))
}
pub fn resize_sound_emitters(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_soundEmitters(self.raw.as_ptr(), count) }
}
pub fn materials_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_materials(self.raw.as_ptr(), count) }
}
pub fn texture_animations_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_textureAnimations_count(self.raw.as_ptr()) }
}
pub fn texture_animations(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, TextureAnimation>> {
if index >= self.texture_animations_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(TextureAnimation {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_textureAnimations_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn texture_animations_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, TextureAnimation>> {
if index >= self.texture_animations_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(TextureAnimation {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_textureAnimations_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn texture_animations_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, TextureAnimation>> {
(0..self.texture_animations_len())
.map(move |i| self.texture_animations(i).expect("index below len"))
}
pub fn resize_texture_animations(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_textureAnimations(self.raw.as_ptr(), count) }
}
pub fn geosets_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_geosets_count(self.raw.as_ptr()) }
}
pub fn geosets(&self, index: usize) -> Option<crate::support::Ref<'_, Geoset>> {
if index >= self.geosets_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Geoset {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_geosets_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn geosets_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Geoset>> {
if index >= self.geosets_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Geoset {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_geosets_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn geosets_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Geoset>> {
(0..self.geosets_len()).map(move |i| self.geosets(i).expect("index below len"))
}
pub fn resize_geosets(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_geosets(self.raw.as_ptr(), count) }
}
pub fn geoset_animations_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_geosetAnimations_count(self.raw.as_ptr()) }
}
pub fn geoset_animations(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, GeosetAnimation>> {
if index >= self.geoset_animations_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(GeosetAnimation {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_geosetAnimations_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn geoset_animations_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, GeosetAnimation>> {
if index >= self.geoset_animations_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(GeosetAnimation {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_geosetAnimations_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn geoset_animations_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, GeosetAnimation>> {
(0..self.geoset_animations_len())
.map(move |i| self.geoset_animations(i).expect("index below len"))
}
pub fn resize_geoset_animations(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_geosetAnimations(self.raw.as_ptr(), count) }
}
pub fn bones_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_bones(self.raw.as_ptr(), count) }
}
pub fn helpers_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_helpers_count(self.raw.as_ptr()) }
}
pub fn helpers(&self, index: usize) -> Option<crate::support::Ref<'_, Helper>> {
if index >= self.helpers_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Helper {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_helpers_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn helpers_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Helper>> {
if index >= self.helpers_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Helper {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxModel_get_helpers_at(
self.raw.as_ptr(),
index,
)),
}))
}
}
pub fn helpers_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Helper>> {
(0..self.helpers_len()).map(move |i| self.helpers(i).expect("index below len"))
}
pub fn resize_helpers(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_helpers(self.raw.as_ptr(), count) }
}
pub fn attachments_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_attachments(self.raw.as_ptr(), count) }
}
pub fn pivot_points(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxModel_get_pivotPoints_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxModel_get_pivotPoints_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 pivot_points_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxModel_get_pivotPoints_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxModel_get_pivotPoints_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_pivot_points(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_mdx_MdxModel_assign_pivotPoints(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_pivot_points(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_pivotPoints(self.raw.as_ptr(), count) }
}
pub fn lights_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_lights(self.raw.as_ptr(), count) }
}
pub fn particle_emitters_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_particleEmitters(self.raw.as_ptr(), count) }
}
pub fn particle_emitters_2_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_particleEmitters2_count(self.raw.as_ptr()) }
}
pub fn particle_emitters_2(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, ParticleEmitter2>> {
if index >= self.particle_emitters_2_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(ParticleEmitter2 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_particleEmitters2_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn particle_emitters_2_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, ParticleEmitter2>> {
if index >= self.particle_emitters_2_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(ParticleEmitter2 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_particleEmitters2_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn particle_emitters_2_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, ParticleEmitter2>> {
(0..self.particle_emitters_2_len())
.map(move |i| self.particle_emitters_2(i).expect("index below len"))
}
pub fn resize_particle_emitters_2(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_particleEmitters2(self.raw.as_ptr(), count) }
}
pub fn ribbon_emitters_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_ribbonEmitters(self.raw.as_ptr(), count) }
}
pub fn corn_emitters_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_cornEmitters_count(self.raw.as_ptr()) }
}
pub fn corn_emitters(&self, index: usize) -> Option<crate::support::Ref<'_, CornEmitter>> {
if index >= self.corn_emitters_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(CornEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_cornEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn corn_emitters_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, CornEmitter>> {
if index >= self.corn_emitters_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(CornEmitter {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_cornEmitters_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn corn_emitters_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, CornEmitter>> {
(0..self.corn_emitters_len()).map(move |i| self.corn_emitters(i).expect("index below len"))
}
pub fn resize_corn_emitters(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_cornEmitters(self.raw.as_ptr(), count) }
}
pub fn event_objects_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_eventObjects_count(self.raw.as_ptr()) }
}
pub fn event_objects(&self, index: usize) -> Option<crate::support::Ref<'_, EventObject>> {
if index >= self.event_objects_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(EventObject {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_eventObjects_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn event_objects_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, EventObject>> {
if index >= self.event_objects_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(EventObject {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_eventObjects_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn event_objects_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, EventObject>> {
(0..self.event_objects_len()).map(move |i| self.event_objects(i).expect("index below len"))
}
pub fn resize_event_objects(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_eventObjects(self.raw.as_ptr(), count) }
}
pub fn cameras_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_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_mdx_MdxModel_resize_cameras(self.raw.as_ptr(), count) }
}
pub fn collision_shapes_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_collisionShapes_count(self.raw.as_ptr()) }
}
pub fn collision_shapes(
&self,
index: usize,
) -> Option<crate::support::Ref<'_, CollisionShape>> {
if index >= self.collision_shapes_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(CollisionShape {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_collisionShapes_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn collision_shapes_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, CollisionShape>> {
if index >= self.collision_shapes_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(CollisionShape {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_collisionShapes_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn collision_shapes_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, CollisionShape>> {
(0..self.collision_shapes_len())
.map(move |i| self.collision_shapes(i).expect("index below len"))
}
pub fn resize_collision_shapes(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_collisionShapes(self.raw.as_ptr(), count) }
}
pub fn face_effects_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxModel_get_faceEffects_count(self.raw.as_ptr()) }
}
pub fn face_effects(&self, index: usize) -> Option<crate::support::Ref<'_, FaceEffect>> {
if index >= self.face_effects_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(FaceEffect {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_faceEffects_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn face_effects_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, FaceEffect>> {
if index >= self.face_effects_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(FaceEffect {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxModel_get_faceEffects_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn face_effects_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, FaceEffect>> {
(0..self.face_effects_len()).map(move |i| self.face_effects(i).expect("index below len"))
}
pub fn resize_face_effects(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxModel_resize_faceEffects(self.raw.as_ptr(), count) }
}
}
impl Default for Model {
fn default() -> Self {
Self::new()
}
}
pub struct Sequence {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxSequence>,
}
impl Drop for Sequence {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxSequence_delete(self.raw.as_ptr()) }
}
}
impl Sequence {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxSequence) -> 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_mdx_MdxSequence_new();
Self::from_raw(raw).expect("native Sequence allocation failed")
}
}
pub fn name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxSequence_get_name(self.raw.as_ptr()))
}
}
pub fn set_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxSequence_set_name(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn interval_start(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxSequence_get_intervalStart(self.raw.as_ptr()) }
}
pub fn set_interval_start(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxSequence_set_intervalStart(self.raw.as_ptr(), value) }
}
pub fn interval_end(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxSequence_get_intervalEnd(self.raw.as_ptr()) }
}
pub fn set_interval_end(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxSequence_set_intervalEnd(self.raw.as_ptr(), value) }
}
pub fn move_speed(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxSequence_get_moveSpeed(self.raw.as_ptr()) }
}
pub fn set_move_speed(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxSequence_set_moveSpeed(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> SequenceFlag {
unsafe { ffi::whiteout_mdx_MdxSequence_get_flags(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_flags(&mut self, value: SequenceFlag) {
unsafe { ffi::whiteout_mdx_MdxSequence_set_flags(self.raw.as_ptr(), value as i32) }
}
pub fn rarity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxSequence_get_rarity(self.raw.as_ptr()) }
}
pub fn set_rarity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxSequence_set_rarity(self.raw.as_ptr(), value) }
}
pub fn sync_point(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxSequence_get_syncPoint(self.raw.as_ptr()) }
}
pub fn set_sync_point(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxSequence_set_syncPoint(self.raw.as_ptr(), value) }
}
pub fn extent(&self) -> crate::support::Ref<'_, Extent> {
unsafe {
crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxSequence_get_extent(
self.raw.as_ptr(),
)),
})
}
}
pub fn extent_mut(&mut self) -> crate::support::RefMut<'_, Extent> {
unsafe {
crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxSequence_get_extent(
self.raw.as_ptr(),
)),
})
}
}
}
impl Default for Sequence {
fn default() -> Self {
Self::new()
}
}
pub struct Texture {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxTexture>,
}
impl Drop for Texture {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxTexture_delete(self.raw.as_ptr()) }
}
}
impl Texture {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxTexture) -> 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_mdx_MdxTexture_new();
Self::from_raw(raw).expect("native Texture allocation failed")
}
}
pub fn replaceable_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxTexture_get_replaceableId(self.raw.as_ptr()) }
}
pub fn set_replaceable_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxTexture_set_replaceableId(self.raw.as_ptr(), value) }
}
pub fn file_name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxTexture_get_fileName(
self.raw.as_ptr(),
))
}
}
pub fn set_file_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxTexture_set_fileName(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn flags(&self) -> SequenceFlag {
unsafe { ffi::whiteout_mdx_MdxTexture_get_flags(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_flags(&mut self, value: SequenceFlag) {
unsafe { ffi::whiteout_mdx_MdxTexture_set_flags(self.raw.as_ptr(), value as i32) }
}
}
impl Default for Texture {
fn default() -> Self {
Self::new()
}
}
pub struct Sound {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxSound>,
}
impl Drop for Sound {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxSound_delete(self.raw.as_ptr()) }
}
}
impl Sound {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxSound) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Sound { raw })
}
}
unsafe impl Send for Sound {}
impl core::fmt::Debug for Sound {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Sound").finish_non_exhaustive()
}
}
impl Sound {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxSound_new();
Self::from_raw(raw).expect("native Sound allocation failed")
}
}
pub fn sound_file(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxSound_get_soundFile(self.raw.as_ptr()))
}
}
pub fn set_sound_file(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxSound_set_soundFile(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn maximum_distance(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxSound_get_maximumDistance(self.raw.as_ptr()) }
}
pub fn set_maximum_distance(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxSound_set_maximumDistance(self.raw.as_ptr(), value) }
}
pub fn minimum_distance(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxSound_get_minimumDistance(self.raw.as_ptr()) }
}
pub fn set_minimum_distance(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxSound_set_minimumDistance(self.raw.as_ptr(), value) }
}
pub fn sound_channel(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxSound_get_soundChannel(self.raw.as_ptr()) }
}
pub fn set_sound_channel(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxSound_set_soundChannel(self.raw.as_ptr(), value) }
}
}
impl Default for Sound {
fn default() -> Self {
Self::new()
}
}
pub struct Node {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxNode>,
}
impl Drop for Node {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxNode_delete(self.raw.as_ptr()) }
}
}
impl Node {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxNode) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Node { raw })
}
}
unsafe impl Send for Node {}
impl core::fmt::Debug for Node {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Node").finish_non_exhaustive()
}
}
impl Node {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxNode_new();
Self::from_raw(raw).expect("native Node allocation failed")
}
}
pub fn name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxNode_get_name(self.raw.as_ptr()))
}
}
pub fn set_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxNode_set_name(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn object_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxNode_get_objectId(self.raw.as_ptr()) }
}
pub fn set_object_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxNode_set_objectId(self.raw.as_ptr(), value) }
}
pub fn parent_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxNode_get_parentId(self.raw.as_ptr()) }
}
pub fn set_parent_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxNode_set_parentId(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> NodeFlag {
NodeFlag(unsafe { ffi::whiteout_mdx_MdxNode_get_flags(self.raw.as_ptr()) })
}
pub fn set_flags(&mut self, value: NodeFlag) {
unsafe { ffi::whiteout_mdx_MdxNode_set_flags(self.raw.as_ptr(), value.0) }
}
pub fn type_(&self) -> NodeType {
unsafe { ffi::whiteout_mdx_MdxNode_get_type(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_type_(&mut self, value: NodeType) {
unsafe { ffi::whiteout_mdx_MdxNode_set_type(self.raw.as_ptr(), value as i32) }
}
pub fn node_family_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxNode_get_nodeFamilyId(self.raw.as_ptr()) }
}
pub fn set_node_family_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxNode_set_nodeFamilyId(self.raw.as_ptr(), value) }
}
pub fn translation_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxNode_get_translationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn translation_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxNode_get_translationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn rotation_tracks(&self) -> crate::support::Ref<'_, TrackQuaternion> {
unsafe {
crate::support::Ref::new(TrackQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxNode_get_rotationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn rotation_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackQuaternion> {
unsafe {
crate::support::RefMut::new(TrackQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxNode_get_rotationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn scaling_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxNode_get_scalingTracks(self.raw.as_ptr()),
),
})
}
}
pub fn scaling_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxNode_get_scalingTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for Node {
fn default() -> Self {
Self::new()
}
}
pub struct SoundEmitter {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxSoundEmitter>,
}
impl Drop for SoundEmitter {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxSoundEmitter_delete(self.raw.as_ptr()) }
}
}
impl SoundEmitter {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxSoundEmitter) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| SoundEmitter { raw })
}
}
unsafe impl Send for SoundEmitter {}
impl core::fmt::Debug for SoundEmitter {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("SoundEmitter").finish_non_exhaustive()
}
}
impl SoundEmitter {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxSoundEmitter_new();
Self::from_raw(raw).expect("native SoundEmitter allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxSoundEmitter_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxSoundEmitter_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn sound_track(&self) -> crate::support::Ref<'_, TrackU32> {
unsafe {
crate::support::Ref::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxSoundEmitter_get_soundTrack(self.raw.as_ptr()),
),
})
}
}
pub fn sound_track_mut(&mut self) -> crate::support::RefMut<'_, TrackU32> {
unsafe {
crate::support::RefMut::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxSoundEmitter_get_soundTrack(self.raw.as_ptr()),
),
})
}
}
}
impl Default for SoundEmitter {
fn default() -> Self {
Self::new()
}
}
pub struct Layer {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxLayer>,
}
impl Drop for Layer {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxLayer_delete(self.raw.as_ptr()) }
}
}
impl Layer {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxLayer) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Layer { raw })
}
}
unsafe impl Send for Layer {}
impl core::fmt::Debug for Layer {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Layer").finish_non_exhaustive()
}
}
impl Layer {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxLayer_new();
Self::from_raw(raw).expect("native Layer allocation failed")
}
}
pub fn filter_mode(&self) -> LayerFilterMode {
unsafe { ffi::whiteout_mdx_MdxLayer_get_filterMode(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_filter_mode(&mut self, value: LayerFilterMode) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_filterMode(self.raw.as_ptr(), value as i32) }
}
pub fn shading_flags(&self) -> LayerShadingFlag {
LayerShadingFlag(unsafe { ffi::whiteout_mdx_MdxLayer_get_shadingFlags(self.raw.as_ptr()) })
}
pub fn set_shading_flags(&mut self, value: LayerShadingFlag) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_shadingFlags(self.raw.as_ptr(), value.0) }
}
pub fn texture_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_textureId(self.raw.as_ptr()) }
}
pub fn set_texture_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_textureId(self.raw.as_ptr(), value) }
}
pub fn texture_animation_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_textureAnimationId(self.raw.as_ptr()) }
}
pub fn set_texture_animation_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_textureAnimationId(self.raw.as_ptr(), value) }
}
pub fn coord_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_coordId(self.raw.as_ptr()) }
}
pub fn set_coord_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_coordId(self.raw.as_ptr(), value) }
}
pub fn alpha(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_alpha(self.raw.as_ptr()) }
}
pub fn set_alpha(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_alpha(self.raw.as_ptr(), value) }
}
pub fn emissive_gain(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_emissiveGain(self.raw.as_ptr()) }
}
pub fn set_emissive_gain(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_emissiveGain(self.raw.as_ptr(), value) }
}
pub fn fresnel_color(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxLayer_get_fresnelColor(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_fresnel_color(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxLayer_set_fresnelColor(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn fresnel_opacity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_fresnelOpacity(self.raw.as_ptr()) }
}
pub fn set_fresnel_opacity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_fresnelOpacity(self.raw.as_ptr(), value) }
}
pub fn fresnel_team_color(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLayer_get_fresnelTeamColor(self.raw.as_ptr()) }
}
pub fn set_fresnel_team_color(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_fresnelTeamColor(self.raw.as_ptr(), value) }
}
pub fn shader(&self) -> LayerShaderType {
unsafe { ffi::whiteout_mdx_MdxLayer_get_shader(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_shader(&mut self, value: LayerShaderType) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_shader(self.raw.as_ptr(), value as i32) }
}
pub fn is_hd(&self) -> bool {
unsafe { ffi::whiteout_mdx_MdxLayer_get_isHd(self.raw.as_ptr()) != 0 }
}
pub fn set_is_hd(&mut self, value: bool) {
unsafe { ffi::whiteout_mdx_MdxLayer_set_isHd(self.raw.as_ptr(), if value { 1 } else { 0 }) }
}
pub fn sub_textures_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxLayer_get_subTextures_count(self.raw.as_ptr()) }
}
pub fn sub_textures(&self, index: usize) -> Option<crate::support::Ref<'_, LayerSubTexture>> {
if index >= self.sub_textures_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(LayerSubTexture {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_subTextures_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn sub_textures_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, LayerSubTexture>> {
if index >= self.sub_textures_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(LayerSubTexture {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_subTextures_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn sub_textures_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, LayerSubTexture>> {
(0..self.sub_textures_len()).map(move |i| self.sub_textures(i).expect("index below len"))
}
pub fn resize_sub_textures(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxLayer_resize_subTextures(self.raw.as_ptr(), count) }
}
pub fn texture_id_tracks(&self) -> crate::support::Ref<'_, TrackU32> {
unsafe {
crate::support::Ref::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_textureIdTracks(self.raw.as_ptr()),
),
})
}
}
pub fn texture_id_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackU32> {
unsafe {
crate::support::RefMut::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_textureIdTracks(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxLayer_get_alphaTracks(
self.raw.as_ptr(),
)),
})
}
}
pub fn alpha_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxLayer_get_alphaTracks(
self.raw.as_ptr(),
)),
})
}
}
pub fn emissive_gain_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_emissiveGainTracks(self.raw.as_ptr()),
),
})
}
}
pub fn emissive_gain_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_emissiveGainTracks(self.raw.as_ptr()),
),
})
}
}
pub fn fresnel_color_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_fresnelColorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn fresnel_color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_fresnelColorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn fresnel_alpha_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_fresnelAlphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn fresnel_alpha_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_fresnelAlphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn fresnel_team_color_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_fresnelTeamColorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn fresnel_team_color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayer_get_fresnelTeamColorTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for Layer {
fn default() -> Self {
Self::new()
}
}
pub struct LayerSubTexture {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxLayerSubTexture>,
}
impl Drop for LayerSubTexture {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxLayerSubTexture_delete(self.raw.as_ptr()) }
}
}
impl LayerSubTexture {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxLayerSubTexture) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| LayerSubTexture { raw })
}
}
unsafe impl Send for LayerSubTexture {}
impl core::fmt::Debug for LayerSubTexture {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("LayerSubTexture").finish_non_exhaustive()
}
}
impl LayerSubTexture {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxLayerSubTexture_new();
Self::from_raw(raw).expect("native LayerSubTexture allocation failed")
}
}
pub fn texture_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxLayerSubTexture_get_textureId(self.raw.as_ptr()) }
}
pub fn set_texture_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxLayerSubTexture_set_textureId(self.raw.as_ptr(), value) }
}
pub fn slot(&self) -> LayerSlotType {
unsafe { ffi::whiteout_mdx_MdxLayerSubTexture_get_slot(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_slot(&mut self, value: LayerSlotType) {
unsafe { ffi::whiteout_mdx_MdxLayerSubTexture_set_slot(self.raw.as_ptr(), value as i32) }
}
pub fn tracks(&self) -> crate::support::Ref<'_, TrackU32> {
unsafe {
crate::support::Ref::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayerSubTexture_get_tracks(self.raw.as_ptr()),
),
})
}
}
pub fn tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackU32> {
unsafe {
crate::support::RefMut::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLayerSubTexture_get_tracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for LayerSubTexture {
fn default() -> Self {
Self::new()
}
}
pub struct Material {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxMaterial>,
}
impl Drop for Material {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxMaterial_delete(self.raw.as_ptr()) }
}
}
impl Material {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxMaterial) -> 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_mdx_MdxMaterial_new();
Self::from_raw(raw).expect("native Material allocation failed")
}
}
pub fn priority_plane(&self) -> i32 {
unsafe { ffi::whiteout_mdx_MdxMaterial_get_priorityPlane(self.raw.as_ptr()) }
}
pub fn set_priority_plane(&mut self, value: i32) {
unsafe { ffi::whiteout_mdx_MdxMaterial_set_priorityPlane(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> SequenceFlag {
unsafe { ffi::whiteout_mdx_MdxMaterial_get_flags(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_flags(&mut self, value: SequenceFlag) {
unsafe { ffi::whiteout_mdx_MdxMaterial_set_flags(self.raw.as_ptr(), value as i32) }
}
pub fn shader(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxMaterial_get_shader(self.raw.as_ptr()))
}
}
pub fn set_shader(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxMaterial_set_shader(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn layers_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxMaterial_get_layers_count(self.raw.as_ptr()) }
}
pub fn layers(&self, index: usize) -> Option<crate::support::Ref<'_, Layer>> {
if index >= self.layers_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Layer {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxMaterial_get_layers_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn layers_mut(&mut self, index: usize) -> Option<crate::support::RefMut<'_, Layer>> {
if index >= self.layers_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Layer {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxMaterial_get_layers_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn layers_iter(&self) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Layer>> {
(0..self.layers_len()).map(move |i| self.layers(i).expect("index below len"))
}
pub fn resize_layers(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxMaterial_resize_layers(self.raw.as_ptr(), count) }
}
}
impl Default for Material {
fn default() -> Self {
Self::new()
}
}
pub struct TextureAnimation {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxTextureAnimation>,
}
impl Drop for TextureAnimation {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxTextureAnimation_delete(self.raw.as_ptr()) }
}
}
impl TextureAnimation {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxTextureAnimation) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TextureAnimation { raw })
}
}
unsafe impl Send for TextureAnimation {}
impl core::fmt::Debug for TextureAnimation {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TextureAnimation").finish_non_exhaustive()
}
}
impl TextureAnimation {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxTextureAnimation_new();
Self::from_raw(raw).expect("native TextureAnimation allocation failed")
}
}
pub fn translation_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxTextureAnimation_get_translationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn translation_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxTextureAnimation_get_translationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn rotation_tracks(&self) -> crate::support::Ref<'_, TrackQuaternion> {
unsafe {
crate::support::Ref::new(TrackQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxTextureAnimation_get_rotationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn rotation_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackQuaternion> {
unsafe {
crate::support::RefMut::new(TrackQuaternion {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxTextureAnimation_get_rotationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn scaling_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxTextureAnimation_get_scalingTracks(self.raw.as_ptr()),
),
})
}
}
pub fn scaling_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxTextureAnimation_get_scalingTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for TextureAnimation {
fn default() -> Self {
Self::new()
}
}
pub struct Geoset {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxGeoset>,
}
impl Drop for Geoset {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxGeoset_delete(self.raw.as_ptr()) }
}
}
impl Geoset {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxGeoset) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Geoset { raw })
}
}
unsafe impl Send for Geoset {}
impl core::fmt::Debug for Geoset {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Geoset").finish_non_exhaustive()
}
}
impl Geoset {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxGeoset_new();
Self::from_raw(raw).expect("native Geoset allocation failed")
}
}
pub fn vertex_positions(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_vertexPositions_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_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_mdx_MdxGeoset_get_vertexPositions_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_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_mdx_MdxGeoset_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_mdx_MdxGeoset_resize_vertexPositions(self.raw.as_ptr(), count) }
}
pub fn vertex_normals(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_vertexNormals_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_vertexNormals_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_normals_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_vertexNormals_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_vertexNormals_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_normals(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_vertexNormals(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_vertex_normals(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_vertexNormals(self.raw.as_ptr(), count) }
}
pub fn face_type_groups(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_faceTypeGroups_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_faceTypeGroups_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn face_type_groups_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_faceTypeGroups_count(self.raw.as_ptr());
let p =
ffi::whiteout_mdx_MdxGeoset_get_faceTypeGroups_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_face_type_groups(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_faceTypeGroups(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_face_type_groups(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_faceTypeGroups(self.raw.as_ptr(), count) }
}
pub fn face_groups(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_faceGroups_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_faceGroups_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn face_groups_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_faceGroups_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_faceGroups_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_face_groups(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_faceGroups(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_face_groups(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_faceGroups(self.raw.as_ptr(), count) }
}
pub fn faces(&self) -> &[u16] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_faces_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_faces_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn faces_mut(&mut self) -> &mut [u16] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_faces_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_faces_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_faces(&mut self, values: &[u16]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_faces(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_faces(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_faces(self.raw.as_ptr(), count) }
}
pub fn vertex_groups(&self) -> &[u8] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_vertexGroups_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_vertexGroups_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn vertex_groups_mut(&mut self) -> &mut [u8] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_vertexGroups_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_vertexGroups_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_vertex_groups(&mut self, values: &[u8]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_vertexGroups(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_vertex_groups(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_vertexGroups(self.raw.as_ptr(), count) }
}
pub fn matrix_groups(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_matrixGroups_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_matrixGroups_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn matrix_groups_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_matrixGroups_count(self.raw.as_ptr());
let p =
ffi::whiteout_mdx_MdxGeoset_get_matrixGroups_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_matrix_groups(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_matrixGroups(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_matrix_groups(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_matrixGroups(self.raw.as_ptr(), count) }
}
pub fn matrix_indices(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_matrixIndices_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_matrixIndices_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn matrix_indices_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_matrixIndices_count(self.raw.as_ptr());
let p =
ffi::whiteout_mdx_MdxGeoset_get_matrixIndices_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_matrix_indices(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_matrixIndices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_matrix_indices(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_matrixIndices(self.raw.as_ptr(), count) }
}
pub fn material_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxGeoset_get_materialId(self.raw.as_ptr()) }
}
pub fn set_material_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxGeoset_set_materialId(self.raw.as_ptr(), value) }
}
pub fn selection_group(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxGeoset_get_selectionGroup(self.raw.as_ptr()) }
}
pub fn set_selection_group(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxGeoset_set_selectionGroup(self.raw.as_ptr(), value) }
}
pub fn selection_flags(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxGeoset_get_selectionFlags(self.raw.as_ptr()) }
}
pub fn set_selection_flags(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxGeoset_set_selectionFlags(self.raw.as_ptr(), value) }
}
pub fn lod(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxGeoset_get_lod(self.raw.as_ptr()) }
}
pub fn set_lod(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxGeoset_set_lod(self.raw.as_ptr(), value) }
}
pub fn lod_name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxGeoset_get_lodName(self.raw.as_ptr()))
}
}
pub fn set_lod_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxGeoset_set_lodName(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn extent(&self) -> crate::support::Ref<'_, Extent> {
unsafe {
crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxGeoset_get_extent(
self.raw.as_ptr(),
)),
})
}
}
pub fn extent_mut(&mut self) -> crate::support::RefMut<'_, Extent> {
unsafe {
crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxGeoset_get_extent(
self.raw.as_ptr(),
)),
})
}
}
pub fn sequence_extents_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxGeoset_get_sequenceExtents_count(self.raw.as_ptr()) }
}
pub fn sequence_extents(&self, index: usize) -> Option<crate::support::Ref<'_, Extent>> {
if index >= self.sequence_extents_len() {
return None;
}
unsafe {
Some(crate::support::Ref::new(Extent {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxGeoset_get_sequenceExtents_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn sequence_extents_mut(
&mut self,
index: usize,
) -> Option<crate::support::RefMut<'_, Extent>> {
if index >= self.sequence_extents_len() {
return None;
}
unsafe {
Some(crate::support::RefMut::new(Extent {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxGeoset_get_sequenceExtents_at(self.raw.as_ptr(), index),
),
}))
}
}
pub fn sequence_extents_iter(
&self,
) -> impl ExactSizeIterator<Item = crate::support::Ref<'_, Extent>> {
(0..self.sequence_extents_len())
.map(move |i| self.sequence_extents(i).expect("index below len"))
}
pub fn resize_sequence_extents(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_sequenceExtents(self.raw.as_ptr(), count) }
}
pub fn tangents(&self) -> &[crate::math::Vector4f] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_tangents_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_tangents_data(self.raw.as_ptr())
as *const crate::math::Vector4f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn tangents_mut(&mut self) -> &mut [crate::math::Vector4f] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_tangents_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_tangents_data(self.raw.as_ptr())
as *const crate::math::Vector4f as *mut crate::math::Vector4f;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_tangents(&mut self, values: &[crate::math::Vector4f]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_tangents(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_tangents(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_tangents(self.raw.as_ptr(), count) }
}
pub fn skin_data(&self) -> &[u8] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_skinData_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_skinData_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn skin_data_mut(&mut self) -> &mut [u8] {
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_skinData_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxGeoset_get_skinData_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_skin_data(&mut self, values: &[u8]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_skinData(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_skin_data(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxGeoset_resize_skinData(self.raw.as_ptr(), count) }
}
pub fn texture_coordinate_sets_len(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxGeoset_get_textureCoordinateSets_count(self.raw.as_ptr()) }
}
pub fn texture_coordinate_sets(&self, outer: usize) -> &[crate::math::Vector2f] {
if outer >= self.texture_coordinate_sets_len() {
return &[];
}
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_textureCoordinateSets_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_mdx_MdxGeoset_get_textureCoordinateSets_inner_data(
self.raw.as_ptr(),
outer,
) as *const crate::math::Vector2f;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn texture_coordinate_sets_mut(&mut self, outer: usize) -> &mut [crate::math::Vector2f] {
if outer >= self.texture_coordinate_sets_len() {
return &mut [];
}
unsafe {
let n = ffi::whiteout_mdx_MdxGeoset_get_textureCoordinateSets_inner_count(
self.raw.as_ptr(),
outer,
);
let p = ffi::whiteout_mdx_MdxGeoset_get_textureCoordinateSets_inner_data(
self.raw.as_ptr(),
outer,
) 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_texture_coordinate_sets(&mut self, outer: usize, values: &[crate::math::Vector2f]) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_assign_textureCoordinateSets_inner(
self.raw.as_ptr(),
outer,
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_texture_coordinate_sets(&mut self, count: usize) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_resize_textureCoordinateSets(self.raw.as_ptr(), count)
}
}
pub fn resize_texture_coordinate_sets_inner(&mut self, outer: usize, count: usize) {
unsafe {
ffi::whiteout_mdx_MdxGeoset_resize_textureCoordinateSets_inner(
self.raw.as_ptr(),
outer,
count,
)
}
}
}
impl Default for Geoset {
fn default() -> Self {
Self::new()
}
}
pub struct GeosetAnimation {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxGeosetAnimation>,
}
impl Drop for GeosetAnimation {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_delete(self.raw.as_ptr()) }
}
}
impl GeosetAnimation {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxGeosetAnimation) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| GeosetAnimation { raw })
}
}
unsafe impl Send for GeosetAnimation {}
impl core::fmt::Debug for GeosetAnimation {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("GeosetAnimation").finish_non_exhaustive()
}
}
impl GeosetAnimation {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxGeosetAnimation_new();
Self::from_raw(raw).expect("native GeosetAnimation allocation failed")
}
}
pub fn alpha(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_get_alpha(self.raw.as_ptr()) }
}
pub fn set_alpha(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_set_alpha(self.raw.as_ptr(), value) }
}
pub fn flags(&self) -> SequenceFlag {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_get_flags(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_flags(&mut self, value: SequenceFlag) {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_set_flags(self.raw.as_ptr(), value as i32) }
}
pub fn color(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxGeosetAnimation_get_color(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_color(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxGeosetAnimation_set_color(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn geoset_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_get_geosetId(self.raw.as_ptr()) }
}
pub fn set_geoset_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxGeosetAnimation_set_geosetId(self.raw.as_ptr(), value) }
}
pub fn alpha_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxGeosetAnimation_get_alphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxGeosetAnimation_get_alphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxGeosetAnimation_get_colorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxGeosetAnimation_get_colorTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for GeosetAnimation {
fn default() -> Self {
Self::new()
}
}
pub struct Bone {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxBone>,
}
impl Drop for Bone {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxBone_delete(self.raw.as_ptr()) }
}
}
impl Bone {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxBone) -> 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_mdx_MdxBone_new();
Self::from_raw(raw).expect("native Bone allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxBone_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxBone_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn geoset_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxBone_get_geosetId(self.raw.as_ptr()) }
}
pub fn set_geoset_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxBone_set_geosetId(self.raw.as_ptr(), value) }
}
pub fn geoset_animation_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxBone_get_geosetAnimationId(self.raw.as_ptr()) }
}
pub fn set_geoset_animation_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxBone_set_geosetAnimationId(self.raw.as_ptr(), value) }
}
}
impl Default for Bone {
fn default() -> Self {
Self::new()
}
}
pub struct Light {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxLight>,
}
impl Drop for Light {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxLight_delete(self.raw.as_ptr()) }
}
}
impl Light {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxLight) -> 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_mdx_MdxLight_new();
Self::from_raw(raw).expect("native Light allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxLight_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxLight_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn type_(&self) -> LightType {
unsafe { ffi::whiteout_mdx_MdxLight_get_type(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_type_(&mut self, value: LightType) {
unsafe { ffi::whiteout_mdx_MdxLight_set_type(self.raw.as_ptr(), value as i32) }
}
pub fn attenuation_start(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLight_get_attenuationStart(self.raw.as_ptr()) }
}
pub fn set_attenuation_start(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLight_set_attenuationStart(self.raw.as_ptr(), value) }
}
pub fn attenuation_end(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLight_get_attenuationEnd(self.raw.as_ptr()) }
}
pub fn set_attenuation_end(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLight_set_attenuationEnd(self.raw.as_ptr(), value) }
}
pub fn color(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxLight_get_color(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_color(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxLight_set_color(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn intensity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLight_get_intensity(self.raw.as_ptr()) }
}
pub fn set_intensity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLight_set_intensity(self.raw.as_ptr(), value) }
}
pub fn ambient_color(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxLight_get_ambientColor(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_ambient_color(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxLight_set_ambientColor(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn ambient_intensity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLight_get_ambientIntensity(self.raw.as_ptr()) }
}
pub fn set_ambient_intensity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLight_set_ambientIntensity(self.raw.as_ptr(), value) }
}
pub fn shadow_intensity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxLight_get_shadowIntensity(self.raw.as_ptr()) }
}
pub fn set_shadow_intensity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxLight_set_shadowIntensity(self.raw.as_ptr(), value) }
}
pub fn attenuation_start_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_attenuationStartTracks(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_start_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_attenuationStartTracks(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_end_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_attenuationEndTracks(self.raw.as_ptr()),
),
})
}
}
pub fn attenuation_end_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_attenuationEndTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxLight_get_colorTracks(
self.raw.as_ptr(),
)),
})
}
}
pub fn color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxLight_get_colorTracks(
self.raw.as_ptr(),
)),
})
}
}
pub fn intensity_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_intensityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn intensity_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_intensityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn ambient_intensity_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_ambientIntensityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn ambient_intensity_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_ambientIntensityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn ambient_color_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_ambientColorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn ambient_color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_ambientColorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn shadow_intensity_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_shadowIntensityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn shadow_intensity_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxLight_get_shadowIntensityTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for Light {
fn default() -> Self {
Self::new()
}
}
pub struct Helper {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxHelper>,
}
impl Drop for Helper {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxHelper_delete(self.raw.as_ptr()) }
}
}
impl Helper {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxHelper) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| Helper { raw })
}
}
unsafe impl Send for Helper {}
impl core::fmt::Debug for Helper {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Helper").finish_non_exhaustive()
}
}
impl Helper {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxHelper_new();
Self::from_raw(raw).expect("native Helper allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxHelper_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxHelper_get_node(
self.raw.as_ptr(),
)),
})
}
}
}
impl Default for Helper {
fn default() -> Self {
Self::new()
}
}
pub struct Attachment {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxAttachment>,
}
impl Drop for Attachment {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxAttachment_delete(self.raw.as_ptr()) }
}
}
impl Attachment {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxAttachment) -> 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_mdx_MdxAttachment_new();
Self::from_raw(raw).expect("native Attachment allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxAttachment_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxAttachment_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn path(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxAttachment_get_path(self.raw.as_ptr()))
}
}
pub fn set_path(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxAttachment_set_path(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn attachment_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxAttachment_get_attachmentId(self.raw.as_ptr()) }
}
pub fn set_attachment_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxAttachment_set_attachmentId(self.raw.as_ptr(), value) }
}
pub fn visibility_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxAttachment_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxAttachment_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for Attachment {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleEmitter {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxParticleEmitter>,
}
impl Drop for ParticleEmitter {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_delete(self.raw.as_ptr()) }
}
}
impl ParticleEmitter {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxParticleEmitter) -> 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_mdx_MdxParticleEmitter_new();
Self::from_raw(raw).expect("native ParticleEmitter allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_get_emissionRate(self.raw.as_ptr()) }
}
pub fn set_emission_rate(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_set_emissionRate(self.raw.as_ptr(), value) }
}
pub fn gravity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_get_gravity(self.raw.as_ptr()) }
}
pub fn set_gravity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_set_gravity(self.raw.as_ptr(), value) }
}
pub fn longitude(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_get_longitude(self.raw.as_ptr()) }
}
pub fn set_longitude(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_set_longitude(self.raw.as_ptr(), value) }
}
pub fn latitude(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_get_latitude(self.raw.as_ptr()) }
}
pub fn set_latitude(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_set_latitude(self.raw.as_ptr(), value) }
}
pub fn spawn_model_file_name(&self) -> String {
unsafe {
crate::support::take_string(
ffi::whiteout_mdx_MdxParticleEmitter_get_spawnModelFileName(self.raw.as_ptr()),
)
}
}
pub fn set_spawn_model_file_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter_set_spawnModelFileName(
self.raw.as_ptr(),
value.as_ptr(),
)
}
}
pub fn lifespan(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_get_lifespan(self.raw.as_ptr()) }
}
pub fn set_lifespan(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_set_lifespan(self.raw.as_ptr(), value) }
}
pub fn initial_velocity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter_get_initialVelocity(self.raw.as_ptr()) }
}
pub fn set_initial_velocity(&mut self, value: f32) {
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter_set_initialVelocity(self.raw.as_ptr(), value)
}
}
pub fn emission_rate_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_emissionRateTracks(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_emissionRateTracks(self.raw.as_ptr()),
),
})
}
}
pub fn gravity_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_gravityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn gravity_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_gravityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn longitude_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_longitudeTracks(self.raw.as_ptr()),
),
})
}
}
pub fn longitude_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_longitudeTracks(self.raw.as_ptr()),
),
})
}
}
pub fn latitude_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_latitudeTracks(self.raw.as_ptr()),
),
})
}
}
pub fn latitude_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_latitudeTracks(self.raw.as_ptr()),
),
})
}
}
pub fn lifespan_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_lifespanTracks(self.raw.as_ptr()),
),
})
}
}
pub fn lifespan_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_lifespanTracks(self.raw.as_ptr()),
),
})
}
}
pub fn speed_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_speedTracks(self.raw.as_ptr()),
),
})
}
}
pub fn speed_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_speedTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for ParticleEmitter {
fn default() -> Self {
Self::new()
}
}
pub struct ParticleEmitter2 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxParticleEmitter2>,
}
impl Drop for ParticleEmitter2 {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_delete(self.raw.as_ptr()) }
}
}
impl ParticleEmitter2 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxParticleEmitter2) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| ParticleEmitter2 { raw })
}
}
unsafe impl Send for ParticleEmitter2 {}
impl core::fmt::Debug for ParticleEmitter2 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ParticleEmitter2").finish_non_exhaustive()
}
}
impl ParticleEmitter2 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxParticleEmitter2_new();
Self::from_raw(raw).expect("native ParticleEmitter2 allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn speed(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_speed(self.raw.as_ptr()) }
}
pub fn set_speed(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_speed(self.raw.as_ptr(), value) }
}
pub fn variation(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_variation(self.raw.as_ptr()) }
}
pub fn set_variation(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_variation(self.raw.as_ptr(), value) }
}
pub fn latitude(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_latitude(self.raw.as_ptr()) }
}
pub fn set_latitude(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_latitude(self.raw.as_ptr(), value) }
}
pub fn gravity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_gravity(self.raw.as_ptr()) }
}
pub fn set_gravity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_gravity(self.raw.as_ptr(), value) }
}
pub fn lifespan(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_lifespan(self.raw.as_ptr()) }
}
pub fn set_lifespan(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_lifespan(self.raw.as_ptr(), value) }
}
pub fn emission_rate(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_emissionRate(self.raw.as_ptr()) }
}
pub fn set_emission_rate(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_emissionRate(self.raw.as_ptr(), value) }
}
pub fn length(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_length(self.raw.as_ptr()) }
}
pub fn set_length(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_length(self.raw.as_ptr(), value) }
}
pub fn width(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_width(self.raw.as_ptr()) }
}
pub fn set_width(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_width(self.raw.as_ptr(), value) }
}
pub fn filter_mode(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_filterMode(self.raw.as_ptr()) }
}
pub fn set_filter_mode(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_filterMode(self.raw.as_ptr(), value) }
}
pub fn rows(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_rows(self.raw.as_ptr()) }
}
pub fn set_rows(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_rows(self.raw.as_ptr(), value) }
}
pub fn columns(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_columns(self.raw.as_ptr()) }
}
pub fn set_columns(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_columns(self.raw.as_ptr(), value) }
}
pub fn head_or_tail(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_headOrTail(self.raw.as_ptr()) }
}
pub fn set_head_or_tail(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_headOrTail(self.raw.as_ptr(), value) }
}
pub fn tail_length(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_tailLength(self.raw.as_ptr()) }
}
pub fn set_tail_length(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_tailLength(self.raw.as_ptr(), value) }
}
pub fn time(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_time(self.raw.as_ptr()) }
}
pub fn set_time(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_time(self.raw.as_ptr(), value) }
}
pub const fn segment_color_len() -> usize {
3
}
pub fn segment_color(&self, index: usize) -> crate::math::Vector3f {
assert!(
index < 3,
"segment_color index {index} out of range (len 3)"
);
unsafe {
*(ffi::whiteout_mdx_MdxParticleEmitter2_get_segmentColor_at(self.raw.as_ptr(), index)
as *const crate::math::Vector3f)
}
}
pub const fn segment_alpha_len() -> usize {
3
}
pub fn segment_alpha(&self, index: usize) -> u8 {
assert!(
index < 3,
"segment_alpha index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_get_segmentAlpha_at(self.raw.as_ptr(), index)
}
}
pub fn set_segment_alpha(&mut self, index: usize, value: u8) {
assert!(
index < 3,
"segment_alpha index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_set_segmentAlpha_at(
self.raw.as_ptr(),
index,
value,
)
}
}
pub const fn segment_scaling_len() -> usize {
3
}
pub fn segment_scaling(&self, index: usize) -> f32 {
assert!(
index < 3,
"segment_scaling index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_get_segmentScaling_at(self.raw.as_ptr(), index)
}
}
pub fn set_segment_scaling(&mut self, index: usize, value: f32) {
assert!(
index < 3,
"segment_scaling index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_set_segmentScaling_at(
self.raw.as_ptr(),
index,
value,
)
}
}
pub const fn head_interval_len() -> usize {
3
}
pub fn head_interval(&self, index: usize) -> u32 {
assert!(
index < 3,
"head_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_get_headInterval_at(self.raw.as_ptr(), index)
}
}
pub fn set_head_interval(&mut self, index: usize, value: u32) {
assert!(
index < 3,
"head_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_set_headInterval_at(
self.raw.as_ptr(),
index,
value,
)
}
}
pub const fn head_decay_interval_len() -> usize {
3
}
pub fn head_decay_interval(&self, index: usize) -> u32 {
assert!(
index < 3,
"head_decay_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_get_headDecayInterval_at(self.raw.as_ptr(), index)
}
}
pub fn set_head_decay_interval(&mut self, index: usize, value: u32) {
assert!(
index < 3,
"head_decay_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_set_headDecayInterval_at(
self.raw.as_ptr(),
index,
value,
)
}
}
pub const fn tail_interval_len() -> usize {
3
}
pub fn tail_interval(&self, index: usize) -> u32 {
assert!(
index < 3,
"tail_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_get_tailInterval_at(self.raw.as_ptr(), index)
}
}
pub fn set_tail_interval(&mut self, index: usize, value: u32) {
assert!(
index < 3,
"tail_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_set_tailInterval_at(
self.raw.as_ptr(),
index,
value,
)
}
}
pub const fn tail_decay_interval_len() -> usize {
3
}
pub fn tail_decay_interval(&self, index: usize) -> u32 {
assert!(
index < 3,
"tail_decay_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_get_tailDecayInterval_at(self.raw.as_ptr(), index)
}
}
pub fn set_tail_decay_interval(&mut self, index: usize, value: u32) {
assert!(
index < 3,
"tail_decay_interval index {index} out of range (len 3)"
);
unsafe {
ffi::whiteout_mdx_MdxParticleEmitter2_set_tailDecayInterval_at(
self.raw.as_ptr(),
index,
value,
)
}
}
pub fn texture_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_textureId(self.raw.as_ptr()) }
}
pub fn set_texture_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_textureId(self.raw.as_ptr(), value) }
}
pub fn squirt(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_squirt(self.raw.as_ptr()) }
}
pub fn set_squirt(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_squirt(self.raw.as_ptr(), value) }
}
pub fn priority_plane(&self) -> i32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_priorityPlane(self.raw.as_ptr()) }
}
pub fn set_priority_plane(&mut self, value: i32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_priorityPlane(self.raw.as_ptr(), value) }
}
pub fn replaceable_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_get_replaceableId(self.raw.as_ptr()) }
}
pub fn set_replaceable_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxParticleEmitter2_set_replaceableId(self.raw.as_ptr(), value) }
}
pub fn speed_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_speedTracks(self.raw.as_ptr()),
),
})
}
}
pub fn speed_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_speedTracks(self.raw.as_ptr()),
),
})
}
}
pub fn variation_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_variationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn variation_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_variationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn latitude_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_latitudeTracks(self.raw.as_ptr()),
),
})
}
}
pub fn latitude_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_latitudeTracks(self.raw.as_ptr()),
),
})
}
}
pub fn gravity_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_gravityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn gravity_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_gravityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_emissionRateTracks(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_emissionRateTracks(self.raw.as_ptr()),
),
})
}
}
pub fn length_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_lengthTracks(self.raw.as_ptr()),
),
})
}
}
pub fn length_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_lengthTracks(self.raw.as_ptr()),
),
})
}
}
pub fn width_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_widthTracks(self.raw.as_ptr()),
),
})
}
}
pub fn width_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_widthTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxParticleEmitter2_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for ParticleEmitter2 {
fn default() -> Self {
Self::new()
}
}
pub struct RibbonEmitter {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxRibbonEmitter>,
}
impl Drop for RibbonEmitter {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_delete(self.raw.as_ptr()) }
}
}
impl RibbonEmitter {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxRibbonEmitter) -> 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_mdx_MdxRibbonEmitter_new();
Self::from_raw(raw).expect("native RibbonEmitter allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn height_above(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_heightAbove(self.raw.as_ptr()) }
}
pub fn set_height_above(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_heightAbove(self.raw.as_ptr(), value) }
}
pub fn height_below(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_heightBelow(self.raw.as_ptr()) }
}
pub fn set_height_below(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_heightBelow(self.raw.as_ptr(), value) }
}
pub fn alpha(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_alpha(self.raw.as_ptr()) }
}
pub fn set_alpha(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_alpha(self.raw.as_ptr(), value) }
}
pub fn color(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxRibbonEmitter_get_color(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_color(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxRibbonEmitter_set_color(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn lifespan(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_lifespan(self.raw.as_ptr()) }
}
pub fn set_lifespan(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_lifespan(self.raw.as_ptr(), value) }
}
pub fn texture_slot(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_textureSlot(self.raw.as_ptr()) }
}
pub fn set_texture_slot(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_textureSlot(self.raw.as_ptr(), value) }
}
pub fn emission_rate(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_emissionRate(self.raw.as_ptr()) }
}
pub fn set_emission_rate(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_emissionRate(self.raw.as_ptr(), value) }
}
pub fn rows(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_rows(self.raw.as_ptr()) }
}
pub fn set_rows(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_rows(self.raw.as_ptr(), value) }
}
pub fn columns(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_columns(self.raw.as_ptr()) }
}
pub fn set_columns(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_columns(self.raw.as_ptr(), value) }
}
pub fn material_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_materialId(self.raw.as_ptr()) }
}
pub fn set_material_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_materialId(self.raw.as_ptr(), value) }
}
pub fn gravity(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_get_gravity(self.raw.as_ptr()) }
}
pub fn set_gravity(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxRibbonEmitter_set_gravity(self.raw.as_ptr(), value) }
}
pub fn height_above_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_heightAboveTracks(self.raw.as_ptr()),
),
})
}
}
pub fn height_above_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_heightAboveTracks(self.raw.as_ptr()),
),
})
}
}
pub fn height_below_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_heightBelowTracks(self.raw.as_ptr()),
),
})
}
}
pub fn height_below_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_heightBelowTracks(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_alphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_alphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_colorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_colorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn texture_slot_tracks(&self) -> crate::support::Ref<'_, TrackU32> {
unsafe {
crate::support::Ref::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_textureSlotTracks(self.raw.as_ptr()),
),
})
}
}
pub fn texture_slot_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackU32> {
unsafe {
crate::support::RefMut::new(TrackU32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_textureSlotTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxRibbonEmitter_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for RibbonEmitter {
fn default() -> Self {
Self::new()
}
}
pub struct EventObject {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxEventObject>,
}
impl Drop for EventObject {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxEventObject_delete(self.raw.as_ptr()) }
}
}
impl EventObject {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxEventObject) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| EventObject { raw })
}
}
unsafe impl Send for EventObject {}
impl core::fmt::Debug for EventObject {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("EventObject").finish_non_exhaustive()
}
}
impl EventObject {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxEventObject_new();
Self::from_raw(raw).expect("native EventObject allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxEventObject_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxEventObject_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn global_sequence_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxEventObject_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxEventObject_set_globalSequenceId(self.raw.as_ptr(), value) }
}
pub fn event_track_times(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxEventObject_get_eventTrackTimes_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxEventObject_get_eventTrackTimes_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn event_track_times_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxEventObject_get_eventTrackTimes_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxEventObject_get_eventTrackTimes_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_event_track_times(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxEventObject_assign_eventTrackTimes(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_event_track_times(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxEventObject_resize_eventTrackTimes(self.raw.as_ptr(), count) }
}
}
impl Default for EventObject {
fn default() -> Self {
Self::new()
}
}
pub struct Camera {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxCamera>,
}
impl Drop for Camera {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxCamera_delete(self.raw.as_ptr()) }
}
}
impl Camera {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxCamera) -> 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_mdx_MdxCamera_new();
Self::from_raw(raw).expect("native Camera allocation failed")
}
}
pub fn name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxCamera_get_name(self.raw.as_ptr()))
}
}
pub fn set_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxCamera_set_name(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxCamera_get_position(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxCamera_set_position(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn field_of_view(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCamera_get_fieldOfView(self.raw.as_ptr()) }
}
pub fn set_field_of_view(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCamera_set_fieldOfView(self.raw.as_ptr(), value) }
}
pub fn far_clipping_plane(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCamera_get_farClippingPlane(self.raw.as_ptr()) }
}
pub fn set_far_clipping_plane(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCamera_set_farClippingPlane(self.raw.as_ptr(), value) }
}
pub fn near_clipping_plane(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCamera_get_nearClippingPlane(self.raw.as_ptr()) }
}
pub fn set_near_clipping_plane(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCamera_set_nearClippingPlane(self.raw.as_ptr(), value) }
}
pub fn target_position(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxCamera_get_targetPosition(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_target_position(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxCamera_set_targetPosition(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn position_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCamera_get_positionTracks(self.raw.as_ptr()),
),
})
}
}
pub fn position_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCamera_get_positionTracks(self.raw.as_ptr()),
),
})
}
}
pub fn target_rotation_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCamera_get_targetRotationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn target_rotation_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCamera_get_targetRotationTracks(self.raw.as_ptr()),
),
})
}
}
pub fn target_position_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCamera_get_targetPositionTracks(self.raw.as_ptr()),
),
})
}
}
pub fn target_position_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCamera_get_targetPositionTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for Camera {
fn default() -> Self {
Self::new()
}
}
pub struct CollisionShape {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxCollisionShape>,
}
impl Drop for CollisionShape {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxCollisionShape_delete(self.raw.as_ptr()) }
}
}
impl CollisionShape {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxCollisionShape) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| CollisionShape { raw })
}
}
unsafe impl Send for CollisionShape {}
impl core::fmt::Debug for CollisionShape {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("CollisionShape").finish_non_exhaustive()
}
}
impl CollisionShape {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxCollisionShape_new();
Self::from_raw(raw).expect("native CollisionShape allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCollisionShape_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCollisionShape_get_node(self.raw.as_ptr()),
),
})
}
}
pub fn type_(&self) -> CollisionShapeShapeType {
unsafe { ffi::whiteout_mdx_MdxCollisionShape_get_type(self.raw.as_ptr()) }
.try_into()
.expect("unknown enum discriminant from the native library")
}
pub fn set_type_(&mut self, value: CollisionShapeShapeType) {
unsafe { ffi::whiteout_mdx_MdxCollisionShape_set_type(self.raw.as_ptr(), value as i32) }
}
pub fn vertices(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxCollisionShape_get_vertices_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxCollisionShape_get_vertices_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 vertices_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxCollisionShape_get_vertices_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxCollisionShape_get_vertices_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_vertices(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_mdx_MdxCollisionShape_assign_vertices(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_vertices(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxCollisionShape_resize_vertices(self.raw.as_ptr(), count) }
}
pub fn radius(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCollisionShape_get_radius(self.raw.as_ptr()) }
}
pub fn set_radius(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCollisionShape_set_radius(self.raw.as_ptr(), value) }
}
}
impl Default for CollisionShape {
fn default() -> Self {
Self::new()
}
}
pub struct FaceEffect {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxFaceEffect>,
}
impl Drop for FaceEffect {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxFaceEffect_delete(self.raw.as_ptr()) }
}
}
impl FaceEffect {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxFaceEffect) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| FaceEffect { raw })
}
}
unsafe impl Send for FaceEffect {}
impl core::fmt::Debug for FaceEffect {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("FaceEffect").finish_non_exhaustive()
}
}
impl FaceEffect {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxFaceEffect_new();
Self::from_raw(raw).expect("native FaceEffect allocation failed")
}
}
pub fn name(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxFaceEffect_get_name(self.raw.as_ptr()))
}
}
pub fn set_name(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxFaceEffect_set_name(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn path(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxFaceEffect_get_path(self.raw.as_ptr()))
}
}
pub fn set_path(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxFaceEffect_set_path(self.raw.as_ptr(), value.as_ptr()) }
}
}
impl Default for FaceEffect {
fn default() -> Self {
Self::new()
}
}
pub struct CornEmitter {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxCornEmitter>,
}
impl Drop for CornEmitter {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_delete(self.raw.as_ptr()) }
}
}
impl CornEmitter {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxCornEmitter) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| CornEmitter { raw })
}
}
unsafe impl Send for CornEmitter {}
impl core::fmt::Debug for CornEmitter {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("CornEmitter").finish_non_exhaustive()
}
}
impl CornEmitter {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxCornEmitter_new();
Self::from_raw(raw).expect("native CornEmitter allocation failed")
}
}
pub fn node(&self) -> crate::support::Ref<'_, Node> {
unsafe {
crate::support::Ref::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxCornEmitter_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn node_mut(&mut self) -> crate::support::RefMut<'_, Node> {
unsafe {
crate::support::RefMut::new(Node {
raw: core::ptr::NonNull::new_unchecked(ffi::whiteout_mdx_MdxCornEmitter_get_node(
self.raw.as_ptr(),
)),
})
}
}
pub fn life_span(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_get_lifeSpan(self.raw.as_ptr()) }
}
pub fn set_life_span(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_set_lifeSpan(self.raw.as_ptr(), value) }
}
pub fn emission_rate(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_get_emissionRate(self.raw.as_ptr()) }
}
pub fn set_emission_rate(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_set_emissionRate(self.raw.as_ptr(), value) }
}
pub fn speed(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_get_speed(self.raw.as_ptr()) }
}
pub fn set_speed(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_set_speed(self.raw.as_ptr(), value) }
}
pub fn color(&self) -> crate::math::Vector3f {
unsafe {
*(ffi::whiteout_mdx_MdxCornEmitter_get_color(self.raw.as_ptr())
as *const crate::math::Vector3f)
}
}
pub fn set_color(&mut self, value: crate::math::Vector3f) {
unsafe {
ffi::whiteout_mdx_MdxCornEmitter_set_color(
self.raw.as_ptr(),
&value as *const crate::math::Vector3f as *const _,
)
}
}
pub fn alpha(&self) -> f32 {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_get_alpha(self.raw.as_ptr()) }
}
pub fn set_alpha(&mut self, value: f32) {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_set_alpha(self.raw.as_ptr(), value) }
}
pub fn replaceable_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_get_replaceableId(self.raw.as_ptr()) }
}
pub fn set_replaceable_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxCornEmitter_set_replaceableId(self.raw.as_ptr(), value) }
}
pub fn path(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxCornEmitter_get_path(
self.raw.as_ptr(),
))
}
}
pub fn set_path(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe { ffi::whiteout_mdx_MdxCornEmitter_set_path(self.raw.as_ptr(), value.as_ptr()) }
}
pub fn anim_visibility_guide(&self) -> String {
unsafe {
crate::support::take_string(ffi::whiteout_mdx_MdxCornEmitter_get_animVisibilityGuide(
self.raw.as_ptr(),
))
}
}
pub fn set_anim_visibility_guide(&mut self, value: &str) {
let value = std::ffi::CString::new(value).unwrap_or_default();
unsafe {
ffi::whiteout_mdx_MdxCornEmitter_set_animVisibilityGuide(
self.raw.as_ptr(),
value.as_ptr(),
)
}
}
pub fn life_span_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_lifeSpanTracks(self.raw.as_ptr()),
),
})
}
}
pub fn life_span_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_lifeSpanTracks(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_emissionRateTracks(self.raw.as_ptr()),
),
})
}
}
pub fn emission_rate_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_emissionRateTracks(self.raw.as_ptr()),
),
})
}
}
pub fn speed_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_speedTracks(self.raw.as_ptr()),
),
})
}
}
pub fn speed_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_speedTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks(&self) -> crate::support::Ref<'_, TrackVector3f> {
unsafe {
crate::support::Ref::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_colorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn color_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackVector3f> {
unsafe {
crate::support::RefMut::new(TrackVector3f {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_colorTracks(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_alphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn alpha_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_alphaTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks(&self) -> crate::support::Ref<'_, TrackF32> {
unsafe {
crate::support::Ref::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
pub fn visibility_tracks_mut(&mut self) -> crate::support::RefMut<'_, TrackF32> {
unsafe {
crate::support::RefMut::new(TrackF32 {
raw: core::ptr::NonNull::new_unchecked(
ffi::whiteout_mdx_MdxCornEmitter_get_visibilityTracks(self.raw.as_ptr()),
),
})
}
}
}
impl Default for CornEmitter {
fn default() -> Self {
Self::new()
}
}
pub struct Parser {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxParser>,
}
impl Drop for Parser {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxParser_delete(self.raw.as_ptr()) }
}
}
impl Parser {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxParser) -> 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_mdx_MdxParser_new();
Self::from_raw(raw).expect("native Parser allocation failed")
}
}
pub fn parse_file(&mut self, file_path: &str) -> Option<Model> {
let file_path_cstr = std::ffi::CString::new(file_path).unwrap_or_default();
unsafe {
Model::from_raw(ffi::whiteout_mdx_MdxParser_parse(
self.raw.as_ptr(),
file_path_cstr.as_ptr(),
))
}
}
pub fn parse(&mut self, buffer: &[u8], format: MDLXFormat) -> Option<Model> {
unsafe {
Model::from_raw(ffi::whiteout_mdx_MdxParser_parse_buffer_format(
self.raw.as_ptr(),
buffer.as_ptr(),
buffer.len(),
format as i32,
))
}
}
pub fn has_issues(&self) -> bool {
unsafe { ffi::whiteout_mdx_MdxParser_hasIssues(self.raw.as_ptr()) != 0 }
}
pub fn issues(&self) -> Vec<String> {
unsafe {
let n = ffi::whiteout_mdx_MdxParser_getIssues_count(self.raw.as_ptr());
(0..n)
.map(|i| {
crate::support::take_string(ffi::whiteout_mdx_MdxParser_getIssues_at(
self.raw.as_ptr(),
i,
))
})
.collect()
}
}
}
impl Default for Parser {
fn default() -> Self {
Self::new()
}
}
pub struct Writer {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxWriter>,
}
impl Drop for Writer {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxWriter_delete(self.raw.as_ptr()) }
}
}
impl Writer {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxWriter) -> 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_mdx_MdxWriter_new();
Self::from_raw(raw).expect("native Writer allocation failed")
}
}
pub fn write_file(&mut self, file_path: &str, mdlx: &Model, mdl_format: MdlFormat) {
let file_path_cstr = std::ffi::CString::new(file_path).unwrap_or_default();
unsafe {
ffi::whiteout_mdx_MdxWriter_write(
self.raw.as_ptr(),
file_path_cstr.as_ptr(),
mdlx.raw.as_ptr(),
mdl_format as i32,
);
}
}
pub fn write(&mut self, mdx: &Model, format: MDLXFormat, mdl_format: MdlFormat) -> Bytes {
unsafe {
Bytes::from_raw(ffi::whiteout_mdx_MdxWriter_write_mdx_format_mdlFormat(
self.raw.as_ptr(),
mdx.raw.as_ptr(),
format as i32,
mdl_format as i32,
))
.unwrap_or_else(Bytes::empty)
}
}
}
impl Default for Writer {
fn default() -> Self {
Self::new()
}
}
pub struct TrackVector3f {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxTrackVector3f>,
}
impl Drop for TrackVector3f {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_delete(self.raw.as_ptr()) }
}
}
impl TrackVector3f {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxTrackVector3f) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TrackVector3f { raw })
}
}
unsafe impl Send for TrackVector3f {}
impl core::fmt::Debug for TrackVector3f {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TrackVector3f").finish_non_exhaustive()
}
}
impl TrackVector3f {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxTrackVector3f_new();
Self::from_raw(raw).expect("native TrackVector3f allocation failed")
}
}
pub fn is_used(&self) -> bool {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_get_isUsed(self.raw.as_ptr()) != 0 }
}
pub fn set_is_used(&mut self, value: bool) {
unsafe {
ffi::whiteout_mdx_MdxTrackVector3f_set_isUsed(
self.raw.as_ptr(),
if value { 1 } else { 0 },
)
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_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_mdx_MdxTrackVector3f_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_set_globalSequenceId(self.raw.as_ptr(), value) }
}
pub fn key_count(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_get_keyCount(self.raw.as_ptr()) }
}
pub fn set_key_count(&mut self, value: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_set_keyCount(self.raw.as_ptr(), value) }
}
pub fn timestamps(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackVector3f_get_timestamps_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackVector3f_get_timestamps_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackVector3f_get_timestamps_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackVector3f_get_timestamps_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_timestamps(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxTrackVector3f_assign_timestamps(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn keys(&self) -> &[crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackVector3f_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackVector3f_get_keys_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 keys_mut(&mut self) -> &mut [crate::math::Vector3f] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackVector3f_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackVector3f_get_keys_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_keys(&mut self, values: &[crate::math::Vector3f]) {
unsafe {
ffi::whiteout_mdx_MdxTrackVector3f_assign_keys(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_keys(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackVector3f_resize_keys(self.raw.as_ptr(), count) }
}
}
impl Default for TrackVector3f {
fn default() -> Self {
Self::new()
}
}
pub struct TrackQuaternion {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxTrackQuaternion>,
}
impl Drop for TrackQuaternion {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_delete(self.raw.as_ptr()) }
}
}
impl TrackQuaternion {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxTrackQuaternion) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TrackQuaternion { raw })
}
}
unsafe impl Send for TrackQuaternion {}
impl core::fmt::Debug for TrackQuaternion {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TrackQuaternion").finish_non_exhaustive()
}
}
impl TrackQuaternion {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxTrackQuaternion_new();
Self::from_raw(raw).expect("native TrackQuaternion allocation failed")
}
}
pub fn is_used(&self) -> bool {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_get_isUsed(self.raw.as_ptr()) != 0 }
}
pub fn set_is_used(&mut self, value: bool) {
unsafe {
ffi::whiteout_mdx_MdxTrackQuaternion_set_isUsed(
self.raw.as_ptr(),
if value { 1 } else { 0 },
)
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_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_mdx_MdxTrackQuaternion_set_interpolationType(
self.raw.as_ptr(),
value as i32,
)
}
}
pub fn global_sequence_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u32) {
unsafe {
ffi::whiteout_mdx_MdxTrackQuaternion_set_globalSequenceId(self.raw.as_ptr(), value)
}
}
pub fn key_count(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_get_keyCount(self.raw.as_ptr()) }
}
pub fn set_key_count(&mut self, value: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_set_keyCount(self.raw.as_ptr(), value) }
}
pub fn timestamps(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackQuaternion_get_timestamps_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackQuaternion_get_timestamps_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackQuaternion_get_timestamps_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackQuaternion_get_timestamps_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_timestamps(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxTrackQuaternion_assign_timestamps(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn keys(&self) -> &[crate::math::Quaternion] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackQuaternion_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackQuaternion_get_keys_data(self.raw.as_ptr())
as *const crate::math::Quaternion;
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn keys_mut(&mut self) -> &mut [crate::math::Quaternion] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackQuaternion_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackQuaternion_get_keys_data(self.raw.as_ptr())
as *const crate::math::Quaternion
as *mut crate::math::Quaternion;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_keys(&mut self, values: &[crate::math::Quaternion]) {
unsafe {
ffi::whiteout_mdx_MdxTrackQuaternion_assign_keys(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_keys(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackQuaternion_resize_keys(self.raw.as_ptr(), count) }
}
}
impl Default for TrackQuaternion {
fn default() -> Self {
Self::new()
}
}
pub struct TrackU32 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxTrackU32>,
}
impl Drop for TrackU32 {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxTrackU32_delete(self.raw.as_ptr()) }
}
}
impl TrackU32 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxTrackU32) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TrackU32 { raw })
}
}
unsafe impl Send for TrackU32 {}
impl core::fmt::Debug for TrackU32 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TrackU32").finish_non_exhaustive()
}
}
impl TrackU32 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxTrackU32_new();
Self::from_raw(raw).expect("native TrackU32 allocation failed")
}
}
pub fn is_used(&self) -> bool {
unsafe { ffi::whiteout_mdx_MdxTrackU32_get_isUsed(self.raw.as_ptr()) != 0 }
}
pub fn set_is_used(&mut self, value: bool) {
unsafe {
ffi::whiteout_mdx_MdxTrackU32_set_isUsed(self.raw.as_ptr(), if value { 1 } else { 0 })
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_mdx_MdxTrackU32_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_mdx_MdxTrackU32_set_interpolationType(self.raw.as_ptr(), value as i32)
}
}
pub fn global_sequence_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxTrackU32_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxTrackU32_set_globalSequenceId(self.raw.as_ptr(), value) }
}
pub fn key_count(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxTrackU32_get_keyCount(self.raw.as_ptr()) }
}
pub fn set_key_count(&mut self, value: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackU32_set_keyCount(self.raw.as_ptr(), value) }
}
pub fn timestamps(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackU32_get_timestamps_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackU32_get_timestamps_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackU32_get_timestamps_count(self.raw.as_ptr());
let p =
ffi::whiteout_mdx_MdxTrackU32_get_timestamps_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_timestamps(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxTrackU32_assign_timestamps(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackU32_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn keys(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackU32_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackU32_get_keys_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn keys_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackU32_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackU32_get_keys_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_keys(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxTrackU32_assign_keys(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_keys(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackU32_resize_keys(self.raw.as_ptr(), count) }
}
}
impl Default for TrackU32 {
fn default() -> Self {
Self::new()
}
}
pub struct TrackF32 {
pub(crate) raw: core::ptr::NonNull<ffi::whiteout_MdxTrackF32>,
}
impl Drop for TrackF32 {
fn drop(&mut self) {
unsafe { ffi::whiteout_mdx_MdxTrackF32_delete(self.raw.as_ptr()) }
}
}
impl TrackF32 {
#[allow(dead_code)] pub(crate) unsafe fn from_raw(raw: *mut ffi::whiteout_MdxTrackF32) -> Option<Self> {
core::ptr::NonNull::new(raw).map(|raw| TrackF32 { raw })
}
}
unsafe impl Send for TrackF32 {}
impl core::fmt::Debug for TrackF32 {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("TrackF32").finish_non_exhaustive()
}
}
impl TrackF32 {
pub fn new() -> Self {
unsafe {
let raw = ffi::whiteout_mdx_MdxTrackF32_new();
Self::from_raw(raw).expect("native TrackF32 allocation failed")
}
}
pub fn is_used(&self) -> bool {
unsafe { ffi::whiteout_mdx_MdxTrackF32_get_isUsed(self.raw.as_ptr()) != 0 }
}
pub fn set_is_used(&mut self, value: bool) {
unsafe {
ffi::whiteout_mdx_MdxTrackF32_set_isUsed(self.raw.as_ptr(), if value { 1 } else { 0 })
}
}
pub fn interpolation_type(&self) -> InterpolationType {
unsafe { ffi::whiteout_mdx_MdxTrackF32_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_mdx_MdxTrackF32_set_interpolationType(self.raw.as_ptr(), value as i32)
}
}
pub fn global_sequence_id(&self) -> u32 {
unsafe { ffi::whiteout_mdx_MdxTrackF32_get_globalSequenceId(self.raw.as_ptr()) }
}
pub fn set_global_sequence_id(&mut self, value: u32) {
unsafe { ffi::whiteout_mdx_MdxTrackF32_set_globalSequenceId(self.raw.as_ptr(), value) }
}
pub fn key_count(&self) -> usize {
unsafe { ffi::whiteout_mdx_MdxTrackF32_get_keyCount(self.raw.as_ptr()) }
}
pub fn set_key_count(&mut self, value: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackF32_set_keyCount(self.raw.as_ptr(), value) }
}
pub fn timestamps(&self) -> &[u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackF32_get_timestamps_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackF32_get_timestamps_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn timestamps_mut(&mut self) -> &mut [u32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackF32_get_timestamps_count(self.raw.as_ptr());
let p =
ffi::whiteout_mdx_MdxTrackF32_get_timestamps_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_timestamps(&mut self, values: &[u32]) {
unsafe {
ffi::whiteout_mdx_MdxTrackF32_assign_timestamps(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_timestamps(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackF32_resize_timestamps(self.raw.as_ptr(), count) }
}
pub fn keys(&self) -> &[f32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackF32_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackF32_get_keys_data(self.raw.as_ptr());
if p.is_null() || n == 0 {
&[]
} else {
core::slice::from_raw_parts(p, n)
}
}
}
pub fn keys_mut(&mut self) -> &mut [f32] {
unsafe {
let n = ffi::whiteout_mdx_MdxTrackF32_get_keys_count(self.raw.as_ptr());
let p = ffi::whiteout_mdx_MdxTrackF32_get_keys_data(self.raw.as_ptr()) as *mut f32;
if p.is_null() || n == 0 {
&mut []
} else {
core::slice::from_raw_parts_mut(p, n)
}
}
}
pub fn set_keys(&mut self, values: &[f32]) {
unsafe {
ffi::whiteout_mdx_MdxTrackF32_assign_keys(
self.raw.as_ptr(),
values.as_ptr() as *const _,
values.len(),
)
}
}
pub fn resize_keys(&mut self, count: usize) {
unsafe { ffi::whiteout_mdx_MdxTrackF32_resize_keys(self.raw.as_ptr(), count) }
}
}
impl Default for TrackF32 {
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_MdxExtent {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxModel {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxSequence {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxTexture {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxSound {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxNode {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxSoundEmitter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxLayer {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxLayerSubTexture {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxMaterial {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxTextureAnimation {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxGeoset {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxGeosetAnimation {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxBone {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxLight {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxHelper {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxAttachment {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxParticleEmitter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxParticleEmitter2 {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxRibbonEmitter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxEventObject {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxCamera {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxCollisionShape {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxFaceEffect {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxCornEmitter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxParser {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxWriter {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxTrackVector3f {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxTrackQuaternion {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxTrackU32 {
_private: [u8; 0],
}
#[repr(C)]
pub struct whiteout_MdxTrackF32 {
_private: [u8; 0],
}
extern "C" {
pub fn whiteout_mdx_MdxExtent_new() -> *mut whiteout_MdxExtent;
pub fn whiteout_mdx_MdxExtent_delete(self_: *mut whiteout_MdxExtent);
pub fn whiteout_mdx_MdxExtent_get_boundsRadius(self_: *mut whiteout_MdxExtent) -> f32;
pub fn whiteout_mdx_MdxExtent_set_boundsRadius(self_: *mut whiteout_MdxExtent, value: f32);
pub fn whiteout_mdx_MdxExtent_get_minimum(
self_: *mut whiteout_MdxExtent,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxExtent_set_minimum(
self_: *mut whiteout_MdxExtent,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxExtent_get_maximum(
self_: *mut whiteout_MdxExtent,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxExtent_set_maximum(
self_: *mut whiteout_MdxExtent,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxModel_new() -> *mut whiteout_MdxModel;
pub fn whiteout_mdx_MdxModel_delete(self_: *mut whiteout_MdxModel);
pub fn whiteout_mdx_MdxModel_get_version(self_: *mut whiteout_MdxModel) -> u32;
pub fn whiteout_mdx_MdxModel_set_version(self_: *mut whiteout_MdxModel, value: u32);
pub fn whiteout_mdx_MdxModel_get_modelName(self_: *mut whiteout_MdxModel) -> RawCString;
pub fn whiteout_mdx_MdxModel_set_modelName(
self_: *mut whiteout_MdxModel,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxModel_get_animationFileName(
self_: *mut whiteout_MdxModel,
) -> RawCString;
pub fn whiteout_mdx_MdxModel_set_animationFileName(
self_: *mut whiteout_MdxModel,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxModel_get_modelExtent(
self_: *mut whiteout_MdxModel,
) -> *mut whiteout_MdxExtent;
pub fn whiteout_mdx_MdxModel_set_modelExtent(
self_: *mut whiteout_MdxModel,
value: *const whiteout_MdxExtent,
);
pub fn whiteout_mdx_MdxModel_get_blendTime(self_: *mut whiteout_MdxModel) -> u32;
pub fn whiteout_mdx_MdxModel_set_blendTime(self_: *mut whiteout_MdxModel, value: u32);
pub fn whiteout_mdx_MdxModel_get_globalSequences_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_globalSequences(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_globalSequences_data(
self_: *mut whiteout_MdxModel,
) -> *const u32;
pub fn whiteout_mdx_MdxModel_assign_globalSequences(
self_: *mut whiteout_MdxModel,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_sequences_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_sequences(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_sequences_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxSequence;
pub fn whiteout_mdx_MdxModel_get_textures_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_textures(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_textures_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxTexture;
pub fn whiteout_mdx_MdxModel_get_sounds_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_sounds(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_sounds_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxSound;
pub fn whiteout_mdx_MdxModel_get_soundEmitters_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_soundEmitters(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_soundEmitters_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxSoundEmitter;
pub fn whiteout_mdx_MdxModel_get_materials_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_materials(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_materials_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxMaterial;
pub fn whiteout_mdx_MdxModel_get_textureAnimations_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_textureAnimations(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_textureAnimations_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxTextureAnimation;
pub fn whiteout_mdx_MdxModel_get_geosets_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_geosets(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_geosets_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxGeoset;
pub fn whiteout_mdx_MdxModel_get_geosetAnimations_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_geosetAnimations(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_geosetAnimations_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxGeosetAnimation;
pub fn whiteout_mdx_MdxModel_get_bones_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_bones(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_bones_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxBone;
pub fn whiteout_mdx_MdxModel_get_helpers_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_helpers(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_helpers_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxHelper;
pub fn whiteout_mdx_MdxModel_get_attachments_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_attachments(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_attachments_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxAttachment;
pub fn whiteout_mdx_MdxModel_get_pivotPoints_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_pivotPoints(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_pivotPoints_data(
self_: *mut whiteout_MdxModel,
) -> *const f32;
pub fn whiteout_mdx_MdxModel_assign_pivotPoints(
self_: *mut whiteout_MdxModel,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_lights_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_lights(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_lights_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxLight;
pub fn whiteout_mdx_MdxModel_get_particleEmitters_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_particleEmitters(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_particleEmitters_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxParticleEmitter;
pub fn whiteout_mdx_MdxModel_get_particleEmitters2_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_particleEmitters2(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_particleEmitters2_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxParticleEmitter2;
pub fn whiteout_mdx_MdxModel_get_ribbonEmitters_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_ribbonEmitters(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_ribbonEmitters_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxRibbonEmitter;
pub fn whiteout_mdx_MdxModel_get_cornEmitters_count(self_: *mut whiteout_MdxModel)
-> usize;
pub fn whiteout_mdx_MdxModel_resize_cornEmitters(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_cornEmitters_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxCornEmitter;
pub fn whiteout_mdx_MdxModel_get_eventObjects_count(self_: *mut whiteout_MdxModel)
-> usize;
pub fn whiteout_mdx_MdxModel_resize_eventObjects(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_eventObjects_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxEventObject;
pub fn whiteout_mdx_MdxModel_get_cameras_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_cameras(self_: *mut whiteout_MdxModel, count: usize);
pub fn whiteout_mdx_MdxModel_get_cameras_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxCamera;
pub fn whiteout_mdx_MdxModel_get_collisionShapes_count(
self_: *mut whiteout_MdxModel,
) -> usize;
pub fn whiteout_mdx_MdxModel_resize_collisionShapes(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_collisionShapes_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxCollisionShape;
pub fn whiteout_mdx_MdxModel_get_faceEffects_count(self_: *mut whiteout_MdxModel) -> usize;
pub fn whiteout_mdx_MdxModel_resize_faceEffects(
self_: *mut whiteout_MdxModel,
count: usize,
);
pub fn whiteout_mdx_MdxModel_get_faceEffects_at(
self_: *mut whiteout_MdxModel,
index: usize,
) -> *mut whiteout_MdxFaceEffect;
pub fn whiteout_mdx_MdxSequence_new() -> *mut whiteout_MdxSequence;
pub fn whiteout_mdx_MdxSequence_delete(self_: *mut whiteout_MdxSequence);
pub fn whiteout_mdx_MdxSequence_get_name(self_: *mut whiteout_MdxSequence) -> RawCString;
pub fn whiteout_mdx_MdxSequence_set_name(
self_: *mut whiteout_MdxSequence,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxSequence_get_intervalStart(self_: *mut whiteout_MdxSequence) -> u32;
pub fn whiteout_mdx_MdxSequence_set_intervalStart(
self_: *mut whiteout_MdxSequence,
value: u32,
);
pub fn whiteout_mdx_MdxSequence_get_intervalEnd(self_: *mut whiteout_MdxSequence) -> u32;
pub fn whiteout_mdx_MdxSequence_set_intervalEnd(
self_: *mut whiteout_MdxSequence,
value: u32,
);
pub fn whiteout_mdx_MdxSequence_get_moveSpeed(self_: *mut whiteout_MdxSequence) -> f32;
pub fn whiteout_mdx_MdxSequence_set_moveSpeed(self_: *mut whiteout_MdxSequence, value: f32);
pub fn whiteout_mdx_MdxSequence_get_flags(self_: *mut whiteout_MdxSequence) -> i32;
pub fn whiteout_mdx_MdxSequence_set_flags(self_: *mut whiteout_MdxSequence, value: i32);
pub fn whiteout_mdx_MdxSequence_get_rarity(self_: *mut whiteout_MdxSequence) -> f32;
pub fn whiteout_mdx_MdxSequence_set_rarity(self_: *mut whiteout_MdxSequence, value: f32);
pub fn whiteout_mdx_MdxSequence_get_syncPoint(self_: *mut whiteout_MdxSequence) -> u32;
pub fn whiteout_mdx_MdxSequence_set_syncPoint(self_: *mut whiteout_MdxSequence, value: u32);
pub fn whiteout_mdx_MdxSequence_get_extent(
self_: *mut whiteout_MdxSequence,
) -> *mut whiteout_MdxExtent;
pub fn whiteout_mdx_MdxSequence_set_extent(
self_: *mut whiteout_MdxSequence,
value: *const whiteout_MdxExtent,
);
pub fn whiteout_mdx_MdxTexture_new() -> *mut whiteout_MdxTexture;
pub fn whiteout_mdx_MdxTexture_delete(self_: *mut whiteout_MdxTexture);
pub fn whiteout_mdx_MdxTexture_get_replaceableId(self_: *mut whiteout_MdxTexture) -> u32;
pub fn whiteout_mdx_MdxTexture_set_replaceableId(
self_: *mut whiteout_MdxTexture,
value: u32,
);
pub fn whiteout_mdx_MdxTexture_get_fileName(self_: *mut whiteout_MdxTexture) -> RawCString;
pub fn whiteout_mdx_MdxTexture_set_fileName(
self_: *mut whiteout_MdxTexture,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxTexture_get_flags(self_: *mut whiteout_MdxTexture) -> i32;
pub fn whiteout_mdx_MdxTexture_set_flags(self_: *mut whiteout_MdxTexture, value: i32);
pub fn whiteout_mdx_MdxSound_new() -> *mut whiteout_MdxSound;
pub fn whiteout_mdx_MdxSound_delete(self_: *mut whiteout_MdxSound);
pub fn whiteout_mdx_MdxSound_get_soundFile(self_: *mut whiteout_MdxSound) -> RawCString;
pub fn whiteout_mdx_MdxSound_set_soundFile(
self_: *mut whiteout_MdxSound,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxSound_get_maximumDistance(self_: *mut whiteout_MdxSound) -> f32;
pub fn whiteout_mdx_MdxSound_set_maximumDistance(self_: *mut whiteout_MdxSound, value: f32);
pub fn whiteout_mdx_MdxSound_get_minimumDistance(self_: *mut whiteout_MdxSound) -> f32;
pub fn whiteout_mdx_MdxSound_set_minimumDistance(self_: *mut whiteout_MdxSound, value: f32);
pub fn whiteout_mdx_MdxSound_get_soundChannel(self_: *mut whiteout_MdxSound) -> u32;
pub fn whiteout_mdx_MdxSound_set_soundChannel(self_: *mut whiteout_MdxSound, value: u32);
pub fn whiteout_mdx_MdxNode_new() -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxNode_delete(self_: *mut whiteout_MdxNode);
pub fn whiteout_mdx_MdxNode_get_name(self_: *mut whiteout_MdxNode) -> RawCString;
pub fn whiteout_mdx_MdxNode_set_name(
self_: *mut whiteout_MdxNode,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxNode_get_objectId(self_: *mut whiteout_MdxNode) -> u32;
pub fn whiteout_mdx_MdxNode_set_objectId(self_: *mut whiteout_MdxNode, value: u32);
pub fn whiteout_mdx_MdxNode_get_parentId(self_: *mut whiteout_MdxNode) -> u32;
pub fn whiteout_mdx_MdxNode_set_parentId(self_: *mut whiteout_MdxNode, value: u32);
pub fn whiteout_mdx_MdxNode_get_flags(self_: *mut whiteout_MdxNode) -> i32;
pub fn whiteout_mdx_MdxNode_set_flags(self_: *mut whiteout_MdxNode, value: i32);
pub fn whiteout_mdx_MdxNode_get_type(self_: *mut whiteout_MdxNode) -> i32;
pub fn whiteout_mdx_MdxNode_set_type(self_: *mut whiteout_MdxNode, value: i32);
pub fn whiteout_mdx_MdxNode_get_nodeFamilyId(self_: *mut whiteout_MdxNode) -> u32;
pub fn whiteout_mdx_MdxNode_set_nodeFamilyId(self_: *mut whiteout_MdxNode, value: u32);
pub fn whiteout_mdx_MdxNode_get_translationTracks(
self_: *mut whiteout_MdxNode,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxNode_set_translationTracks(
self_: *mut whiteout_MdxNode,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxNode_get_rotationTracks(
self_: *mut whiteout_MdxNode,
) -> *mut whiteout_MdxTrackQuaternion;
pub fn whiteout_mdx_MdxNode_set_rotationTracks(
self_: *mut whiteout_MdxNode,
value: *const whiteout_MdxTrackQuaternion,
);
pub fn whiteout_mdx_MdxNode_get_scalingTracks(
self_: *mut whiteout_MdxNode,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxNode_set_scalingTracks(
self_: *mut whiteout_MdxNode,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxSoundEmitter_new() -> *mut whiteout_MdxSoundEmitter;
pub fn whiteout_mdx_MdxSoundEmitter_delete(self_: *mut whiteout_MdxSoundEmitter);
pub fn whiteout_mdx_MdxSoundEmitter_get_node(
self_: *mut whiteout_MdxSoundEmitter,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxSoundEmitter_set_node(
self_: *mut whiteout_MdxSoundEmitter,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxSoundEmitter_get_soundTrack(
self_: *mut whiteout_MdxSoundEmitter,
) -> *mut whiteout_MdxTrackU32;
pub fn whiteout_mdx_MdxSoundEmitter_set_soundTrack(
self_: *mut whiteout_MdxSoundEmitter,
value: *const whiteout_MdxTrackU32,
);
pub fn whiteout_mdx_MdxLayer_new() -> *mut whiteout_MdxLayer;
pub fn whiteout_mdx_MdxLayer_delete(self_: *mut whiteout_MdxLayer);
pub fn whiteout_mdx_MdxLayer_get_filterMode(self_: *mut whiteout_MdxLayer) -> i32;
pub fn whiteout_mdx_MdxLayer_set_filterMode(self_: *mut whiteout_MdxLayer, value: i32);
pub fn whiteout_mdx_MdxLayer_get_shadingFlags(self_: *mut whiteout_MdxLayer) -> i32;
pub fn whiteout_mdx_MdxLayer_set_shadingFlags(self_: *mut whiteout_MdxLayer, value: i32);
pub fn whiteout_mdx_MdxLayer_get_textureId(self_: *mut whiteout_MdxLayer) -> u32;
pub fn whiteout_mdx_MdxLayer_set_textureId(self_: *mut whiteout_MdxLayer, value: u32);
pub fn whiteout_mdx_MdxLayer_get_textureAnimationId(self_: *mut whiteout_MdxLayer) -> u32;
pub fn whiteout_mdx_MdxLayer_set_textureAnimationId(
self_: *mut whiteout_MdxLayer,
value: u32,
);
pub fn whiteout_mdx_MdxLayer_get_coordId(self_: *mut whiteout_MdxLayer) -> u32;
pub fn whiteout_mdx_MdxLayer_set_coordId(self_: *mut whiteout_MdxLayer, value: u32);
pub fn whiteout_mdx_MdxLayer_get_alpha(self_: *mut whiteout_MdxLayer) -> f32;
pub fn whiteout_mdx_MdxLayer_set_alpha(self_: *mut whiteout_MdxLayer, value: f32);
pub fn whiteout_mdx_MdxLayer_get_emissiveGain(self_: *mut whiteout_MdxLayer) -> f32;
pub fn whiteout_mdx_MdxLayer_set_emissiveGain(self_: *mut whiteout_MdxLayer, value: f32);
pub fn whiteout_mdx_MdxLayer_get_fresnelColor(
self_: *mut whiteout_MdxLayer,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxLayer_set_fresnelColor(
self_: *mut whiteout_MdxLayer,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxLayer_get_fresnelOpacity(self_: *mut whiteout_MdxLayer) -> f32;
pub fn whiteout_mdx_MdxLayer_set_fresnelOpacity(self_: *mut whiteout_MdxLayer, value: f32);
pub fn whiteout_mdx_MdxLayer_get_fresnelTeamColor(self_: *mut whiteout_MdxLayer) -> f32;
pub fn whiteout_mdx_MdxLayer_set_fresnelTeamColor(
self_: *mut whiteout_MdxLayer,
value: f32,
);
pub fn whiteout_mdx_MdxLayer_get_shader(self_: *mut whiteout_MdxLayer) -> i32;
pub fn whiteout_mdx_MdxLayer_set_shader(self_: *mut whiteout_MdxLayer, value: i32);
pub fn whiteout_mdx_MdxLayer_get_isHd(self_: *mut whiteout_MdxLayer) -> i32;
pub fn whiteout_mdx_MdxLayer_set_isHd(self_: *mut whiteout_MdxLayer, value: i32);
pub fn whiteout_mdx_MdxLayer_get_subTextures_count(self_: *mut whiteout_MdxLayer) -> usize;
pub fn whiteout_mdx_MdxLayer_resize_subTextures(
self_: *mut whiteout_MdxLayer,
count: usize,
);
pub fn whiteout_mdx_MdxLayer_get_subTextures_at(
self_: *mut whiteout_MdxLayer,
index: usize,
) -> *mut whiteout_MdxLayerSubTexture;
pub fn whiteout_mdx_MdxLayer_get_textureIdTracks(
self_: *mut whiteout_MdxLayer,
) -> *mut whiteout_MdxTrackU32;
pub fn whiteout_mdx_MdxLayer_set_textureIdTracks(
self_: *mut whiteout_MdxLayer,
value: *const whiteout_MdxTrackU32,
);
pub fn whiteout_mdx_MdxLayer_get_alphaTracks(
self_: *mut whiteout_MdxLayer,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLayer_set_alphaTracks(
self_: *mut whiteout_MdxLayer,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLayer_get_emissiveGainTracks(
self_: *mut whiteout_MdxLayer,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLayer_set_emissiveGainTracks(
self_: *mut whiteout_MdxLayer,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLayer_get_fresnelColorTracks(
self_: *mut whiteout_MdxLayer,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxLayer_set_fresnelColorTracks(
self_: *mut whiteout_MdxLayer,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxLayer_get_fresnelAlphaTracks(
self_: *mut whiteout_MdxLayer,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLayer_set_fresnelAlphaTracks(
self_: *mut whiteout_MdxLayer,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLayer_get_fresnelTeamColorTracks(
self_: *mut whiteout_MdxLayer,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLayer_set_fresnelTeamColorTracks(
self_: *mut whiteout_MdxLayer,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLayerSubTexture_new() -> *mut whiteout_MdxLayerSubTexture;
pub fn whiteout_mdx_MdxLayerSubTexture_delete(self_: *mut whiteout_MdxLayerSubTexture);
pub fn whiteout_mdx_MdxLayerSubTexture_get_textureId(
self_: *mut whiteout_MdxLayerSubTexture,
) -> u32;
pub fn whiteout_mdx_MdxLayerSubTexture_set_textureId(
self_: *mut whiteout_MdxLayerSubTexture,
value: u32,
);
pub fn whiteout_mdx_MdxLayerSubTexture_get_slot(
self_: *mut whiteout_MdxLayerSubTexture,
) -> i32;
pub fn whiteout_mdx_MdxLayerSubTexture_set_slot(
self_: *mut whiteout_MdxLayerSubTexture,
value: i32,
);
pub fn whiteout_mdx_MdxLayerSubTexture_get_tracks(
self_: *mut whiteout_MdxLayerSubTexture,
) -> *mut whiteout_MdxTrackU32;
pub fn whiteout_mdx_MdxLayerSubTexture_set_tracks(
self_: *mut whiteout_MdxLayerSubTexture,
value: *const whiteout_MdxTrackU32,
);
pub fn whiteout_mdx_MdxMaterial_new() -> *mut whiteout_MdxMaterial;
pub fn whiteout_mdx_MdxMaterial_delete(self_: *mut whiteout_MdxMaterial);
pub fn whiteout_mdx_MdxMaterial_get_priorityPlane(self_: *mut whiteout_MdxMaterial) -> i32;
pub fn whiteout_mdx_MdxMaterial_set_priorityPlane(
self_: *mut whiteout_MdxMaterial,
value: i32,
);
pub fn whiteout_mdx_MdxMaterial_get_flags(self_: *mut whiteout_MdxMaterial) -> i32;
pub fn whiteout_mdx_MdxMaterial_set_flags(self_: *mut whiteout_MdxMaterial, value: i32);
pub fn whiteout_mdx_MdxMaterial_get_shader(self_: *mut whiteout_MdxMaterial) -> RawCString;
pub fn whiteout_mdx_MdxMaterial_set_shader(
self_: *mut whiteout_MdxMaterial,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxMaterial_get_layers_count(self_: *mut whiteout_MdxMaterial)
-> usize;
pub fn whiteout_mdx_MdxMaterial_resize_layers(
self_: *mut whiteout_MdxMaterial,
count: usize,
);
pub fn whiteout_mdx_MdxMaterial_get_layers_at(
self_: *mut whiteout_MdxMaterial,
index: usize,
) -> *mut whiteout_MdxLayer;
pub fn whiteout_mdx_MdxTextureAnimation_new() -> *mut whiteout_MdxTextureAnimation;
pub fn whiteout_mdx_MdxTextureAnimation_delete(self_: *mut whiteout_MdxTextureAnimation);
pub fn whiteout_mdx_MdxTextureAnimation_get_translationTracks(
self_: *mut whiteout_MdxTextureAnimation,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxTextureAnimation_set_translationTracks(
self_: *mut whiteout_MdxTextureAnimation,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxTextureAnimation_get_rotationTracks(
self_: *mut whiteout_MdxTextureAnimation,
) -> *mut whiteout_MdxTrackQuaternion;
pub fn whiteout_mdx_MdxTextureAnimation_set_rotationTracks(
self_: *mut whiteout_MdxTextureAnimation,
value: *const whiteout_MdxTrackQuaternion,
);
pub fn whiteout_mdx_MdxTextureAnimation_get_scalingTracks(
self_: *mut whiteout_MdxTextureAnimation,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxTextureAnimation_set_scalingTracks(
self_: *mut whiteout_MdxTextureAnimation,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxGeoset_new() -> *mut whiteout_MdxGeoset;
pub fn whiteout_mdx_MdxGeoset_delete(self_: *mut whiteout_MdxGeoset);
pub fn whiteout_mdx_MdxGeoset_get_vertexPositions_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_vertexPositions(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_vertexPositions_data(
self_: *mut whiteout_MdxGeoset,
) -> *const f32;
pub fn whiteout_mdx_MdxGeoset_assign_vertexPositions(
self_: *mut whiteout_MdxGeoset,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_vertexNormals_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_vertexNormals(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_vertexNormals_data(
self_: *mut whiteout_MdxGeoset,
) -> *const f32;
pub fn whiteout_mdx_MdxGeoset_assign_vertexNormals(
self_: *mut whiteout_MdxGeoset,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_faceTypeGroups_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_faceTypeGroups(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_faceTypeGroups_data(
self_: *mut whiteout_MdxGeoset,
) -> *const u32;
pub fn whiteout_mdx_MdxGeoset_assign_faceTypeGroups(
self_: *mut whiteout_MdxGeoset,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_faceGroups_count(self_: *mut whiteout_MdxGeoset)
-> usize;
pub fn whiteout_mdx_MdxGeoset_resize_faceGroups(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_faceGroups_data(
self_: *mut whiteout_MdxGeoset,
) -> *const u32;
pub fn whiteout_mdx_MdxGeoset_assign_faceGroups(
self_: *mut whiteout_MdxGeoset,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_faces_count(self_: *mut whiteout_MdxGeoset) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_faces(self_: *mut whiteout_MdxGeoset, count: usize);
pub fn whiteout_mdx_MdxGeoset_get_faces_data(self_: *mut whiteout_MdxGeoset) -> *const u16;
pub fn whiteout_mdx_MdxGeoset_assign_faces(
self_: *mut whiteout_MdxGeoset,
data: *const u16,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_vertexGroups_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_vertexGroups(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_vertexGroups_data(
self_: *mut whiteout_MdxGeoset,
) -> *const u8;
pub fn whiteout_mdx_MdxGeoset_assign_vertexGroups(
self_: *mut whiteout_MdxGeoset,
data: *const u8,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_matrixGroups_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_matrixGroups(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_matrixGroups_data(
self_: *mut whiteout_MdxGeoset,
) -> *const u32;
pub fn whiteout_mdx_MdxGeoset_assign_matrixGroups(
self_: *mut whiteout_MdxGeoset,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_matrixIndices_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_matrixIndices(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_matrixIndices_data(
self_: *mut whiteout_MdxGeoset,
) -> *const u32;
pub fn whiteout_mdx_MdxGeoset_assign_matrixIndices(
self_: *mut whiteout_MdxGeoset,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_materialId(self_: *mut whiteout_MdxGeoset) -> u32;
pub fn whiteout_mdx_MdxGeoset_set_materialId(self_: *mut whiteout_MdxGeoset, value: u32);
pub fn whiteout_mdx_MdxGeoset_get_selectionGroup(self_: *mut whiteout_MdxGeoset) -> u32;
pub fn whiteout_mdx_MdxGeoset_set_selectionGroup(
self_: *mut whiteout_MdxGeoset,
value: u32,
);
pub fn whiteout_mdx_MdxGeoset_get_selectionFlags(self_: *mut whiteout_MdxGeoset) -> u32;
pub fn whiteout_mdx_MdxGeoset_set_selectionFlags(
self_: *mut whiteout_MdxGeoset,
value: u32,
);
pub fn whiteout_mdx_MdxGeoset_get_lod(self_: *mut whiteout_MdxGeoset) -> u32;
pub fn whiteout_mdx_MdxGeoset_set_lod(self_: *mut whiteout_MdxGeoset, value: u32);
pub fn whiteout_mdx_MdxGeoset_get_lodName(self_: *mut whiteout_MdxGeoset) -> RawCString;
pub fn whiteout_mdx_MdxGeoset_set_lodName(
self_: *mut whiteout_MdxGeoset,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxGeoset_get_extent(
self_: *mut whiteout_MdxGeoset,
) -> *mut whiteout_MdxExtent;
pub fn whiteout_mdx_MdxGeoset_set_extent(
self_: *mut whiteout_MdxGeoset,
value: *const whiteout_MdxExtent,
);
pub fn whiteout_mdx_MdxGeoset_get_sequenceExtents_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_sequenceExtents(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_sequenceExtents_at(
self_: *mut whiteout_MdxGeoset,
index: usize,
) -> *mut whiteout_MdxExtent;
pub fn whiteout_mdx_MdxGeoset_get_tangents_count(self_: *mut whiteout_MdxGeoset) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_tangents(self_: *mut whiteout_MdxGeoset, count: usize);
pub fn whiteout_mdx_MdxGeoset_get_tangents_data(
self_: *mut whiteout_MdxGeoset,
) -> *const f32;
pub fn whiteout_mdx_MdxGeoset_assign_tangents(
self_: *mut whiteout_MdxGeoset,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_skinData_count(self_: *mut whiteout_MdxGeoset) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_skinData(self_: *mut whiteout_MdxGeoset, count: usize);
pub fn whiteout_mdx_MdxGeoset_get_skinData_data(
self_: *mut whiteout_MdxGeoset,
) -> *const u8;
pub fn whiteout_mdx_MdxGeoset_assign_skinData(
self_: *mut whiteout_MdxGeoset,
data: *const u8,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_textureCoordinateSets_count(
self_: *mut whiteout_MdxGeoset,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_get_textureCoordinateSets_inner_count(
self_: *mut whiteout_MdxGeoset,
outer: usize,
) -> usize;
pub fn whiteout_mdx_MdxGeoset_resize_textureCoordinateSets(
self_: *mut whiteout_MdxGeoset,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_resize_textureCoordinateSets_inner(
self_: *mut whiteout_MdxGeoset,
outer: usize,
count: usize,
);
pub fn whiteout_mdx_MdxGeoset_get_textureCoordinateSets_inner_data(
self_: *mut whiteout_MdxGeoset,
outer: usize,
) -> *const f32;
pub fn whiteout_mdx_MdxGeoset_assign_textureCoordinateSets_inner(
self_: *mut whiteout_MdxGeoset,
outer: usize,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxGeosetAnimation_new() -> *mut whiteout_MdxGeosetAnimation;
pub fn whiteout_mdx_MdxGeosetAnimation_delete(self_: *mut whiteout_MdxGeosetAnimation);
pub fn whiteout_mdx_MdxGeosetAnimation_get_alpha(
self_: *mut whiteout_MdxGeosetAnimation,
) -> f32;
pub fn whiteout_mdx_MdxGeosetAnimation_set_alpha(
self_: *mut whiteout_MdxGeosetAnimation,
value: f32,
);
pub fn whiteout_mdx_MdxGeosetAnimation_get_flags(
self_: *mut whiteout_MdxGeosetAnimation,
) -> i32;
pub fn whiteout_mdx_MdxGeosetAnimation_set_flags(
self_: *mut whiteout_MdxGeosetAnimation,
value: i32,
);
pub fn whiteout_mdx_MdxGeosetAnimation_get_color(
self_: *mut whiteout_MdxGeosetAnimation,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxGeosetAnimation_set_color(
self_: *mut whiteout_MdxGeosetAnimation,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxGeosetAnimation_get_geosetId(
self_: *mut whiteout_MdxGeosetAnimation,
) -> u32;
pub fn whiteout_mdx_MdxGeosetAnimation_set_geosetId(
self_: *mut whiteout_MdxGeosetAnimation,
value: u32,
);
pub fn whiteout_mdx_MdxGeosetAnimation_get_alphaTracks(
self_: *mut whiteout_MdxGeosetAnimation,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxGeosetAnimation_set_alphaTracks(
self_: *mut whiteout_MdxGeosetAnimation,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxGeosetAnimation_get_colorTracks(
self_: *mut whiteout_MdxGeosetAnimation,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxGeosetAnimation_set_colorTracks(
self_: *mut whiteout_MdxGeosetAnimation,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxBone_new() -> *mut whiteout_MdxBone;
pub fn whiteout_mdx_MdxBone_delete(self_: *mut whiteout_MdxBone);
pub fn whiteout_mdx_MdxBone_get_node(self_: *mut whiteout_MdxBone)
-> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxBone_set_node(
self_: *mut whiteout_MdxBone,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxBone_get_geosetId(self_: *mut whiteout_MdxBone) -> u32;
pub fn whiteout_mdx_MdxBone_set_geosetId(self_: *mut whiteout_MdxBone, value: u32);
pub fn whiteout_mdx_MdxBone_get_geosetAnimationId(self_: *mut whiteout_MdxBone) -> u32;
pub fn whiteout_mdx_MdxBone_set_geosetAnimationId(self_: *mut whiteout_MdxBone, value: u32);
pub fn whiteout_mdx_MdxLight_new() -> *mut whiteout_MdxLight;
pub fn whiteout_mdx_MdxLight_delete(self_: *mut whiteout_MdxLight);
pub fn whiteout_mdx_MdxLight_get_node(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxLight_set_node(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxLight_get_type(self_: *mut whiteout_MdxLight) -> i32;
pub fn whiteout_mdx_MdxLight_set_type(self_: *mut whiteout_MdxLight, value: i32);
pub fn whiteout_mdx_MdxLight_get_attenuationStart(self_: *mut whiteout_MdxLight) -> f32;
pub fn whiteout_mdx_MdxLight_set_attenuationStart(
self_: *mut whiteout_MdxLight,
value: f32,
);
pub fn whiteout_mdx_MdxLight_get_attenuationEnd(self_: *mut whiteout_MdxLight) -> f32;
pub fn whiteout_mdx_MdxLight_set_attenuationEnd(self_: *mut whiteout_MdxLight, value: f32);
pub fn whiteout_mdx_MdxLight_get_color(
self_: *mut whiteout_MdxLight,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxLight_set_color(
self_: *mut whiteout_MdxLight,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxLight_get_intensity(self_: *mut whiteout_MdxLight) -> f32;
pub fn whiteout_mdx_MdxLight_set_intensity(self_: *mut whiteout_MdxLight, value: f32);
pub fn whiteout_mdx_MdxLight_get_ambientColor(
self_: *mut whiteout_MdxLight,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxLight_set_ambientColor(
self_: *mut whiteout_MdxLight,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxLight_get_ambientIntensity(self_: *mut whiteout_MdxLight) -> f32;
pub fn whiteout_mdx_MdxLight_set_ambientIntensity(
self_: *mut whiteout_MdxLight,
value: f32,
);
pub fn whiteout_mdx_MdxLight_get_shadowIntensity(self_: *mut whiteout_MdxLight) -> f32;
pub fn whiteout_mdx_MdxLight_set_shadowIntensity(self_: *mut whiteout_MdxLight, value: f32);
pub fn whiteout_mdx_MdxLight_get_attenuationStartTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLight_set_attenuationStartTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLight_get_attenuationEndTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLight_set_attenuationEndTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLight_get_colorTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxLight_set_colorTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxLight_get_intensityTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLight_set_intensityTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLight_get_ambientIntensityTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLight_set_ambientIntensityTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLight_get_ambientColorTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxLight_set_ambientColorTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxLight_get_visibilityTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLight_set_visibilityTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxLight_get_shadowIntensityTracks(
self_: *mut whiteout_MdxLight,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxLight_set_shadowIntensityTracks(
self_: *mut whiteout_MdxLight,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxHelper_new() -> *mut whiteout_MdxHelper;
pub fn whiteout_mdx_MdxHelper_delete(self_: *mut whiteout_MdxHelper);
pub fn whiteout_mdx_MdxHelper_get_node(
self_: *mut whiteout_MdxHelper,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxHelper_set_node(
self_: *mut whiteout_MdxHelper,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxAttachment_new() -> *mut whiteout_MdxAttachment;
pub fn whiteout_mdx_MdxAttachment_delete(self_: *mut whiteout_MdxAttachment);
pub fn whiteout_mdx_MdxAttachment_get_node(
self_: *mut whiteout_MdxAttachment,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxAttachment_set_node(
self_: *mut whiteout_MdxAttachment,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxAttachment_get_path(
self_: *mut whiteout_MdxAttachment,
) -> RawCString;
pub fn whiteout_mdx_MdxAttachment_set_path(
self_: *mut whiteout_MdxAttachment,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxAttachment_get_attachmentId(
self_: *mut whiteout_MdxAttachment,
) -> u32;
pub fn whiteout_mdx_MdxAttachment_set_attachmentId(
self_: *mut whiteout_MdxAttachment,
value: u32,
);
pub fn whiteout_mdx_MdxAttachment_get_visibilityTracks(
self_: *mut whiteout_MdxAttachment,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxAttachment_set_visibilityTracks(
self_: *mut whiteout_MdxAttachment,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_new() -> *mut whiteout_MdxParticleEmitter;
pub fn whiteout_mdx_MdxParticleEmitter_delete(self_: *mut whiteout_MdxParticleEmitter);
pub fn whiteout_mdx_MdxParticleEmitter_get_node(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxParticleEmitter_set_node(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_emissionRate(
self_: *mut whiteout_MdxParticleEmitter,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter_set_emissionRate(
self_: *mut whiteout_MdxParticleEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_gravity(
self_: *mut whiteout_MdxParticleEmitter,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter_set_gravity(
self_: *mut whiteout_MdxParticleEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_longitude(
self_: *mut whiteout_MdxParticleEmitter,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter_set_longitude(
self_: *mut whiteout_MdxParticleEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_latitude(
self_: *mut whiteout_MdxParticleEmitter,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter_set_latitude(
self_: *mut whiteout_MdxParticleEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_spawnModelFileName(
self_: *mut whiteout_MdxParticleEmitter,
) -> RawCString;
pub fn whiteout_mdx_MdxParticleEmitter_set_spawnModelFileName(
self_: *mut whiteout_MdxParticleEmitter,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_lifespan(
self_: *mut whiteout_MdxParticleEmitter,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter_set_lifespan(
self_: *mut whiteout_MdxParticleEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_initialVelocity(
self_: *mut whiteout_MdxParticleEmitter,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter_set_initialVelocity(
self_: *mut whiteout_MdxParticleEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_emissionRateTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_emissionRateTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_gravityTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_gravityTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_longitudeTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_longitudeTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_latitudeTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_latitudeTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_lifespanTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_lifespanTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_speedTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_speedTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter_get_visibilityTracks(
self_: *mut whiteout_MdxParticleEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter_set_visibilityTracks(
self_: *mut whiteout_MdxParticleEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_new() -> *mut whiteout_MdxParticleEmitter2;
pub fn whiteout_mdx_MdxParticleEmitter2_delete(self_: *mut whiteout_MdxParticleEmitter2);
pub fn whiteout_mdx_MdxParticleEmitter2_get_node(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxParticleEmitter2_set_node(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_speed(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_speed(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_variation(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_variation(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_latitude(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_latitude(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_gravity(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_gravity(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_lifespan(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_lifespan(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_emissionRate(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_emissionRate(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_length(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_length(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_width(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_width(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_filterMode(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_filterMode(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_rows(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_rows(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_columns(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_columns(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_headOrTail(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_headOrTail(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_tailLength(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_tailLength(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_time(
self_: *mut whiteout_MdxParticleEmitter2,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_time(
self_: *mut whiteout_MdxParticleEmitter2,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_segmentColor_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_segmentColor_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxParticleEmitter2_segmentAlpha_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_segmentAlpha_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> u8;
pub fn whiteout_mdx_MdxParticleEmitter2_set_segmentAlpha_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
value: u8,
);
pub fn whiteout_mdx_MdxParticleEmitter2_segmentScaling_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_segmentScaling_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> f32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_segmentScaling_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
value: f32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_headInterval_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_headInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_headInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_headDecayInterval_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_headDecayInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_headDecayInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_tailInterval_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_tailInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_tailInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_tailDecayInterval_size() -> usize;
pub fn whiteout_mdx_MdxParticleEmitter2_get_tailDecayInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_tailDecayInterval_at(
self_: *mut whiteout_MdxParticleEmitter2,
index: usize,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_textureId(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_textureId(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_squirt(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_squirt(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_priorityPlane(
self_: *mut whiteout_MdxParticleEmitter2,
) -> i32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_priorityPlane(
self_: *mut whiteout_MdxParticleEmitter2,
value: i32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_replaceableId(
self_: *mut whiteout_MdxParticleEmitter2,
) -> u32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_replaceableId(
self_: *mut whiteout_MdxParticleEmitter2,
value: u32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_speedTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_speedTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_variationTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_variationTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_latitudeTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_latitudeTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_gravityTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_gravityTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_emissionRateTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_emissionRateTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_lengthTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_lengthTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_widthTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_widthTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParticleEmitter2_get_visibilityTracks(
self_: *mut whiteout_MdxParticleEmitter2,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxParticleEmitter2_set_visibilityTracks(
self_: *mut whiteout_MdxParticleEmitter2,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_new() -> *mut whiteout_MdxRibbonEmitter;
pub fn whiteout_mdx_MdxRibbonEmitter_delete(self_: *mut whiteout_MdxRibbonEmitter);
pub fn whiteout_mdx_MdxRibbonEmitter_get_node(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxRibbonEmitter_set_node(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_heightAbove(
self_: *mut whiteout_MdxRibbonEmitter,
) -> f32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_heightAbove(
self_: *mut whiteout_MdxRibbonEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_heightBelow(
self_: *mut whiteout_MdxRibbonEmitter,
) -> f32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_heightBelow(
self_: *mut whiteout_MdxRibbonEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_alpha(
self_: *mut whiteout_MdxRibbonEmitter,
) -> f32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_alpha(
self_: *mut whiteout_MdxRibbonEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_color(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxRibbonEmitter_set_color(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_lifespan(
self_: *mut whiteout_MdxRibbonEmitter,
) -> f32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_lifespan(
self_: *mut whiteout_MdxRibbonEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_textureSlot(
self_: *mut whiteout_MdxRibbonEmitter,
) -> u32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_textureSlot(
self_: *mut whiteout_MdxRibbonEmitter,
value: u32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_emissionRate(
self_: *mut whiteout_MdxRibbonEmitter,
) -> u32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_emissionRate(
self_: *mut whiteout_MdxRibbonEmitter,
value: u32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_rows(self_: *mut whiteout_MdxRibbonEmitter)
-> u32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_rows(
self_: *mut whiteout_MdxRibbonEmitter,
value: u32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_columns(
self_: *mut whiteout_MdxRibbonEmitter,
) -> u32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_columns(
self_: *mut whiteout_MdxRibbonEmitter,
value: u32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_materialId(
self_: *mut whiteout_MdxRibbonEmitter,
) -> u32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_materialId(
self_: *mut whiteout_MdxRibbonEmitter,
value: u32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_gravity(
self_: *mut whiteout_MdxRibbonEmitter,
) -> f32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_gravity(
self_: *mut whiteout_MdxRibbonEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_heightAboveTracks(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_heightAboveTracks(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_heightBelowTracks(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_heightBelowTracks(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_alphaTracks(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_alphaTracks(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_colorTracks(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxRibbonEmitter_set_colorTracks(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_textureSlotTracks(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxTrackU32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_textureSlotTracks(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxTrackU32,
);
pub fn whiteout_mdx_MdxRibbonEmitter_get_visibilityTracks(
self_: *mut whiteout_MdxRibbonEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxRibbonEmitter_set_visibilityTracks(
self_: *mut whiteout_MdxRibbonEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxEventObject_new() -> *mut whiteout_MdxEventObject;
pub fn whiteout_mdx_MdxEventObject_delete(self_: *mut whiteout_MdxEventObject);
pub fn whiteout_mdx_MdxEventObject_get_node(
self_: *mut whiteout_MdxEventObject,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxEventObject_set_node(
self_: *mut whiteout_MdxEventObject,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxEventObject_get_globalSequenceId(
self_: *mut whiteout_MdxEventObject,
) -> u32;
pub fn whiteout_mdx_MdxEventObject_set_globalSequenceId(
self_: *mut whiteout_MdxEventObject,
value: u32,
);
pub fn whiteout_mdx_MdxEventObject_get_eventTrackTimes_count(
self_: *mut whiteout_MdxEventObject,
) -> usize;
pub fn whiteout_mdx_MdxEventObject_resize_eventTrackTimes(
self_: *mut whiteout_MdxEventObject,
count: usize,
);
pub fn whiteout_mdx_MdxEventObject_get_eventTrackTimes_data(
self_: *mut whiteout_MdxEventObject,
) -> *const u32;
pub fn whiteout_mdx_MdxEventObject_assign_eventTrackTimes(
self_: *mut whiteout_MdxEventObject,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxCamera_new() -> *mut whiteout_MdxCamera;
pub fn whiteout_mdx_MdxCamera_delete(self_: *mut whiteout_MdxCamera);
pub fn whiteout_mdx_MdxCamera_get_name(self_: *mut whiteout_MdxCamera) -> RawCString;
pub fn whiteout_mdx_MdxCamera_set_name(
self_: *mut whiteout_MdxCamera,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxCamera_get_position(
self_: *mut whiteout_MdxCamera,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxCamera_set_position(
self_: *mut whiteout_MdxCamera,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxCamera_get_fieldOfView(self_: *mut whiteout_MdxCamera) -> f32;
pub fn whiteout_mdx_MdxCamera_set_fieldOfView(self_: *mut whiteout_MdxCamera, value: f32);
pub fn whiteout_mdx_MdxCamera_get_farClippingPlane(self_: *mut whiteout_MdxCamera) -> f32;
pub fn whiteout_mdx_MdxCamera_set_farClippingPlane(
self_: *mut whiteout_MdxCamera,
value: f32,
);
pub fn whiteout_mdx_MdxCamera_get_nearClippingPlane(self_: *mut whiteout_MdxCamera) -> f32;
pub fn whiteout_mdx_MdxCamera_set_nearClippingPlane(
self_: *mut whiteout_MdxCamera,
value: f32,
);
pub fn whiteout_mdx_MdxCamera_get_targetPosition(
self_: *mut whiteout_MdxCamera,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxCamera_set_targetPosition(
self_: *mut whiteout_MdxCamera,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxCamera_get_positionTracks(
self_: *mut whiteout_MdxCamera,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxCamera_set_positionTracks(
self_: *mut whiteout_MdxCamera,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxCamera_get_targetRotationTracks(
self_: *mut whiteout_MdxCamera,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxCamera_set_targetRotationTracks(
self_: *mut whiteout_MdxCamera,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxCamera_get_targetPositionTracks(
self_: *mut whiteout_MdxCamera,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxCamera_set_targetPositionTracks(
self_: *mut whiteout_MdxCamera,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxCollisionShape_new() -> *mut whiteout_MdxCollisionShape;
pub fn whiteout_mdx_MdxCollisionShape_delete(self_: *mut whiteout_MdxCollisionShape);
pub fn whiteout_mdx_MdxCollisionShape_get_node(
self_: *mut whiteout_MdxCollisionShape,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxCollisionShape_set_node(
self_: *mut whiteout_MdxCollisionShape,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxCollisionShape_get_type(
self_: *mut whiteout_MdxCollisionShape,
) -> i32;
pub fn whiteout_mdx_MdxCollisionShape_set_type(
self_: *mut whiteout_MdxCollisionShape,
value: i32,
);
pub fn whiteout_mdx_MdxCollisionShape_get_vertices_count(
self_: *mut whiteout_MdxCollisionShape,
) -> usize;
pub fn whiteout_mdx_MdxCollisionShape_resize_vertices(
self_: *mut whiteout_MdxCollisionShape,
count: usize,
);
pub fn whiteout_mdx_MdxCollisionShape_get_vertices_data(
self_: *mut whiteout_MdxCollisionShape,
) -> *const f32;
pub fn whiteout_mdx_MdxCollisionShape_assign_vertices(
self_: *mut whiteout_MdxCollisionShape,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxCollisionShape_get_radius(
self_: *mut whiteout_MdxCollisionShape,
) -> f32;
pub fn whiteout_mdx_MdxCollisionShape_set_radius(
self_: *mut whiteout_MdxCollisionShape,
value: f32,
);
pub fn whiteout_mdx_MdxFaceEffect_new() -> *mut whiteout_MdxFaceEffect;
pub fn whiteout_mdx_MdxFaceEffect_delete(self_: *mut whiteout_MdxFaceEffect);
pub fn whiteout_mdx_MdxFaceEffect_get_name(
self_: *mut whiteout_MdxFaceEffect,
) -> RawCString;
pub fn whiteout_mdx_MdxFaceEffect_set_name(
self_: *mut whiteout_MdxFaceEffect,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxFaceEffect_get_path(
self_: *mut whiteout_MdxFaceEffect,
) -> RawCString;
pub fn whiteout_mdx_MdxFaceEffect_set_path(
self_: *mut whiteout_MdxFaceEffect,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxCornEmitter_new() -> *mut whiteout_MdxCornEmitter;
pub fn whiteout_mdx_MdxCornEmitter_delete(self_: *mut whiteout_MdxCornEmitter);
pub fn whiteout_mdx_MdxCornEmitter_get_node(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxNode;
pub fn whiteout_mdx_MdxCornEmitter_set_node(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxNode,
);
pub fn whiteout_mdx_MdxCornEmitter_get_lifeSpan(self_: *mut whiteout_MdxCornEmitter)
-> f32;
pub fn whiteout_mdx_MdxCornEmitter_set_lifeSpan(
self_: *mut whiteout_MdxCornEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_emissionRate(
self_: *mut whiteout_MdxCornEmitter,
) -> f32;
pub fn whiteout_mdx_MdxCornEmitter_set_emissionRate(
self_: *mut whiteout_MdxCornEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_speed(self_: *mut whiteout_MdxCornEmitter) -> f32;
pub fn whiteout_mdx_MdxCornEmitter_set_speed(
self_: *mut whiteout_MdxCornEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_color(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut core::ffi::c_void;
pub fn whiteout_mdx_MdxCornEmitter_set_color(
self_: *mut whiteout_MdxCornEmitter,
value: *const core::ffi::c_void,
);
pub fn whiteout_mdx_MdxCornEmitter_get_alpha(self_: *mut whiteout_MdxCornEmitter) -> f32;
pub fn whiteout_mdx_MdxCornEmitter_set_alpha(
self_: *mut whiteout_MdxCornEmitter,
value: f32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_replaceableId(
self_: *mut whiteout_MdxCornEmitter,
) -> u32;
pub fn whiteout_mdx_MdxCornEmitter_set_replaceableId(
self_: *mut whiteout_MdxCornEmitter,
value: u32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_path(
self_: *mut whiteout_MdxCornEmitter,
) -> RawCString;
pub fn whiteout_mdx_MdxCornEmitter_set_path(
self_: *mut whiteout_MdxCornEmitter,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxCornEmitter_get_animVisibilityGuide(
self_: *mut whiteout_MdxCornEmitter,
) -> RawCString;
pub fn whiteout_mdx_MdxCornEmitter_set_animVisibilityGuide(
self_: *mut whiteout_MdxCornEmitter,
value: *const core::ffi::c_char,
);
pub fn whiteout_mdx_MdxCornEmitter_get_lifeSpanTracks(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxCornEmitter_set_lifeSpanTracks(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_emissionRateTracks(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxCornEmitter_set_emissionRateTracks(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_speedTracks(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxCornEmitter_set_speedTracks(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_colorTracks(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxCornEmitter_set_colorTracks(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxTrackVector3f,
);
pub fn whiteout_mdx_MdxCornEmitter_get_alphaTracks(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxCornEmitter_set_alphaTracks(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxCornEmitter_get_visibilityTracks(
self_: *mut whiteout_MdxCornEmitter,
) -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxCornEmitter_set_visibilityTracks(
self_: *mut whiteout_MdxCornEmitter,
value: *const whiteout_MdxTrackF32,
);
pub fn whiteout_mdx_MdxParser_new() -> *mut whiteout_MdxParser;
pub fn whiteout_mdx_MdxParser_new_upgradeMode(
_0: *mut core::ffi::c_void,
) -> *mut whiteout_MdxParser;
pub fn whiteout_mdx_MdxParser_delete(self_: *mut whiteout_MdxParser);
pub fn whiteout_mdx_MdxParser_parse(
self_: *mut whiteout_MdxParser,
file_path: *const core::ffi::c_char,
) -> *mut whiteout_MdxModel;
pub fn whiteout_mdx_MdxParser_parse_buffer_format(
self_: *mut whiteout_MdxParser,
buffer: *const u8,
buffer_size: usize,
format: i32,
) -> *mut whiteout_MdxModel;
pub fn whiteout_mdx_MdxParser_hasIssues(self_: *mut whiteout_MdxParser) -> i32;
pub fn whiteout_mdx_MdxParser_getIssues_count(self_: *mut whiteout_MdxParser) -> usize;
pub fn whiteout_mdx_MdxParser_getIssues_at(
self_: *mut whiteout_MdxParser,
index: usize,
) -> RawCString;
pub fn whiteout_mdx_MdxWriter_new() -> *mut whiteout_MdxWriter;
pub fn whiteout_mdx_MdxWriter_delete(self_: *mut whiteout_MdxWriter);
pub fn whiteout_mdx_MdxWriter_write(
self_: *mut whiteout_MdxWriter,
file_path: *const core::ffi::c_char,
mdlx: *mut whiteout_MdxModel,
mdl_format: i32,
);
pub fn whiteout_mdx_MdxWriter_write_mdx_format_mdlFormat(
self_: *mut whiteout_MdxWriter,
mdx: *mut whiteout_MdxModel,
format: i32,
mdl_format: i32,
) -> RawBytes;
pub fn whiteout_mdx_MdxTrackVector3f_new() -> *mut whiteout_MdxTrackVector3f;
pub fn whiteout_mdx_MdxTrackVector3f_delete(self_: *mut whiteout_MdxTrackVector3f);
pub fn whiteout_mdx_MdxTrackVector3f_get_isUsed(
self_: *mut whiteout_MdxTrackVector3f,
) -> i32;
pub fn whiteout_mdx_MdxTrackVector3f_set_isUsed(
self_: *mut whiteout_MdxTrackVector3f,
value: i32,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_interpolationType(
self_: *mut whiteout_MdxTrackVector3f,
) -> i32;
pub fn whiteout_mdx_MdxTrackVector3f_set_interpolationType(
self_: *mut whiteout_MdxTrackVector3f,
value: i32,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_globalSequenceId(
self_: *mut whiteout_MdxTrackVector3f,
) -> u32;
pub fn whiteout_mdx_MdxTrackVector3f_set_globalSequenceId(
self_: *mut whiteout_MdxTrackVector3f,
value: u32,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_keyCount(
self_: *mut whiteout_MdxTrackVector3f,
) -> usize;
pub fn whiteout_mdx_MdxTrackVector3f_set_keyCount(
self_: *mut whiteout_MdxTrackVector3f,
value: usize,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_timestamps_count(
self_: *mut whiteout_MdxTrackVector3f,
) -> usize;
pub fn whiteout_mdx_MdxTrackVector3f_resize_timestamps(
self_: *mut whiteout_MdxTrackVector3f,
count: usize,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_timestamps_data(
self_: *mut whiteout_MdxTrackVector3f,
) -> *const u32;
pub fn whiteout_mdx_MdxTrackVector3f_assign_timestamps(
self_: *mut whiteout_MdxTrackVector3f,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_keys_count(
self_: *mut whiteout_MdxTrackVector3f,
) -> usize;
pub fn whiteout_mdx_MdxTrackVector3f_resize_keys(
self_: *mut whiteout_MdxTrackVector3f,
count: usize,
);
pub fn whiteout_mdx_MdxTrackVector3f_get_keys_data(
self_: *mut whiteout_MdxTrackVector3f,
) -> *const f32;
pub fn whiteout_mdx_MdxTrackVector3f_assign_keys(
self_: *mut whiteout_MdxTrackVector3f,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackQuaternion_new() -> *mut whiteout_MdxTrackQuaternion;
pub fn whiteout_mdx_MdxTrackQuaternion_delete(self_: *mut whiteout_MdxTrackQuaternion);
pub fn whiteout_mdx_MdxTrackQuaternion_get_isUsed(
self_: *mut whiteout_MdxTrackQuaternion,
) -> i32;
pub fn whiteout_mdx_MdxTrackQuaternion_set_isUsed(
self_: *mut whiteout_MdxTrackQuaternion,
value: i32,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_interpolationType(
self_: *mut whiteout_MdxTrackQuaternion,
) -> i32;
pub fn whiteout_mdx_MdxTrackQuaternion_set_interpolationType(
self_: *mut whiteout_MdxTrackQuaternion,
value: i32,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_globalSequenceId(
self_: *mut whiteout_MdxTrackQuaternion,
) -> u32;
pub fn whiteout_mdx_MdxTrackQuaternion_set_globalSequenceId(
self_: *mut whiteout_MdxTrackQuaternion,
value: u32,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_keyCount(
self_: *mut whiteout_MdxTrackQuaternion,
) -> usize;
pub fn whiteout_mdx_MdxTrackQuaternion_set_keyCount(
self_: *mut whiteout_MdxTrackQuaternion,
value: usize,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_timestamps_count(
self_: *mut whiteout_MdxTrackQuaternion,
) -> usize;
pub fn whiteout_mdx_MdxTrackQuaternion_resize_timestamps(
self_: *mut whiteout_MdxTrackQuaternion,
count: usize,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_timestamps_data(
self_: *mut whiteout_MdxTrackQuaternion,
) -> *const u32;
pub fn whiteout_mdx_MdxTrackQuaternion_assign_timestamps(
self_: *mut whiteout_MdxTrackQuaternion,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_keys_count(
self_: *mut whiteout_MdxTrackQuaternion,
) -> usize;
pub fn whiteout_mdx_MdxTrackQuaternion_resize_keys(
self_: *mut whiteout_MdxTrackQuaternion,
count: usize,
);
pub fn whiteout_mdx_MdxTrackQuaternion_get_keys_data(
self_: *mut whiteout_MdxTrackQuaternion,
) -> *const f32;
pub fn whiteout_mdx_MdxTrackQuaternion_assign_keys(
self_: *mut whiteout_MdxTrackQuaternion,
data: *const f32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackU32_new() -> *mut whiteout_MdxTrackU32;
pub fn whiteout_mdx_MdxTrackU32_delete(self_: *mut whiteout_MdxTrackU32);
pub fn whiteout_mdx_MdxTrackU32_get_isUsed(self_: *mut whiteout_MdxTrackU32) -> i32;
pub fn whiteout_mdx_MdxTrackU32_set_isUsed(self_: *mut whiteout_MdxTrackU32, value: i32);
pub fn whiteout_mdx_MdxTrackU32_get_interpolationType(
self_: *mut whiteout_MdxTrackU32,
) -> i32;
pub fn whiteout_mdx_MdxTrackU32_set_interpolationType(
self_: *mut whiteout_MdxTrackU32,
value: i32,
);
pub fn whiteout_mdx_MdxTrackU32_get_globalSequenceId(
self_: *mut whiteout_MdxTrackU32,
) -> u32;
pub fn whiteout_mdx_MdxTrackU32_set_globalSequenceId(
self_: *mut whiteout_MdxTrackU32,
value: u32,
);
pub fn whiteout_mdx_MdxTrackU32_get_keyCount(self_: *mut whiteout_MdxTrackU32) -> usize;
pub fn whiteout_mdx_MdxTrackU32_set_keyCount(
self_: *mut whiteout_MdxTrackU32,
value: usize,
);
pub fn whiteout_mdx_MdxTrackU32_get_timestamps_count(
self_: *mut whiteout_MdxTrackU32,
) -> usize;
pub fn whiteout_mdx_MdxTrackU32_resize_timestamps(
self_: *mut whiteout_MdxTrackU32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackU32_get_timestamps_data(
self_: *mut whiteout_MdxTrackU32,
) -> *const u32;
pub fn whiteout_mdx_MdxTrackU32_assign_timestamps(
self_: *mut whiteout_MdxTrackU32,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackU32_get_keys_count(self_: *mut whiteout_MdxTrackU32) -> usize;
pub fn whiteout_mdx_MdxTrackU32_resize_keys(self_: *mut whiteout_MdxTrackU32, count: usize);
pub fn whiteout_mdx_MdxTrackU32_get_keys_data(
self_: *mut whiteout_MdxTrackU32,
) -> *const u32;
pub fn whiteout_mdx_MdxTrackU32_assign_keys(
self_: *mut whiteout_MdxTrackU32,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackF32_new() -> *mut whiteout_MdxTrackF32;
pub fn whiteout_mdx_MdxTrackF32_delete(self_: *mut whiteout_MdxTrackF32);
pub fn whiteout_mdx_MdxTrackF32_get_isUsed(self_: *mut whiteout_MdxTrackF32) -> i32;
pub fn whiteout_mdx_MdxTrackF32_set_isUsed(self_: *mut whiteout_MdxTrackF32, value: i32);
pub fn whiteout_mdx_MdxTrackF32_get_interpolationType(
self_: *mut whiteout_MdxTrackF32,
) -> i32;
pub fn whiteout_mdx_MdxTrackF32_set_interpolationType(
self_: *mut whiteout_MdxTrackF32,
value: i32,
);
pub fn whiteout_mdx_MdxTrackF32_get_globalSequenceId(
self_: *mut whiteout_MdxTrackF32,
) -> u32;
pub fn whiteout_mdx_MdxTrackF32_set_globalSequenceId(
self_: *mut whiteout_MdxTrackF32,
value: u32,
);
pub fn whiteout_mdx_MdxTrackF32_get_keyCount(self_: *mut whiteout_MdxTrackF32) -> usize;
pub fn whiteout_mdx_MdxTrackF32_set_keyCount(
self_: *mut whiteout_MdxTrackF32,
value: usize,
);
pub fn whiteout_mdx_MdxTrackF32_get_timestamps_count(
self_: *mut whiteout_MdxTrackF32,
) -> usize;
pub fn whiteout_mdx_MdxTrackF32_resize_timestamps(
self_: *mut whiteout_MdxTrackF32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackF32_get_timestamps_data(
self_: *mut whiteout_MdxTrackF32,
) -> *const u32;
pub fn whiteout_mdx_MdxTrackF32_assign_timestamps(
self_: *mut whiteout_MdxTrackF32,
data: *const u32,
count: usize,
);
pub fn whiteout_mdx_MdxTrackF32_get_keys_count(self_: *mut whiteout_MdxTrackF32) -> usize;
pub fn whiteout_mdx_MdxTrackF32_resize_keys(self_: *mut whiteout_MdxTrackF32, count: usize);
pub fn whiteout_mdx_MdxTrackF32_get_keys_data(
self_: *mut whiteout_MdxTrackF32,
) -> *const f32;
pub fn whiteout_mdx_MdxTrackF32_assign_keys(
self_: *mut whiteout_MdxTrackF32,
data: *const f32,
count: usize,
);
}
}