Merge pull request #2 from dmgolembiowski/rust-port

Rust port
pull/3195/head
David M. Golembiowski 2020-04-24 22:17:35 -04:00 committed by GitHub
commit 52f0f0fd2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,44 @@
pub struct Animation<'mA, 'mMA, 'nA> {
/* The name of the animation. If the modeling package this data was
* exported from does support only a single animation channel, this
* name is usually empty (length is zero).
*/
m_name: Option<String>,
// Duration of the animation in ticks
m_duration: f64,
// Ticks per second. Zero (0.000... ticks/second) if not
// specified in the imported file
m_ticks_per_second: Option<f64>,
/* Number of bone animation channels.
Each channel affects a single node.
*/
m_num_channels: u64,
/* Node animation channels. Each channel
affects a single node.
?? -> The array is m_num_channels in size.
(maybe refine to a derivative type of usize?)
*/
m_channels: &'nA NodeAnim,
/* Number of mesh animation channels. Each
channel affects a single mesh and defines
vertex-based animation.
*/
m_num_mesh_channels: u64,
/* The mesh animation channels. Each channel
affects a single mesh.
The array is m_num_mesh_channels in size
(maybe refine to a derivative of usize?)
*/
m_mesh_channels: &'mA MeshAnim,
/* The number of mesh animation channels. Each channel
affects a single mesh and defines some morphing animation.
*/
m_num_morph_mesh_channels: u64,
/* The morph mesh animation channels. Each channel affects a single mesh.
The array is mNumMorphMeshChannels in size.
*/
m_morph_mesh_channels: &'mMA MeshMorphAnim
}
pub struct NodeAnim {}
pub struct MeshAnim {}
pub struct MeshMorphAnim {}

View File

@ -0,0 +1,61 @@
mod anim;
/* Animation
* NodeAnim
* MeshAnim
* MeshMorphAnim
*/
mod blob;
/* ExportDataBlob
*/
mod vec;
/* Vector2d
* Vector3d
* */
mod matrix;
/* Matrix3by3
* Matrix4by4
*/
mod camera;
/* Camera */
mod color;
/* Color3d
* Color4d
*/
mod key;
/* MeshKey
* MeshMorphKey
* QuatKey
* VectorKey
*/
mod texel;
mod plane;
mod string;
/* String
*/
mod material;
/* Material
* MaterialPropery
* MaterialPropertyString
*/
mod mem;
mod quaternion;
mod face;
mod vertex_weight;
mod mesh;
/* Mesh
*/
mod meta;
/* Metadata
* MetadataEntry
*/
mod node;
/* Node
* */
mod light;
mod texture;
mod ray;
mod transform;
/* UVTransform */
mod bone;
mod scene;
/* Scene */