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

Add octree I/O support for json #911

Merged
merged 2 commits into from
May 24, 2019
Merged

Add octree I/O support for json #911

merged 2 commits into from
May 24, 2019

Conversation

yxlao
Copy link
Collaborator

@yxlao yxlao commented Apr 15, 2019

Add octree I/O support for json (ascii output). Based on #903, merge #903 first.

Example json output

{
    "class_name" : "Octree",
    "max_depth" : 1,
    "nodes" : 
    [
        {
            "children" : [ 1, 2, 3, 4, 5, 6, 7, 8 ],
            "class_name" : "OctreeInternalNode",
            "id" : 0
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.0, 0.0, 0.0 ],
            "id" : 1
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.25, 0.0, 0.0 ],
            "id" : 2
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.0, 0.25, 0.0 ],
            "id" : 3
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.25, 0.25, 0.0 ],
            "id" : 4
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.0, 0.0, 0.25 ],
            "id" : 5
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.25, 0.0, 0.25 ],
            "id" : 6
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.0, 0.25, 0.25 ],
            "id" : 7
        },
        {
            "class_name" : "OctreeLeafNode",
            "color" : [ 0.25, 0.25, 0.25 ],
            "id" : 8
        }
    ],
    "origin" : [ 0.0, 0.0, 0.0 ],
    "root_node" : 0,
    "size" : 2.0
}

This change is Reviewable

Copy link
Collaborator

@qianyizh qianyizh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 7 of 7 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @germanros1987, @syncle, @takanokage, and @yxlao)

a discussion (no related file):
Can we make it a recursive json structure?
Then you just need to make OcTreeNode as IJsonConvertible, then you call Traverse, it solves the problem, yes?


Copy link
Contributor

@syncle syncle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 4 of 6 files reviewed, 1 unresolved discussion (waiting on @germanros1987, @qianyizh, and @takanokage)

a discussion (no related file):

Previously, qianyizh (Qianyi Zhou) wrote…

Can we make it a recursive json structure?
Then you just need to make OcTreeNode as IJsonConvertible, then you call Traverse, it solves the problem, yes?

Same comment. Other than that, it looks good to me.


@qianyizh
Copy link
Collaborator

@yxlao any follow up on this?

@yxlao yxlao force-pushed the octree-io branch 2 times, most recently from 1085369 to 7bb5eb8 Compare May 22, 2019 20:23
@yxlao
Copy link
Collaborator Author

yxlao commented May 22, 2019

@qianyizh comments addressed

Copy link
Collaborator

@qianyizh qianyizh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @germanros1987, @qianyizh, and @takanokage)

@qianyizh qianyizh merged commit 8924db6 into isl-org:master May 24, 2019
@yxlao yxlao deleted the octree-io branch May 24, 2019 10:03
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

Successfully merging this pull request may close these issues.

3 participants