opensurgsim
SurgSim
Particles
ParticlesCollisionRepresentation.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_PARTICLES_PARTICLESCOLLISIONREPRESENTATION_H
17
#define SURGSIM_PARTICLES_PARTICLESCOLLISIONREPRESENTATION_H
18
19
#include <memory>
20
#include <string>
21
22
#include "SurgSim/Collision/Representation.h"
23
#include "SurgSim/Framework/ObjectFactory.h"
24
25
26
namespace
SurgSim
27
{
28
29
namespace
Math
30
{
31
class
Shape;
32
class
ParticlesShape;
33
};
34
35
namespace
Particles
36
{
37
38
class
Representation;
39
40
SURGSIM_STATIC_REGISTRATION(ParticlesCollisionRepresentation);
41
43
class
ParticlesCollisionRepresentation
:
public
SurgSim::Collision::Representation
44
{
45
public
:
46
49
explicit
ParticlesCollisionRepresentation
(
const
std::string& name);
50
52
virtual
~
ParticlesCollisionRepresentation
();
53
54
SURGSIM_CLASSNAME(
SurgSim::Particles::ParticlesCollisionRepresentation
);
55
56
std::shared_ptr<Math::Shape> getShape()
const override
;
57
58
int
getShapeType()
const override
;
59
60
void
updateShapeData()
override
;
61
64
void
setParticleRepresentation(std::shared_ptr<SurgSim::Particles::Representation> representation);
65
68
const
std::shared_ptr<SurgSim::Particles::Representation> getParticleRepresentation()
const
;
69
72
void
setParticleRadius(
double
radius);
73
76
double
getParticleRadius()
const
;
77
78
private
:
79
bool
doInitialize()
override
;
80
81
bool
doWakeUp()
override
;
82
84
std::shared_ptr<SurgSim::Math::ParticlesShape> m_shape;
85
87
std::weak_ptr<SurgSim::Particles::Representation> m_particleRepresentation;
88
};
89
90
};
91
};
92
93
#endif // SURGSIM_PARTICLES_PARTICLESCOLLISIONREPRESENTATION_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::ParticlesCollisionRepresentation
A Collision Representation that can be attached to a Particle Representation.
Definition:
ParticlesCollisionRepresentation.h:43
SurgSim::Collision::Representation
The type of collision detection.
Definition:
Representation.h:60
Generated by
1.8.12