mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 06:00:12 +00:00
05bf86d95f
add MultiBody Custom Creation example, to show how to import data from a URDF file and fill up your own data structures. add btMultiBody::setBaseWorldTransform method todo: fix cmake build, this patch is premake only
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#ifndef MY_URDF_IMPORTER_H
|
|
#define MY_URDF_IMPORTER_H
|
|
|
|
#include "URDFImporterInterface.h"
|
|
|
|
|
|
class MyURDFImporter : public URDFImporterInterface
|
|
{
|
|
|
|
struct MyURDFInternalData* m_data;
|
|
|
|
|
|
public:
|
|
|
|
MyURDFImporter(struct GUIHelperInterface* guiHelper);
|
|
|
|
virtual ~MyURDFImporter();
|
|
|
|
virtual bool loadURDF(const char* fileName);
|
|
|
|
const char* getPathPrefix();
|
|
|
|
void printTree(); //for debugging
|
|
|
|
virtual int getRootLinkIndex() const;
|
|
|
|
virtual void getLinkChildIndices(int linkIndex, btAlignedObjectArray<int>& childLinkIndices) const;
|
|
|
|
virtual std::string getLinkName(int linkIndex) const;
|
|
|
|
virtual std::string getJointName(int linkIndex) const;
|
|
|
|
virtual void getMassAndInertia(int linkIndex, btScalar& mass,btVector3& localInertiaDiagonal, btTransform& inertialFrame) const;
|
|
|
|
virtual bool getJointInfo(int urdfLinkIndex, btTransform& parent2joint, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit) const;
|
|
|
|
virtual int convertLinkVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame) const;
|
|
|
|
virtual class btCompoundShape* convertLinkCollisionShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame) const;
|
|
|
|
};
|
|
|
|
|
|
#endif //MY_URDF_IMPORTER_H
|