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

Shade triangle-list markers like other objects. #833

Merged
merged 2 commits into from
Dec 16, 2014

Conversation

hersh
Copy link
Contributor

@hersh hersh commented Dec 16, 2014

My current project is using triangle-list markers (in interactive markers) to show meshes that are loaded via MoveIt. However the current version of rviz does not do any shading of triangle-list markers. (It was not computing the surface normals of the faces.) Therefore triangle-list marker coloring is completely flat, so all you can see is the outline. This pull request fixes this so that triangle-list markers are shaded the same as meshes and primitive shapes. I compute the surface normal using the cross-product of the edges. If the cross-product is (0,0,0), Ogre::Vector3::normalise() does nothing ( http://www.ogre3d.org/docs/api/1.9/_ogre_vector3_8h_source.html#l00446 ), so I don't need to check for it myself.

Before:
old_box

After:
new_box

@wjwwood
Copy link
Member

wjwwood commented Dec 16, 2014

Looks good to me, I compared it with the mesh shading code and it looks consistent.

wjwwood added a commit that referenced this pull request Dec 16, 2014
Shade triangle-list markers like other objects.
@wjwwood wjwwood merged commit fc39173 into indigo-devel Dec 16, 2014
@wjwwood wjwwood deleted the shade-triangles branch December 16, 2014 22:08
130s pushed a commit to 130s/rviz that referenced this pull request Aug 21, 2024
…ualization#833)

None of the rviz_default_plugins ABI relies on consumers linking against
ignition-math6 directly.

The alternative is to add the ignition-math6 link directory to the
rviz_default_plugins link interface so that consumers can reliably find
the library.

Signed-off-by: Scott K Logan <logans@cottsay.net>
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.

2 participants