Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type structure #9

Closed
simnalamburt opened this issue Dec 25, 2014 · 0 comments
Closed

Type structure #9

simnalamburt opened this issue Dec 25, 2014 · 0 comments

Comments

@simnalamburt
Copy link
Owner

Goals

  • Ease of use
  • Beauty
  • SIMD aware

Low-level API

Low-level API provides one-to-one correspondent rust binding of obj format.

Obj
 name ← String
 required mtl files ← Vec

 vertices ← Vec
 texture coordinates ← Vec
 normals ← Vec
 parametric vertices ← Vec

 points ← Vec
 lines ← Vec
 polygons ← Vec

 groups ← HashMap<String, Group>
 meshes ← HashMap<String, Group>
 smoothing_groups ← VecMap
 merging_groups ← VecMap

Other types

Point ← index of vertex

Line ← [(index of vertex); 2]
Line ← [(index of vertex, index of texture coordinate); 2]

Polygon ← Vec
Polygon ← Vec<(index of vertex, index of texture coordinate)>
Polygon ← Vec<(index of vertex, index of normal)>
Polygon ← Vec<(index of vertex, index of texture coordinate, index of normal)>

Group
 points ← Vec
 lines ← Vec
 polygon ← Vec

Range
 start ← uint
 end ← uint

Current version of Rust doesn't support non-power-of-2 simd type

High-level API

High-level API wraps low-level API and makes it easy to interoperate with OpenGL. It triangulates polygons, normalizes indices, etc.

@simnalamburt simnalamburt mentioned this issue Dec 25, 2014
19 tasks
@simnalamburt simnalamburt changed the title Obj/Mtl structure Type structure Dec 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant