opensurgsim
SurgSim
Particles
Sink.h
1
// This file is a part of the OpenSurgSim project.
2
// Copyright 2015, 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_PARTICLES_SINK_H
17
#define SURGSIM_PARTICLES_SINK_H
18
19
#include <memory>
20
21
#include "SurgSim/Framework/Behavior.h"
22
#include "SurgSim/Framework/ObjectFactory.h"
23
24
25
namespace
SurgSim
26
{
27
28
namespace
Collision
29
{
30
class
Representation;
31
};
32
33
namespace
Framework
34
{
35
class
Component;
36
class
Logger;
37
};
38
39
namespace
Particles
40
{
41
42
class
Representation;
43
44
SURGSIM_STATIC_REGISTRATION(Sink);
45
47
class
Sink
:
public
SurgSim::Framework::Behavior
48
{
49
public
:
52
explicit
Sink
(
const
std::string& name);
53
54
SURGSIM_CLASSNAME(
SurgSim::Particles::Sink
);
55
58
void
setTarget(
const
std::shared_ptr<SurgSim::Framework::Component>& target);
59
62
std::shared_ptr<SurgSim::Framework::Component> getTarget();
63
67
void
setCollisionRepresentation(
const
std::shared_ptr<SurgSim::Framework::Component>& representation);
68
72
std::shared_ptr<SurgSim::Framework::Component> getCollisionRepresentation();
73
74
void
update(
double
dt)
override
;
75
76
int
getTargetManagerType()
const override
;
77
78
private
:
79
bool
doInitialize()
override
;
80
81
bool
doWakeUp()
override
;
82
83
std::shared_ptr<SurgSim::Collision::Representation> m_collisionRepresentation;
84
85
std::shared_ptr<SurgSim::Particles::Representation> m_target;
86
87
std::shared_ptr<SurgSim::Framework::Logger> m_logger;
88
};
89
90
};
91
};
92
93
#endif // SURGSIM_PARTICLES_SINK_H
94
SurgSim
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition:
AddRandomSphereBehavior.cpp:36
SurgSim::Particles::Sink
Sink removes particles from a ParticleSystem.
Definition:
Sink.h:47
SurgSim::Framework::Behavior
Behaviors perform actions.
Definition:
Behavior.h:40
Generated by
1.8.12