@@ -0,0 +1 @@
|
||||
pub use self::structs::{Camera};
|
||||
|
||||
6
port/assimp_rs/src/structs/anim/mod.rs
Normal file
6
port/assimp_rs/src/structs/anim/mod.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
mod anim;
|
||||
pub use self::anim::{
|
||||
Animation,
|
||||
NodeAnim,
|
||||
MeshAnim,
|
||||
MeshMorphAnim};
|
||||
0
port/assimp_rs/src/structs/blob/blob.rs
Normal file
0
port/assimp_rs/src/structs/blob/blob.rs
Normal file
2
port/assimp_rs/src/structs/blob/mod.rs
Normal file
2
port/assimp_rs/src/structs/blob/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod blob;
|
||||
|
||||
0
port/assimp_rs/src/structs/bone/bone.rs
Normal file
0
port/assimp_rs/src/structs/bone/bone.rs
Normal file
2
port/assimp_rs/src/structs/bone/mod.rs
Normal file
2
port/assimp_rs/src/structs/bone/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod bone;
|
||||
|
||||
0
port/assimp_rs/src/structs/camera/camera.rs
Normal file
0
port/assimp_rs/src/structs/camera/camera.rs
Normal file
2
port/assimp_rs/src/structs/camera/mod.rs
Normal file
2
port/assimp_rs/src/structs/camera/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod camera;
|
||||
|
||||
27
port/assimp_rs/src/structs/color/color.rs
Normal file
27
port/assimp_rs/src/structs/color/color.rs
Normal file
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
5
port/assimp_rs/src/structs/color/mod.rs
Normal file
5
port/assimp_rs/src/structs/color/mod.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod color;
|
||||
pub use self::color::{
|
||||
Color3D,
|
||||
Color4D
|
||||
};
|
||||
0
port/assimp_rs/src/structs/face/face.rs
Normal file
0
port/assimp_rs/src/structs/face/face.rs
Normal file
2
port/assimp_rs/src/structs/face/mod.rs
Normal file
2
port/assimp_rs/src/structs/face/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod face;
|
||||
|
||||
0
port/assimp_rs/src/structs/key/key.rs
Normal file
0
port/assimp_rs/src/structs/key/key.rs
Normal file
2
port/assimp_rs/src/structs/key/mod.rs
Normal file
2
port/assimp_rs/src/structs/key/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod key;
|
||||
|
||||
0
port/assimp_rs/src/structs/light/light.rs
Normal file
0
port/assimp_rs/src/structs/light/light.rs
Normal file
2
port/assimp_rs/src/structs/light/mod.rs
Normal file
2
port/assimp_rs/src/structs/light/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod light;
|
||||
|
||||
0
port/assimp_rs/src/structs/material/material.rs
Normal file
0
port/assimp_rs/src/structs/material/material.rs
Normal file
2
port/assimp_rs/src/structs/material/mod.rs
Normal file
2
port/assimp_rs/src/structs/material/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod material;
|
||||
|
||||
64
port/assimp_rs/src/structs/matrix/matrix.rs
Normal file
64
port/assimp_rs/src/structs/matrix/matrix.rs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
port/assimp_rs/src/structs/matrix/mod.rs
Normal file
4
port/assimp_rs/src/structs/matrix/mod.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
mod matrix;
|
||||
pub use self::matrix::{
|
||||
Matrix3x3,
|
||||
Matrix4x4};
|
||||
35
port/assimp_rs/src/structs/memory/memory.rs
Normal file
35
port/assimp_rs/src/structs/memory/memory.rs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
2
port/assimp_rs/src/structs/memory/mod.rs
Normal file
2
port/assimp_rs/src/structs/memory/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod memory;
|
||||
pub use self::memory::MemoryInfo;
|
||||
0
port/assimp_rs/src/structs/mesh/mesh.rs
Normal file
0
port/assimp_rs/src/structs/mesh/mesh.rs
Normal file
3
port/assimp_rs/src/structs/mesh/mod.rs
Normal file
3
port/assimp_rs/src/structs/mesh/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
mod mesh;
|
||||
|
||||
|
||||
0
port/assimp_rs/src/structs/meta/meta.rs
Normal file
0
port/assimp_rs/src/structs/meta/meta.rs
Normal file
2
port/assimp_rs/src/structs/meta/mod.rs
Normal file
2
port/assimp_rs/src/structs/meta/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod meta;
|
||||
|
||||
2
port/assimp_rs/src/structs/node/mod.rs
Normal file
2
port/assimp_rs/src/structs/node/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod node;
|
||||
|
||||
0
port/assimp_rs/src/structs/node/node.rs
Normal file
0
port/assimp_rs/src/structs/node/node.rs
Normal file
2
port/assimp_rs/src/structs/plane/mod.rs
Normal file
2
port/assimp_rs/src/structs/plane/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod plane;
|
||||
|
||||
23
port/assimp_rs/src/structs/plane/plane.rs
Normal file
23
port/assimp_rs/src/structs/plane/plane.rs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
3
port/assimp_rs/src/structs/quaternion/mod.rs
Normal file
3
port/assimp_rs/src/structs/quaternion/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
mod quaternion;
|
||||
|
||||
pub use self::quaternion::Quaternion;
|
||||
7
port/assimp_rs/src/structs/quaternion/quaternion.rs
Normal file
7
port/assimp_rs/src/structs/quaternion/quaternion.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use crate::vec;
|
||||
|
||||
#[derive(Clone, Debug, Copy)]
|
||||
pub struct Quaternion {
|
||||
_coordinates: vec::Vector4d
|
||||
|
||||
}
|
||||
2
port/assimp_rs/src/structs/ray/mod.rs
Normal file
2
port/assimp_rs/src/structs/ray/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod ray;
|
||||
|
||||
0
port/assimp_rs/src/structs/ray/ray.rs
Normal file
0
port/assimp_rs/src/structs/ray/ray.rs
Normal file
2
port/assimp_rs/src/structs/scene/mod.rs
Normal file
2
port/assimp_rs/src/structs/scene/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod scene;
|
||||
|
||||
0
port/assimp_rs/src/structs/scene/scene.rs
Normal file
0
port/assimp_rs/src/structs/scene/scene.rs
Normal file
3
port/assimp_rs/src/structs/string/mod.rs
Normal file
3
port/assimp_rs/src/structs/string/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
mod string;
|
||||
pub use self::string::MAXLEN;
|
||||
pub use self::string::Str;
|
||||
41
port/assimp_rs/src/structs/string/string.rs
Normal file
41
port/assimp_rs/src/structs/string/string.rs
Normal file
@@ -0,0 +1,41 @@
|
||||
pub const MAXLEN: usize = 1024;
|
||||
|
||||
/// Want to consider replacing `Vec<char>`
|
||||
/// with a comparable definition at
|
||||
/// https://doc.rust-lang.org/src/alloc/string.rs.html#415-417
|
||||
#[derive(Clone, Debug)]
|
||||
struct Str {
|
||||
length: usize,
|
||||
data: Vec<char>
|
||||
}
|
||||
|
||||
impl Str {
|
||||
pub fn new(len_u32: usize, data_string: String) -> Str {
|
||||
Str {
|
||||
length: len_u32,
|
||||
data: data_string.chars().collect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// 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<char>
|
||||
}
|
||||
|
||||
|
||||
impl MaterialPropertyStr {
|
||||
pub fn new(len_u32: usize, data_string: String) -> MaterialPropertyStr {
|
||||
MaterialPropertyStr {
|
||||
length: len_u32,
|
||||
data: data_string.chars().collect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
3
port/assimp_rs/src/structs/texture/mod.rs
Normal file
3
port/assimp_rs/src/structs/texture/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
mod texture;
|
||||
pub use self::texture::Texel;
|
||||
|
||||
19
port/assimp_rs/src/structs/texture/texture.rs
Normal file
19
port/assimp_rs/src/structs/texture/texture.rs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
2
port/assimp_rs/src/structs/transform/mod.rs
Normal file
2
port/assimp_rs/src/structs/transform/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod transform;
|
||||
|
||||
0
port/assimp_rs/src/structs/transform/transform.rs
Normal file
0
port/assimp_rs/src/structs/transform/transform.rs
Normal file
2
port/assimp_rs/src/structs/vec/mod.rs
Normal file
2
port/assimp_rs/src/structs/vec/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod vec;
|
||||
|
||||
48
port/assimp_rs/src/structs/vec/vec.rs
Normal file
48
port/assimp_rs/src/structs/vec/vec.rs
Normal file
@@ -0,0 +1,48 @@
|
||||
struct Vector2d {
|
||||
x: f32,
|
||||
y: f32
|
||||
}
|
||||
|
||||
struct Vector3d {
|
||||
x: f32,
|
||||
y: f32,
|
||||
z: f32
|
||||
}
|
||||
|
||||
struct Vector4d {
|
||||
x: f32,
|
||||
y: f32,
|
||||
z: f32,
|
||||
w: 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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
port/assimp_rs/src/structs/vertex/mod.rs
Normal file
2
port/assimp_rs/src/structs/vertex/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
mod vertex;
|
||||
// pub use self::vertex::
|
||||
0
port/assimp_rs/src/structs/vertex/vertex.rs
Normal file
0
port/assimp_rs/src/structs/vertex/vertex.rs
Normal file
Reference in New Issue
Block a user