Choreonoid
1.8
src
BodyPlugin
EditableSceneBody.h
Go to the documentation of this file.
1
5
#ifndef CNOID_BODY_PLUGIN_EDITABLE_SCENE_BODY_H
6
#define CNOID_BODY_PLUGIN_EDITABLE_SCENE_BODY_H
7
8
#include <cnoid/SceneWidgetEventHandler>
9
#include <cnoid/SceneBody>
10
#include <vector>
11
#include "exportdecl.h"
12
13
namespace
cnoid
{
14
15
class
ExtensionManager;
16
class
BodyItem;
17
class
EditableSceneBody;
18
19
class
CNOID_EXPORT
EditableSceneLink
:
public
SceneLink
20
{
21
public
:
22
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
23
24
EditableSceneLink
(
EditableSceneBody
* sceneBody,
Link
* link);
25
~
EditableSceneLink
();
26
27
void
showOrigin(
bool
on);
28
bool
isOriginShown()
const
;
29
void
enableHighlight(
bool
on);
30
[[deprecated(
"Use enableHighlight"
)]]
31
void
showOutline(
bool
on);
32
void
showMarker(
const
Vector3f& color,
float
transparency);
33
void
hideMarker();
34
void
setColliding(
bool
on);
35
36
private
:
37
class
Impl;
38
Impl* impl;
39
40
friend
class
EditableSceneBody
;
41
};
42
typedef
ref_ptr<EditableSceneLink>
EditableSceneLinkPtr
;
43
44
45
class
CNOID_EXPORT
EditableSceneBody
:
public
SceneBody
,
public
SceneWidgetEventHandler
46
{
47
public
:
48
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
49
50
static
void
initializeClass(
ExtensionManager
* ext);
51
52
EditableSceneBody
(
BodyItem
* bodyItem);
53
54
EditableSceneLink
* editableSceneLink(
int
index);
55
void
setLinkVisibilities(
const
std::vector<bool>& visibilities);
56
57
virtual
void
updateModel()
override
;
58
59
virtual
void
onSceneModeChanged(
SceneWidgetEvent
* event)
override
;
60
virtual
bool
onButtonPressEvent(
SceneWidgetEvent
* event)
override
;
61
virtual
bool
onDoubleClickEvent(
SceneWidgetEvent
* event)
override
;
62
virtual
bool
onButtonReleaseEvent(
SceneWidgetEvent
* event)
override
;
63
virtual
bool
onPointerMoveEvent(
SceneWidgetEvent
* event)
override
;
64
virtual
void
onPointerLeaveEvent(
SceneWidgetEvent
* event)
override
;
65
virtual
bool
onKeyPressEvent(
SceneWidgetEvent
* event)
override
;
66
virtual
bool
onKeyReleaseEvent(
SceneWidgetEvent
* event)
override
;
67
virtual
bool
onScrollEvent(
SceneWidgetEvent
* event)
override
;
68
virtual
void
onFocusChanged(
SceneWidgetEvent
* event,
bool
on)
override
;
69
virtual
bool
onContextMenuRequest(
SceneWidgetEvent
* event,
MenuManager
* menuManager)
override
;
70
71
protected
:
72
virtual
~
EditableSceneBody
();
73
74
private
:
75
EditableSceneBody
(
const
EditableSceneBody
& org);
76
77
class
Impl;
78
Impl* impl;
79
80
friend
class
EditableSceneLink
;
81
};
82
83
typedef
ref_ptr<EditableSceneBody>
EditableSceneBodyPtr
;
84
85
}
86
87
#endif
cnoid::EditableSceneBodyPtr
ref_ptr< EditableSceneBody > EditableSceneBodyPtr
Definition:
EditableSceneBody.h:83
cnoid::SceneLink
Definition:
SceneBody.h:18
cnoid::ExtensionManager
Definition:
ExtensionManager.h:23
cnoid::EditableSceneBody
Definition:
EditableSceneBody.h:45
cnoid::EditableSceneBody::EIGEN_MAKE_ALIGNED_OPERATOR_NEW
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition:
EditableSceneBody.h:48
cnoid::MenuManager
Definition:
MenuManager.h:14
cnoid::ref_ptr
Definition:
Referenced.h:103
cnoid::EditableSceneLink::EIGEN_MAKE_ALIGNED_OPERATOR_NEW
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition:
EditableSceneBody.h:22
cnoid::BodyItem
Definition:
BodyItem.h:28
cnoid::SceneWidgetEventHandler
Definition:
SceneWidgetEventHandler.h:15
cnoid::SceneWidgetEvent
Definition:
SceneWidgetEvent.h:15
cnoid
Definition:
AbstractSceneLoader.h:11
cnoid::EditableSceneLinkPtr
ref_ptr< EditableSceneLink > EditableSceneLinkPtr
Definition:
EditableSceneBody.h:42
cnoid::SceneBody
Definition:
SceneBody.h:61
cnoid::EditableSceneLink
Definition:
EditableSceneBody.h:19
cnoid::Link
Definition:
Link.h:26
Generated by
1.8.17