Advertisement
WeltEnSTurm

Model Format Test

Mar 4th, 2011
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. # comments with #
  2. # define model format of following data with FMT XZY (OpenGL style) or XYZ (Cartesian)
  3. # define polygon with POLY{data}
  4. # example:
  5. # POLY{
  6. # t TRIANGLE,
  7. # n X Y Z # normal of face
  8. # c R G B # optional, color of all following vertices (multi-color polygon possible)
  9. # v x Y Z # first vertex
  10. # v X Y Z # second vertex
  11. # v X Y Z # last vertex, define all vertices counter-clockwise
  12. # }
  13. # add physical solid with POLY{data},
  14. # which is defined by normals that face away from the center.
  15. # example:
  16. # PHYS{
  17. # t CONVEX # type of solid, CONVEX or SPHERE possible (latter is faster in processing)
  18. # v X Y Z # first normal, start point
  19. # v X Y Z # first normal, end point
  20. # v X Y Z # second normal, start point
  21. # v X Y Z # second normal, end point
  22. # etc.
  23. # }
  24. # These normals are used for collision testing,
  25. # if a point is beneath all of these normals, a collision is happening.
  26. #
  27. # all numbers after n, c, v can be seperated by characters of your choice
  28.  
  29. FMT XYZ
  30. POLY{
  31. t TRIANGLE,
  32. n 0 0 -1,
  33. c 1 1 0,
  34. v -1 0 0,
  35. v 0 1 0,
  36. v 1 0 0,
  37. }
  38. POLY{
  39. t TRIANGLE;
  40. n 1 1 1,
  41. c 0.5 0.4 0.1,
  42. v 1 0 0,
  43. v 0 0 1,
  44. v 0 1 0,
  45. }
  46. POLY{
  47. t TRIANGLE,
  48. n -1 1 1,
  49. v -1 0 0,
  50. v 0 0 1,
  51. v 0 1 0,
  52. }
  53. POLY{
  54. t TRIANGLE,
  55. n 0 -1 0,
  56. v -1 0 0,
  57. v 1 0 0,
  58. v 0 0 1,
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement