Go to the documentation of this file.
33 #include <OgreMeshManager.h>
34 #include <OgreSceneManager.h>
35 #include <OgreSceneNode.h>
36 #include <OgreEntity.h>
37 #include <OgreMaterialManager.h>
38 #include <OgreManualObject.h>
41 #include <boost/lexical_cast.hpp>
46 :
Shape(
Shape::Mesh, scene_manager, parent_node), started_(false)
48 static uint32_t count = 0;
49 manual_object_ = scene_manager->createManualObject(
"MeshShape_ManualObject" +
50 boost::lexical_cast<std::string>(count++));
51 material_->setCullingMode(Ogre::CULL_NONE);
70 ROS_WARN(
"Cannot modify mesh once construction is complete");
95 const Ogre::Vector3& normal,
96 const Ogre::ColourValue& color)
125 static uint32_t count = 0;
126 std::string name =
"ConvertedMeshShape@" + boost::lexical_cast<std::string>(count++);
135 ROS_ERROR(
"Unable to construct triangle mesh");
146 Ogre::MeshManager::getSingleton().remove(
entity_->getMesh()->getName());
Ogre::SceneNode * offset_node_
Ogre::MaterialPtr material_
void endTriangles()
Notify that the set of triangles to add is complete. No more triangles can be added,...
std::string material_name_
Ogre::SceneManager * scene_manager_
Ogre scene manager this object is part of.
void addVertex(const Ogre::Vector3 &position)
Add a vertex to the mesh (no normal defined). If using this function only (not using addTriangle()) i...
void clear()
Clear the mesh.
void addTriangle(unsigned int p1, unsigned int p2, unsigned int p3)
Add a triangle by indexing in the defined vertices.
Ogre::ManualObject * manual_object_
void addNormal(const Ogre::Vector3 &normal)
Add normal for a vertex.
void addColor(const Ogre::ColourValue &color)
Add color for a vertex.
MeshShape(Ogre::SceneManager *scene_manager, Ogre::SceneNode *parent_node=nullptr)
Constructor.
void estimateVertexCount(size_t vcount)
void beginTriangles()
Start adding triangles to the mesh.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:09