opensurgsim
SurgSim
Blocks
TransferParticlesToPointCloudBehavior.h
1
// This file is a part of the OpenSurgSim project.
2
// Copyright 2013, SimQuest Solutions Inc.
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
16
#ifndef SURGSIM_BLOCKS_TRANSFERPARTICLESTOPOINTCLOUDBEHAVIOR_H
17
#define SURGSIM_BLOCKS_TRANSFERPARTICLESTOPOINTCLOUDBEHAVIOR_H
18
19
#include "SurgSim/Framework/Behavior.h"
20
#include "SurgSim/Framework/Macros.h"
21
22
namespace
SurgSim
23
{
24
25
namespace
Framework
26
{
27
class
Component;
28
}
29
30
namespace
Graphics
31
{
32
class
PointCloudRepresentation;
33
}
34
35
namespace
Particles
36
{
37
class
Representation;
38
}
39
40
namespace
Blocks
41
{
42
SURGSIM_STATIC_REGISTRATION(TransferParticlesToPointCloudBehavior);
43
45
class
TransferParticlesToPointCloudBehavior
:
public
SurgSim::Framework::Behavior
46
{
47
public
:
50
explicit
TransferParticlesToPointCloudBehavior
(
const
std::string& name);
51
52
SURGSIM_CLASSNAME(
SurgSim::Blocks::TransferParticlesToPointCloudBehavior
);
53
56
void
setSource(
const
std::shared_ptr<SurgSim::Framework::Component>& source);
57
60
void
setTarget(
const
std::shared_ptr<SurgSim::Framework::Component>& target);
61
64
std::shared_ptr<SurgSim::Particles::Representation> getSource()
const
;
65
68
std::shared_ptr<SurgSim::Graphics::PointCloudRepresentation> getTarget()
const
;
69
70
void
update(
double
dt)
override
;
71
72
private
:
73
bool
doInitialize()
override
;
74
bool
doWakeUp()
override
;
75
77
std::shared_ptr<SurgSim::Particles::Representation> m_source;
78
80
std::shared_ptr<SurgSim::Graphics::PointCloudRepresentation> m_target;
81
};
82
83
};
// namespace Blocks
84
};
// namespace SurgSim
85
86
#endif // SURGSIM_BLOCKS_TRANSFERPARTICLESTOPOINTCLOUDBEHAVIOR_H
SurgSim
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition:
AddRandomSphereBehavior.cpp:36
SurgSim::Blocks::TransferParticlesToPointCloudBehavior
Behavior to copy positions of a Particles::Representation to a PointCloud.
Definition:
TransferParticlesToPointCloudBehavior.h:45
SurgSim::Framework::Behavior
Behaviors perform actions.
Definition:
Behavior.h:40
Generated by
1.8.12