Choreonoid
1.1
メインページ
関連ページ
ネームスペース
クラス
ファイル
ファイル一覧
ファイルメンバ
src
Body
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
26
struct
BodyInterface
27
{
28
int
version
;
29
30
BodyGetLinkIndexFromNameFunc
getLinkIndexFromName
;
31
BodyGetLinkNameFunc
getLinkName
;
32
BodyGetLinkDoubleValuePtrFunc
getJointValuePtr
;
33
BodyGetLinkDoubleValuePtrFunc
getJointVelocityPtr
;
34
BodyGetLinkDoubleValuePtrFunc
getJointForcePtr
;
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
48
typedef
void (*
BodyCustomizerSetVirtualJointForcesFunc
)(
BodyCustomizerHandle
customizerHandle);
49
50
51
static
const
int
BODY_CUSTOMIZER_INTERFACE_VERSION = 1;
52
53
struct
BodyCustomizerInterface
54
{
55
int
version
;
56
57
BodyCustomizerGetTargetModelNamesFunc
getTargetModelNames
;
58
BodyCustomizerCreateFunc
create
;
59
BodyCustomizerDestroyFunc
destroy
;
60
BodyCustomizerInitializeAnalyticIkFunc
initializeAnalyticIk
;
61
BodyCustomizerCalcAnalyticIkFunc
calcAnalyticIk
;
62
BodyCustomizerSetVirtualJointForcesFunc
setVirtualJointForces
;
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);
69
CNOID_EXPORT
int
loadBodyCustomizers
(
BodyInterface
* bodyInterface);
70
CNOID_EXPORT
int
loadBodyCustomizers
();
71
72
CNOID_EXPORT
BodyCustomizerInterface
*
findBodyCustomizer
(std::string modelName);
73
}
74
75
#endif
Choreonoidに対してMon May 27 2013 21:54:56に生成されました。
1.8.1.2