[Graphene] Starting using Graphene library to deal with 3d/2d data

My Unfolder application uses 3d and 2d data, for the moment I’m using my own structs and functions for that, and I’m trying to rewrite that using Graphene library. Here is my process :

  • read data from .obj file, extract 3d points and faces
  • triangulate faces to have an array of 3d triangles
  • transform the 3d triangles to 2d triangles
  • then I do lots of things with 2d triangles, translate, rotate, compute bounding boxes,

Apparently Graphene doesn’t use 2d triangle, so I can certainly use 3d triangle for that with z = 0. Is this a good idea ? Is there a function (matrix transform ?) to transform a 3d triangle to a 2d triangle (all z =0, 1st point = (0,0,0), 2nd point = (0, y, 0) and 3rd point = (x, y, 0) or do I need to use my own function for that ?

Are there good practices when using Graphene Library ? Maybe about memory/Arrays ? Maybe should I use 2d Vectors instead of triangles ? Are there facilities to save/read from a file ?

Well, Graphene library has nothing different from my own 2d/3d structs and functions, so I keep my code as it is.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.