opensurgsim
OsgPlaneRepresentation.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_GRAPHICS_OSGPLANEREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGPLANEREPRESENTATION_H
18 
19 #include "SurgSim/Graphics/PlaneRepresentation.h"
20 #include "SurgSim/Graphics/OsgRepresentation.h"
21 
22 #include "SurgSim/Framework/ObjectFactory.h"
23 #include "SurgSim/Framework/SharedInstance.h"
25 
26 #include <osg/PositionAttitudeTransform>
27 #include <osg/Switch>
28 
29 
30 #if defined(_MSC_VER)
31 #pragma warning(push)
32 #pragma warning(disable:4250)
33 #endif
34 
35 namespace SurgSim
36 {
37 
38 namespace Graphics
39 {
40 class OsgPlane;
41 SURGSIM_STATIC_REGISTRATION(OsgPlaneRepresentation);
42 
45 {
46 public:
49  explicit OsgPlaneRepresentation(const std::string& name);
50 
52 
53 private:
54 
56  std::shared_ptr<OsgPlane> m_sharedPlane;
57 
59  static std::shared_ptr<OsgPlane> getSharedPlane();
60 };
61 
62 }; // namespace Graphics
63 
64 }; // namespace SurgSim
65 
66 #if defined(_MSC_VER)
67 #pragma warning(pop)
68 #endif
69 
70 #endif // SURGSIM_GRAPHICS_OSGPLANEREPRESENTATION_H
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Base graphics plane representation class, which defines the basic interface for a plane that can be v...
Definition: PlaneRepresentation.h:29
OSG implementation of a graphics plane representation.
Definition: OsgPlaneRepresentation.h:44
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
OsgPlaneRepresentation(const std::string &name)
Constructor.
Definition: OsgPlaneRepresentation.cpp:32
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55