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 CapsuleShape and ConeShape #769

Merged
merged 11 commits into from
Sep 24, 2016
Merged

Add CapsuleShape and ConeShape #769

merged 11 commits into from
Sep 24, 2016

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Sep 23, 2016

This pull request adds two new shape classes: CapsuleShape and ConeShape. Currently, only BulletCollisionDetector support the shapes. Both of OpenGL and OSG based renderers display the shapes. Also, these shapes can be parsed from SKEL file format. Here is part of an example skel file that contains the new shapes:

<visualization_shape>
    <geometry>
        <capsule>
            <height>0.1</height>
            <radius>0.05</radius>
        </capsule>
    </geometry>
</visualization_shape>

<visualization_shape>
    <geometry>
        <cone>
            <height>0.1</height>
            <radius>0.05</radius>
        </cone>
    </geometry>
</visualization_shape>

Additional changes: A syntactic sugar function Shape::is<SHAPE_TYPE>() is added that enables us to check the shape type from a Shape pointer in more convenient way. Here is a short example code:

auto shape = bodyNode->getShapeNode(0)->getShape();
if (shape->is<BoxShape>())
  std::cout << "The shape type is box!\n";

This change is Reviewable

Missing:
- Rendering for OpenGL and OSG
- Support by FCLCollisionDetector
- Unit tests (collision checking)
@jslee02 jslee02 added this to the DART 6.1.0 milestone Sep 23, 2016
@jslee02 jslee02 merged commit dc1ecd6 into master Sep 24, 2016
@jslee02 jslee02 deleted the capsule_cone branch September 26, 2016 01:24
@jslee02 jslee02 restored the capsule_cone branch September 26, 2016 01:24
@jslee02 jslee02 deleted the capsule_cone branch September 26, 2016 01:24
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.

1 participant