Choreonoid  1.1
BodyCustomizerInterface.h
説明を見る。
1 
7 #ifndef CNOID_BODY_CUSTOMIZER_INTERFACE_H_INCLUDED
8 #define CNOID_BODY_CUSTOMIZER_INTERFACE_H_INCLUDED
9 
10 #include <string>
11 #include <cnoid/EigenTypes>
12 #include <cnoid/Config>
13 #include "exportdecl.h"
14 
15 namespace cnoid {
16 
17  typedef void* BodyHandle;
18  typedef void* BodyCustomizerHandle;
19 
20  typedef int (*BodyGetLinkIndexFromNameFunc) (BodyHandle bodyHandle, const char* linkName);
21  typedef const char* (*BodyGetLinkNameFunc) (BodyHandle bodyHandle, int linkIndex);
22  typedef double* (*BodyGetLinkDoubleValuePtrFunc)(BodyHandle bodyHandle, int linkIndex);
23 
24  static const int BODY_INTERFACE_VERSION = 1;
25 
27  {
28  int version;
29 
35  };
36 
37  typedef const char** (*BodyCustomizerGetTargetModelNamesFunc)();
38  typedef BodyCustomizerHandle (*BodyCustomizerCreateFunc)(BodyHandle bodyHandle, const char* modelName);
39 
40  typedef void (*BodyCustomizerDestroyFunc) (BodyCustomizerHandle customizerHandle);
41  typedef int (*BodyCustomizerInitializeAnalyticIkFunc) (BodyCustomizerHandle customizerHandle, int baseLinkIndex, int targetLinkIndex);
42 
43  /*
44  p and R are based on the coordinate of a base link
45  */
46  typedef bool (*BodyCustomizerCalcAnalyticIkFunc) (BodyCustomizerHandle customizerHandle, int ikPathId, const Vector3& p, const Matrix3& R);
47 
49 
50 
51  static const int BODY_CUSTOMIZER_INTERFACE_VERSION = 1;
52 
54  {
55  int version;
56 
63  };
64 
65  typedef BodyCustomizerInterface* (*GetBodyCustomizerInterfaceFunc)(BodyInterface* bodyInterface);
66 
67  CNOID_EXPORT int loadBodyCustomizers(const std::string pathString, BodyInterface* bodyInterface);
68  CNOID_EXPORT int loadBodyCustomizers(const std::string pathString);
71 
73 }
74 
75 #endif