Skip to content

Support for JSON input format #33

@salehqt

Description

@salehqt

First we need to define a JSON input format, easiest that comes to mind is:

  • list of vertices
  • list of normals
  • list of groups

Each group will have

  • material
  • patch type
  • list of patches

Each patch will have

  • ordered list of indices for the patch type

Example

{
    vertices: [
        {-1,  1,  1 },
        { 1,  1,  1 },
        { 1,  1, -1 },
        {-1,  1, -1 },
        {-1, -1,  1 },
        { 1, -1,  1 },
        { 1, -1, -1 },
        {-1, -1, -1 }
        ],

    geometry: [
        {
            material: { diffuse: { 1, 1, 1 } },
            type: "quadrilateral",
            degree: 1,
            patches: [ 
               { 0, 1, 2, 3 },
               { 7, 6, 5, 4 },
               { 1, 5, 6, 2 },
               { 2, 6, 7, 3 },
               { 3, 7, 4, 0 },
               { 0, 4, 5, 1 },
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions