/usr/include/choreonoid-1.1/cnoid/src/Body/BodyCustomizerInterface.h is in libcnoid-dev 1.1.0+dfsg-6.1+b4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | /**
\file
\brief The definitions of the body customizer interface for increasing binary compatibility
\author Shin'ichiro Nakaoka
*/
#ifndef CNOID_BODY_CUSTOMIZER_INTERFACE_H_INCLUDED
#define CNOID_BODY_CUSTOMIZER_INTERFACE_H_INCLUDED
#include <string>
#include <cnoid/EigenTypes>
#include <cnoid/Config>
#include "exportdecl.h"
namespace cnoid {
typedef void* BodyHandle;
typedef void* BodyCustomizerHandle;
typedef int (*BodyGetLinkIndexFromNameFunc) (BodyHandle bodyHandle, const char* linkName);
typedef const char* (*BodyGetLinkNameFunc) (BodyHandle bodyHandle, int linkIndex);
typedef double* (*BodyGetLinkDoubleValuePtrFunc)(BodyHandle bodyHandle, int linkIndex);
static const int BODY_INTERFACE_VERSION = 1;
struct BodyInterface
{
int version;
BodyGetLinkIndexFromNameFunc getLinkIndexFromName;
BodyGetLinkNameFunc getLinkName;
BodyGetLinkDoubleValuePtrFunc getJointValuePtr;
BodyGetLinkDoubleValuePtrFunc getJointVelocityPtr;
BodyGetLinkDoubleValuePtrFunc getJointForcePtr;
};
typedef const char** (*BodyCustomizerGetTargetModelNamesFunc)();
typedef BodyCustomizerHandle (*BodyCustomizerCreateFunc)(BodyHandle bodyHandle, const char* modelName);
typedef void (*BodyCustomizerDestroyFunc) (BodyCustomizerHandle customizerHandle);
typedef int (*BodyCustomizerInitializeAnalyticIkFunc) (BodyCustomizerHandle customizerHandle, int baseLinkIndex, int targetLinkIndex);
/*
p and R are based on the coordinate of a base link
*/
typedef bool (*BodyCustomizerCalcAnalyticIkFunc) (BodyCustomizerHandle customizerHandle, int ikPathId, const Vector3& p, const Matrix3& R);
typedef void (*BodyCustomizerSetVirtualJointForcesFunc)(BodyCustomizerHandle customizerHandle);
static const int BODY_CUSTOMIZER_INTERFACE_VERSION = 1;
struct BodyCustomizerInterface
{
int version;
BodyCustomizerGetTargetModelNamesFunc getTargetModelNames;
BodyCustomizerCreateFunc create;
BodyCustomizerDestroyFunc destroy;
BodyCustomizerInitializeAnalyticIkFunc initializeAnalyticIk;
BodyCustomizerCalcAnalyticIkFunc calcAnalyticIk;
BodyCustomizerSetVirtualJointForcesFunc setVirtualJointForces;
};
typedef BodyCustomizerInterface* (*GetBodyCustomizerInterfaceFunc)(BodyInterface* bodyInterface);
CNOID_EXPORT int loadBodyCustomizers(const std::string pathString, BodyInterface* bodyInterface);
CNOID_EXPORT int loadBodyCustomizers(const std::string pathString);
CNOID_EXPORT int loadBodyCustomizers(BodyInterface* bodyInterface);
CNOID_EXPORT int loadBodyCustomizers();
CNOID_EXPORT BodyCustomizerInterface* findBodyCustomizer(std::string modelName);
}
#endif
|