From e438310d8cc3718fdc32d62462b8217569f9c766 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Sat, 25 Apr 2020 00:12:58 -0400 Subject: [PATCH 01/11] should have added these earlier --- port/assimp_rs/src/structs/blob.rs | 0 port/assimp_rs/src/structs/bone.rs | 0 port/assimp_rs/src/structs/camera.rs | 0 port/assimp_rs/src/structs/color.rs | 0 port/assimp_rs/src/structs/face.rs | 0 port/assimp_rs/src/structs/key.rs | 0 port/assimp_rs/src/structs/light.rs | 0 port/assimp_rs/src/structs/material.rs | 0 port/assimp_rs/src/structs/matrix.rs | 0 port/assimp_rs/src/structs/mem.rs | 0 port/assimp_rs/src/structs/mesh.rs | 0 port/assimp_rs/src/structs/meta.rs | 0 port/assimp_rs/src/structs/node.rs | 0 port/assimp_rs/src/structs/plane.rs | 0 port/assimp_rs/src/structs/quaternion.rs | 0 port/assimp_rs/src/structs/ray.rs | 0 port/assimp_rs/src/structs/scene.rs | 0 port/assimp_rs/src/structs/string.rs | 0 port/assimp_rs/src/structs/texel.rs | 0 port/assimp_rs/src/structs/texture.rs | 0 port/assimp_rs/src/structs/transform.rs | 0 port/assimp_rs/src/structs/vec.rs | 0 port/assimp_rs/src/structs/vertex_weight.rs | 0 23 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 port/assimp_rs/src/structs/blob.rs create mode 100644 port/assimp_rs/src/structs/bone.rs create mode 100644 port/assimp_rs/src/structs/camera.rs create mode 100644 port/assimp_rs/src/structs/color.rs create mode 100644 port/assimp_rs/src/structs/face.rs create mode 100644 port/assimp_rs/src/structs/key.rs create mode 100644 port/assimp_rs/src/structs/light.rs create mode 100644 port/assimp_rs/src/structs/material.rs create mode 100644 port/assimp_rs/src/structs/matrix.rs create mode 100644 port/assimp_rs/src/structs/mem.rs create mode 100644 port/assimp_rs/src/structs/mesh.rs create mode 100644 port/assimp_rs/src/structs/meta.rs create mode 100644 port/assimp_rs/src/structs/node.rs create mode 100644 port/assimp_rs/src/structs/plane.rs create mode 100644 port/assimp_rs/src/structs/quaternion.rs create mode 100644 port/assimp_rs/src/structs/ray.rs create mode 100644 port/assimp_rs/src/structs/scene.rs create mode 100644 port/assimp_rs/src/structs/string.rs create mode 100644 port/assimp_rs/src/structs/texel.rs create mode 100644 port/assimp_rs/src/structs/texture.rs create mode 100644 port/assimp_rs/src/structs/transform.rs create mode 100644 port/assimp_rs/src/structs/vec.rs create mode 100644 port/assimp_rs/src/structs/vertex_weight.rs diff --git a/port/assimp_rs/src/structs/blob.rs b/port/assimp_rs/src/structs/blob.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/bone.rs b/port/assimp_rs/src/structs/bone.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/camera.rs b/port/assimp_rs/src/structs/camera.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/color.rs b/port/assimp_rs/src/structs/color.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/face.rs b/port/assimp_rs/src/structs/face.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/key.rs b/port/assimp_rs/src/structs/key.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/light.rs b/port/assimp_rs/src/structs/light.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/material.rs b/port/assimp_rs/src/structs/material.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/matrix.rs b/port/assimp_rs/src/structs/matrix.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/mem.rs b/port/assimp_rs/src/structs/mem.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/mesh.rs b/port/assimp_rs/src/structs/mesh.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/meta.rs b/port/assimp_rs/src/structs/meta.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/node.rs b/port/assimp_rs/src/structs/node.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/plane.rs b/port/assimp_rs/src/structs/plane.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/quaternion.rs b/port/assimp_rs/src/structs/quaternion.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/ray.rs b/port/assimp_rs/src/structs/ray.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/scene.rs b/port/assimp_rs/src/structs/scene.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/string.rs b/port/assimp_rs/src/structs/string.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/texel.rs b/port/assimp_rs/src/structs/texel.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/texture.rs b/port/assimp_rs/src/structs/texture.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/transform.rs b/port/assimp_rs/src/structs/transform.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/vec.rs b/port/assimp_rs/src/structs/vec.rs new file mode 100644 index 000000000..e69de29bb diff --git a/port/assimp_rs/src/structs/vertex_weight.rs b/port/assimp_rs/src/structs/vertex_weight.rs new file mode 100644 index 000000000..e69de29bb From c6f2196f60fb219c1de423c0e27e04eba05c6c90 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 16:32:25 -0400 Subject: [PATCH 02/11] vector definitions --- port/assimp_rs/src/structs/vec.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/port/assimp_rs/src/structs/vec.rs b/port/assimp_rs/src/structs/vec.rs index e69de29bb..37e1c5150 100644 --- a/port/assimp_rs/src/structs/vec.rs +++ b/port/assimp_rs/src/structs/vec.rs @@ -0,0 +1,29 @@ +struct Vector2d { + x: f32, + y: f32 +} + +struct Vector3d { + x: f32, + y: f32, + z: f32 +} + +impl Vector2d { + pub fn new(x_f32: f32, y_f32: f32) -> Vector2d { + Vector2d { + x: x_f32, + y: y_f32 + } + } +} + +impl Vector3d { + pub fn new(x_f32: f32, y_f32: f32, z_f32: f32) -> Vector3d { + Vector3d { + x: x_f32, + y: y_f32, + z: z_f32 + } + } +} From c338c5ca02e4b05d50275844f8aa89895c69a1a1 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 16:47:35 -0400 Subject: [PATCH 03/11] Populating 3d and 4d matrix struct definitions --- port/assimp_rs/src/structs/matrix.rs | 64 ++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/port/assimp_rs/src/structs/matrix.rs b/port/assimp_rs/src/structs/matrix.rs index e69de29bb..4673b2d69 100644 --- a/port/assimp_rs/src/structs/matrix.rs +++ b/port/assimp_rs/src/structs/matrix.rs @@ -0,0 +1,64 @@ +#[derive(Clone, Debug, Copy)] +struct Matrix3x3 { + a1: f32, + a2: f32, + a3: f32, + b1: f32, + b2: f32, + b3: f32, + c1: f32, + c2: f32, + c3: f32 +} + +#[derive(Clone, Debug, Copy)] +struct Matrix4x4 { + a1: f32, + a2: f32, + a3: f32, + a4: f32, + b1: f32, + b2: f32, + b3: f32, + b4: f32, + c1: f32, + c2: f32, + c3: f32, + c4: f32, + d1: f32, + d2: f32, + d3: f32, + d4: f32 +} + +impl Matrix3x3 { + pub fn new( + a1_f32: f32, a2_f32: f32, a3_f32: f32, + b1_f32: f32, b2_f32: f32, b3_f32: f32, + c1_f32: f32, c2_f32: f32, c3_f32: f32 + ) -> Matrix3x3 { + Matrix3x3 { + a1: a1_f32, a2: a2_f32, a3: a3_f32, + b1: b1_f32, b2: b2_f32, b3: b3_f32, + c1: c1_f32, c2: c2_f32, c3: c3_f32 + } + } +} + +impl Matrix4x4 { + pub fn new( + a1_f32: f32, a2_f32: f32, a3_f32: f32, a4_f32: f32, + b1_f32: f32, b2_f32: f32, b3_f32: f32, b4_f32: f32, + c1_f32: f32, c2_f32: f32, c3_f32: f32, c4_f32: f32, + d1_f32: f32, d2_f32: f32, d3_f32: f32, d4_f32: f32 + ) -> Matrix4x4 { + Matrix4x4 { + a1: a1_f32, a2: a2_f32, a3: a3_f32, a4: a4_f32, + b1: b1_f32, b2: b2_f32, b3: b3_f32, b4: b4_f32, + c1: c1_f32, c2: c2_f32, c3: c3_f32, c4: c4_f32, + d1: d1_f32, d2: d2_f32, d3: d3_f32, d4: d4_f32 + } + } +} + + From 4f8eb0f79ca0c1d88fab2bd357527e1d40137ee8 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 16:50:31 -0400 Subject: [PATCH 04/11] populating Texel struct definition for textures --- port/assimp_rs/src/structs/texel.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/port/assimp_rs/src/structs/texel.rs b/port/assimp_rs/src/structs/texel.rs index e69de29bb..b2c72f30e 100644 --- a/port/assimp_rs/src/structs/texel.rs +++ b/port/assimp_rs/src/structs/texel.rs @@ -0,0 +1,19 @@ +#[derive(Clone, Debug, Copy)] +struct Texel { + b: u32, + g: u32, + r: u32, + a: u32 +} + +impl Texel { + pub fn new(b_u32: u32, g_u32: u32, + r_u32: u32, a_u32: u32) -> Texel { + Texel { + b: b_u32, + g: g_u32, + r: r_u32, + a: a_u32 + } + } +} From ba633f95bb1af4bbca82738a95bf569cef035a35 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 16:54:56 -0400 Subject: [PATCH 05/11] populating colors --- port/assimp_rs/src/structs/color.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/port/assimp_rs/src/structs/color.rs b/port/assimp_rs/src/structs/color.rs index e69de29bb..0b5fc6413 100644 --- a/port/assimp_rs/src/structs/color.rs +++ b/port/assimp_rs/src/structs/color.rs @@ -0,0 +1,27 @@ +#[derive(Clone, Debug, Copy)] +struct Color3D { + r: f32, + g: f32, + b: f32 +} + +impl Color3D { + pub fn new(r_f32: f32, g_f32: f32, b_f32: f32) -> Color3D { + Color3D {r: r_f32, g: g_f32, b: b_f32 } + } +} + +#[derive(Clone, Debug, Copy)] +struct Color4D { + r: f32, + g: f32, + b: f32, + a: f32 +} + +impl Color4D { + pub fn new(r_f32: f32, g_f32: f32, b_f32: f32, a_f32: f32) -> Color4D { + Color4D {r: r_f32, g: g_f32, b: b_f32, a: a_f32 } + } +} + From 38b80f6c6b7dd60b0366af8eaaeca9a179128f33 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 16:58:32 -0400 Subject: [PATCH 06/11] populating plane struct --- port/assimp_rs/src/structs/plane.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/port/assimp_rs/src/structs/plane.rs b/port/assimp_rs/src/structs/plane.rs index e69de29bb..2b0b74499 100644 --- a/port/assimp_rs/src/structs/plane.rs +++ b/port/assimp_rs/src/structs/plane.rs @@ -0,0 +1,23 @@ +#[derive(Clone, Debug, Copy)] +struct Plane { + a: f32, + b: f32, + c: f32, + d: f32 +} + +impl Plane { + pub fn new( + a_f32: f32, + b_f32: f32, + c_f32: f32, + d_f32: f32 + ) -> Plane { + Plane { + a: a_f32, + b: b_f32, + c: b_f32, + d: d_f32 + } + } +} From e6837f73949d1d797f71531d0d6ba08dfee6a5fb Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 17:25:02 -0400 Subject: [PATCH 07/11] Need to consider different implementations of String kinds in Rust, and additionally how we may want to `impl Copy for Str`, i.e. `std::mem::swap` with placeholders to keep performance up. --- port/assimp_rs/src/structs/string.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/port/assimp_rs/src/structs/string.rs b/port/assimp_rs/src/structs/string.rs index e69de29bb..c99fabffb 100644 --- a/port/assimp_rs/src/structs/string.rs +++ b/port/assimp_rs/src/structs/string.rs @@ -0,0 +1,17 @@ +pub const MAXLEN: u32 = 1024; + +#[derive(Clone, Debug)] +struct Str { + length: u32, + data: Vec +} + +impl Str { + pub fn new(len_u32: u32, data_string: String) -> Str { + Str { + length: len_u32, + data: data_string.chars().collect() + } + } +} + From a286506c234068bbab212eb7de4c8ea5e853a934 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 17:32:55 -0400 Subject: [PATCH 08/11] fixed a couple of things. Adding MaterialPropertyString --- port/assimp_rs/src/structs/string.rs | 30 +++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/port/assimp_rs/src/structs/string.rs b/port/assimp_rs/src/structs/string.rs index c99fabffb..b88457df4 100644 --- a/port/assimp_rs/src/structs/string.rs +++ b/port/assimp_rs/src/structs/string.rs @@ -1,13 +1,16 @@ -pub const MAXLEN: u32 = 1024; +pub const MAXLEN: usize = 1024; +/// Want to consider replacing `Vec` +/// with a comparable definition at +/// https://doc.rust-lang.org/src/alloc/string.rs.html#415-417 #[derive(Clone, Debug)] struct Str { - length: u32, + length: usize, data: Vec } impl Str { - pub fn new(len_u32: u32, data_string: String) -> Str { + pub fn new(len_u32: usize, data_string: String) -> Str { Str { length: len_u32, data: data_string.chars().collect() @@ -15,3 +18,24 @@ impl Str { } } +/// MaterialPropertyStr +/// The size of length is truncated to 4 bytes on a 64-bit platform when used as a +/// material property (see MaterialSystem.cpp, as aiMaterial::AddProperty() ). +#[derive(Clone, Debug)] +struct MaterialPropertyStr { + length: usize, + data: Vec +} + + +impl MaterialPropertyStr { + pub fn new(len_u32: usize, data_string: String) -> MaterialPropertyStr { + MaterialPropertyStr { + length: len_u32, + data: data_string.chars().collect() + } + } +} + + + From 2d43a2447530fe2abe30f9aaeae558212734c231 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 17:41:16 -0400 Subject: [PATCH 09/11] memory info struct --- port/assimp_rs/src/structs/mem.rs | 0 port/assimp_rs/src/structs/memory.rs | 35 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) delete mode 100644 port/assimp_rs/src/structs/mem.rs create mode 100644 port/assimp_rs/src/structs/memory.rs diff --git a/port/assimp_rs/src/structs/mem.rs b/port/assimp_rs/src/structs/mem.rs deleted file mode 100644 index e69de29bb..000000000 diff --git a/port/assimp_rs/src/structs/memory.rs b/port/assimp_rs/src/structs/memory.rs new file mode 100644 index 000000000..c076f172a --- /dev/null +++ b/port/assimp_rs/src/structs/memory.rs @@ -0,0 +1,35 @@ +#[derive(Clone, Debug, Copy)] +struct MemoryInfo { + textures: u32, + materials: u32, + meshes: u32, + nodes: u32, + animations: u32, + cameras: u32, + lights: u32, + total: u32 +} + +impl MemoryInfo { + pub fn new( + textures_uint: u32, + materials_uint: u32, + meshes_uint: u32, + nodes_uint: u32, + animations_uint: u32, + cameras_uint: u32, + lights_uint: u32, + total_uint: u32) -> MemoryInfo { + + MemoryInfo { + textures: textures_uint, + materials: materials_uint, + meshes: meshes_uint, + nodes: nodes_uint, + animations: animations_uint, + cameras: cameras_uint, + lights: lights_uint, + total: total_uint + } + } +} From 778c3afbbb052bea25d6eaaccba1d663432b0b27 Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 18:11:44 -0400 Subject: [PATCH 10/11] Rust's import system dictates that we must make directories rather than use individual files to provide a clean public interface --- port/PyAssimp/pyassimp/.structs.py.swp | Bin 0 -> 16384 bytes port/assimp_rs/src/camera/mod.rs | 1 + port/assimp_rs/src/structs/.mod.rs.swp | Bin 0 -> 12288 bytes port/assimp_rs/src/structs/{ => anim}/anim.rs | 0 port/assimp_rs/src/structs/anim/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => blob}/blob.rs | 0 port/assimp_rs/src/structs/blob/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => bone}/bone.rs | 0 port/assimp_rs/src/structs/bone/mod.rs | 2 ++ .../src/structs/{ => camera}/camera.rs | 0 port/assimp_rs/src/structs/camera/mod.rs | 2 ++ .../src/structs/{ => color}/color.rs | 0 port/assimp_rs/src/structs/color/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => face}/face.rs | 0 port/assimp_rs/src/structs/face/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => key}/key.rs | 0 port/assimp_rs/src/structs/key/mod.rs | 2 ++ .../src/structs/{ => light}/light.rs | 0 port/assimp_rs/src/structs/light/mod.rs | 2 ++ .../src/structs/{ => material}/material.rs | 0 port/assimp_rs/src/structs/material/mod.rs | 2 ++ .../src/structs/{ => matrix}/matrix.rs | 0 port/assimp_rs/src/structs/matrix/mod.rs | 2 ++ .../src/structs/{ => memory}/memory.rs | 0 port/assimp_rs/src/structs/memory/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => mesh}/mesh.rs | 0 port/assimp_rs/src/structs/mesh/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => meta}/meta.rs | 0 port/assimp_rs/src/structs/meta/mod.rs | 2 ++ port/assimp_rs/src/structs/node/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => node}/node.rs | 0 port/assimp_rs/src/structs/plane/mod.rs | 2 ++ .../src/structs/{ => plane}/plane.rs | 0 port/assimp_rs/src/structs/quaternion/mod.rs | 2 ++ .../src/structs/quaternion/quaternion.rs | 7 +++++++ port/assimp_rs/src/structs/ray/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => ray}/ray.rs | 0 port/assimp_rs/src/structs/scene/mod.rs | 2 ++ .../src/structs/{ => scene}/scene.rs | 0 port/assimp_rs/src/structs/string/mod.rs | 2 ++ .../src/structs/{ => string}/string.rs | 0 port/assimp_rs/src/structs/texel/mod.rs | 2 ++ .../src/structs/{ => texel}/texel.rs | 0 port/assimp_rs/src/structs/texture/mod.rs | 2 ++ .../src/structs/{ => texture}/texture.rs | 0 port/assimp_rs/src/structs/transform/mod.rs | 2 ++ .../src/structs/{ => transform}/transform.rs | 0 port/assimp_rs/src/structs/vec/mod.rs | 2 ++ port/assimp_rs/src/structs/{ => vec}/vec.rs | 19 ++++++++++++++++++ port/assimp_rs/src/structs/vertex/mod.rs | 2 ++ .../{quaternion.rs => vertex/vertex.rs} | 0 port/assimp_rs/src/structs/vertex_weight.rs | 0 52 files changed, 75 insertions(+) create mode 100644 port/PyAssimp/pyassimp/.structs.py.swp create mode 100644 port/assimp_rs/src/structs/.mod.rs.swp rename port/assimp_rs/src/structs/{ => anim}/anim.rs (100%) create mode 100644 port/assimp_rs/src/structs/anim/mod.rs rename port/assimp_rs/src/structs/{ => blob}/blob.rs (100%) create mode 100644 port/assimp_rs/src/structs/blob/mod.rs rename port/assimp_rs/src/structs/{ => bone}/bone.rs (100%) create mode 100644 port/assimp_rs/src/structs/bone/mod.rs rename port/assimp_rs/src/structs/{ => camera}/camera.rs (100%) create mode 100644 port/assimp_rs/src/structs/camera/mod.rs rename port/assimp_rs/src/structs/{ => color}/color.rs (100%) create mode 100644 port/assimp_rs/src/structs/color/mod.rs rename port/assimp_rs/src/structs/{ => face}/face.rs (100%) create mode 100644 port/assimp_rs/src/structs/face/mod.rs rename port/assimp_rs/src/structs/{ => key}/key.rs (100%) create mode 100644 port/assimp_rs/src/structs/key/mod.rs rename port/assimp_rs/src/structs/{ => light}/light.rs (100%) create mode 100644 port/assimp_rs/src/structs/light/mod.rs rename port/assimp_rs/src/structs/{ => material}/material.rs (100%) create mode 100644 port/assimp_rs/src/structs/material/mod.rs rename port/assimp_rs/src/structs/{ => matrix}/matrix.rs (100%) create mode 100644 port/assimp_rs/src/structs/matrix/mod.rs rename port/assimp_rs/src/structs/{ => memory}/memory.rs (100%) create mode 100644 port/assimp_rs/src/structs/memory/mod.rs rename port/assimp_rs/src/structs/{ => mesh}/mesh.rs (100%) create mode 100644 port/assimp_rs/src/structs/mesh/mod.rs rename port/assimp_rs/src/structs/{ => meta}/meta.rs (100%) create mode 100644 port/assimp_rs/src/structs/meta/mod.rs create mode 100644 port/assimp_rs/src/structs/node/mod.rs rename port/assimp_rs/src/structs/{ => node}/node.rs (100%) create mode 100644 port/assimp_rs/src/structs/plane/mod.rs rename port/assimp_rs/src/structs/{ => plane}/plane.rs (100%) create mode 100644 port/assimp_rs/src/structs/quaternion/mod.rs create mode 100644 port/assimp_rs/src/structs/quaternion/quaternion.rs create mode 100644 port/assimp_rs/src/structs/ray/mod.rs rename port/assimp_rs/src/structs/{ => ray}/ray.rs (100%) create mode 100644 port/assimp_rs/src/structs/scene/mod.rs rename port/assimp_rs/src/structs/{ => scene}/scene.rs (100%) create mode 100644 port/assimp_rs/src/structs/string/mod.rs rename port/assimp_rs/src/structs/{ => string}/string.rs (100%) create mode 100644 port/assimp_rs/src/structs/texel/mod.rs rename port/assimp_rs/src/structs/{ => texel}/texel.rs (100%) create mode 100644 port/assimp_rs/src/structs/texture/mod.rs rename port/assimp_rs/src/structs/{ => texture}/texture.rs (100%) create mode 100644 port/assimp_rs/src/structs/transform/mod.rs rename port/assimp_rs/src/structs/{ => transform}/transform.rs (100%) create mode 100644 port/assimp_rs/src/structs/vec/mod.rs rename port/assimp_rs/src/structs/{ => vec}/vec.rs (60%) create mode 100644 port/assimp_rs/src/structs/vertex/mod.rs rename port/assimp_rs/src/structs/{quaternion.rs => vertex/vertex.rs} (100%) delete mode 100644 port/assimp_rs/src/structs/vertex_weight.rs diff --git a/port/PyAssimp/pyassimp/.structs.py.swp b/port/PyAssimp/pyassimp/.structs.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..1de72f0f8f12a4e35de38089723ca2b124ce4459 GIT binary patch literal 16384 zcmeI3%a0sK9mgB6iHYMl1TIK{RK^0&Mzga|k;Me0C3d7GyX&=g6Cwzi)O6R(R9xLX z>8_rgK@kuRJYvMdjs(Kt0$BV3Mu?Xp3oPIO7X$(h9EcRK5lARPfjkI&tGap~J>#7j zBo3fz`Qx7MU)8UxzV(={U(HtMA6VNUE9C_T$1RStx&HNsfAQV}PW4{L@o0;C>i(ER z(54KVV-msqQSETf4Lvs3VnHjOqjAjr=3Fz3;2<0Si4ogDqt0`3RnfK0#*U5fK|XM@PDL$Y~JL24E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()k6Z5)<|H0+gA z_t%lzf9gSMi?2h%rrIZ?qNFP2hq@*)HY=oRTq+TPs3zD-*yX4Ly5W4TYN|-ReU5G= nwF)HG%|eW7Lj_&W_7Sr-&d%B}qN)3((b5kzPU^1PHqO5R$L{t! literal 0 HcmV?d00001 diff --git a/port/assimp_rs/src/camera/mod.rs b/port/assimp_rs/src/camera/mod.rs index e69de29bb..26ca1185b 100644 --- a/port/assimp_rs/src/camera/mod.rs +++ b/port/assimp_rs/src/camera/mod.rs @@ -0,0 +1 @@ +pub use self::structs::{Camera}; diff --git a/port/assimp_rs/src/structs/.mod.rs.swp b/port/assimp_rs/src/structs/.mod.rs.swp new file mode 100644 index 0000000000000000000000000000000000000000..a6b06ed631bd7b51b0450777a8e7c266e3c9b7eb GIT binary patch literal 12288 zcmeI2J!lj`6vrnP+L&mxwOBtO5HOqMt_U0iV-iKei7{SEh|Ig3(heX@lGo;^SfLz&vlmXl7!`TThI@)NcbI*c9hSRY9+a!XHvU( zMJiv(&{tZvL#_NIi^indy*6c#0Wz?Ifwo>fJvG>dqiZe1P4;q4v3hO}qQRUw1d88yO%2WPl8i0Wv@a$N(8217v^< zkO4BV2Muuiz&~@4vBn@akKg~x|Np-oV(c^c2;PC$;3aql9)k^VAKV4&K!O-t1DC-Z zI0LF+1RMjyU_aOgz7H|>1#E-&U<)qicSu_%17v^&eA{E}K&+q}Wr_7*c!yq#e5*o`_Bu~|9CX+HvmlH**%$qO04|6^L7FO zbjxF2s>BvW+;6=sLY>J4(KFo^u}2ryg=*F_nK#YY9oK}W@O1&h&e&`gXR;cZ6dP6| zn-ZF7`@&{{f$b)%LKXO3(*H*$SciunYOxj9J6Eji9=Fh{%sA%q7 Vector2d { Vector2d { @@ -27,3 +34,15 @@ impl Vector3d { } } } + +impl Vector4d { + pub fn new(x_f32: f32, y_f32: f32, z_f32: f32, w_f32: f32) -> Vector4d { + Vector4d { + x: x_f32, + y: y_f32, + z: z_f32, + w: w_f32 + } + } +} + diff --git a/port/assimp_rs/src/structs/vertex/mod.rs b/port/assimp_rs/src/structs/vertex/mod.rs new file mode 100644 index 000000000..d169246ce --- /dev/null +++ b/port/assimp_rs/src/structs/vertex/mod.rs @@ -0,0 +1,2 @@ +mod vertex; + diff --git a/port/assimp_rs/src/structs/quaternion.rs b/port/assimp_rs/src/structs/vertex/vertex.rs similarity index 100% rename from port/assimp_rs/src/structs/quaternion.rs rename to port/assimp_rs/src/structs/vertex/vertex.rs diff --git a/port/assimp_rs/src/structs/vertex_weight.rs b/port/assimp_rs/src/structs/vertex_weight.rs deleted file mode 100644 index e69de29bb..000000000 From 57e837092e6aaedf69912729b45568af30a20ffc Mon Sep 17 00:00:00 2001 From: David Golembiowski Date: Fri, 1 May 2020 18:23:14 -0400 Subject: [PATCH 11/11] populated module level files --- port/PyAssimp/pyassimp/.structs.py.swp | Bin 16384 -> 0 bytes port/assimp_rs/src/structs/.mod.rs.swp | Bin 12288 -> 0 bytes port/assimp_rs/src/structs/anim/mod.rs | 6 +++++- port/assimp_rs/src/structs/color/mod.rs | 5 ++++- port/assimp_rs/src/structs/matrix/mod.rs | 4 +++- port/assimp_rs/src/structs/memory/mod.rs | 2 +- port/assimp_rs/src/structs/mesh/mod.rs | 1 + port/assimp_rs/src/structs/quaternion/mod.rs | 1 + port/assimp_rs/src/structs/string/mod.rs | 3 ++- port/assimp_rs/src/structs/texel/mod.rs | 2 -- port/assimp_rs/src/structs/texel/texel.rs | 19 ------------------ port/assimp_rs/src/structs/texture/mod.rs | 1 + port/assimp_rs/src/structs/texture/texture.rs | 19 ++++++++++++++++++ port/assimp_rs/src/structs/vertex/mod.rs | 2 +- 14 files changed, 38 insertions(+), 27 deletions(-) delete mode 100644 port/PyAssimp/pyassimp/.structs.py.swp delete mode 100644 port/assimp_rs/src/structs/.mod.rs.swp delete mode 100644 port/assimp_rs/src/structs/texel/mod.rs delete mode 100644 port/assimp_rs/src/structs/texel/texel.rs diff --git a/port/PyAssimp/pyassimp/.structs.py.swp b/port/PyAss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oY=3=2fcvSaiq$wEUlf^XE za(lVdi}L38Qv9umw-BGyD=M{csWgWozH5Qn$3cu#1)WR83rP@4M069k(Q~Y%Ef)L@ zZ1I@bv{@q+vs*Jmj$Im%DocZth+?WO8*I-YYDwj6++;4VahLeUqY7W{G9mKu<0Rm6 z7Lno>i(<7cQX>7I0xyhWf*4YWh;BrDY*>h%Z&lJX?(6h-4eTMQP_VLQG3c1oMOcLf z-Qw&vxZ6PSMHti(jt$djx62UZ5&R4rQs$oSR!}BPc1|rb!}{o`wepy+GmRpO;4-ff z*5TpH{u2p)E)hMFm#B3q8INK#yOol@h#MYShf_(mF;+x_jtqwLTRnQhZio330 z!2@!BR%p(!wdQ&MbiqD6=pQVP>s~n(()k6Z5)<|H0+gA z_t%lzf9gSMi?2h%rrIZ?qNFP2hq@*)HY=oRTq+TPs3zD-*yX4Ly5W4TYN|-ReU5G= nwF)HG%|eW7Lj_&W_7Sr-&d%B}qN)3((b5kzPU^1PHqO5R$L{t! diff --git a/port/assimp_rs/src/structs/.mod.rs.swp b/port/assimp_rs/src/structs/.mod.rs.swp deleted file mode 100644 index a6b06ed631bd7b51b0450777a8e7c266e3c9b7eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2J!lj`6vrnP+L&mxwOBtO5HOqMt_U0iV-iKei7{SEh|Ig3(heX@lGo;^SfLz&vlmXl7!`TThI@)NcbI*c9hSRY9+a!XHvU( zMJiv(&{tZvL#_NIi^indy*6c#0Wz?Ifwo>fJvG>dqiZe1P4;q4v3hO}qQRUw1d88yO%2WPl8i0Wv@a$N(8217v^< zkO4BV2Muuiz&~@4vBn@akKg~x|Np-oV(c^c2;PC$;3aql9)k^VAKV4&K!O-t1DC-Z zI0LF+1RMjyU_aOgz7H|>1#E-&U<)qicSu_%17v^&eA{E}K&+q}Wr_7*c!yq#e5*o`_Bu~|9CX+HvmlH**%$qO04|6^L7FO zbjxF2s>BvW+;6=sLY>J4(KFo^u}2ryg=*F_nK#YY9oK}W@O1&h&e&`gXR;cZ6dP6| zn-ZF7`@&{{f$b)%LKXO3(*H*$SciunYOxj9J6Eji9=Fh{%sA%q7 Texel { - Texel { - b: b_u32, - g: g_u32, - r: r_u32, - a: a_u32 - } - } -} diff --git a/port/assimp_rs/src/structs/texture/mod.rs b/port/assimp_rs/src/structs/texture/mod.rs index a9d56e75b..1b5c9308d 100644 --- a/port/assimp_rs/src/structs/texture/mod.rs +++ b/port/assimp_rs/src/structs/texture/mod.rs @@ -1,2 +1,3 @@ mod texture; +pub use self::texture::Texel; diff --git a/port/assimp_rs/src/structs/texture/texture.rs b/port/assimp_rs/src/structs/texture/texture.rs index e69de29bb..b2c72f30e 100644 --- a/port/assimp_rs/src/structs/texture/texture.rs +++ b/port/assimp_rs/src/structs/texture/texture.rs @@ -0,0 +1,19 @@ +#[derive(Clone, Debug, Copy)] +struct Texel { + b: u32, + g: u32, + r: u32, + a: u32 +} + +impl Texel { + pub fn new(b_u32: u32, g_u32: u32, + r_u32: u32, a_u32: u32) -> Texel { + Texel { + b: b_u32, + g: g_u32, + r: r_u32, + a: a_u32 + } + } +} diff --git a/port/assimp_rs/src/structs/vertex/mod.rs b/port/assimp_rs/src/structs/vertex/mod.rs index d169246ce..97ae3eced 100644 --- a/port/assimp_rs/src/structs/vertex/mod.rs +++ b/port/assimp_rs/src/structs/vertex/mod.rs @@ -1,2 +1,2 @@ mod vertex; - +// pub use self::vertex::