OsgPlaneRepresentation.h
Go to the documentation of this file.
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 
21 
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
PlaneRepresentation.h
SurgSim::Graphics::PlaneRepresentation
Base graphics plane representation class, which defines the basic interface for a plane that can be v...
Definition: PlaneRepresentation.h:29
SurgSim::Graphics::OsgPlaneRepresentation::OsgPlaneRepresentation
OsgPlaneRepresentation(const std::string &name)
Constructor.
Definition: OsgPlaneRepresentation.cpp:32
SurgSim::Graphics::OsgPlaneRepresentation::m_sharedPlane
std::shared_ptr< OsgPlane > m_sharedPlane
Shared plane, so that the geometry can be instanced rather than having multiple copies.
Definition: OsgPlaneRepresentation.h:56
ObjectFactory.h
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Graphics::OsgPlaneRepresentation
OSG implementation of a graphics plane representation.
Definition: OsgPlaneRepresentation.h:44
RigidTransform.h
SurgSim::Graphics::OsgPlaneRepresentation::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgPlaneRepresentation)
SurgSim::Graphics::OsgPlaneRepresentation::getSharedPlane
static std::shared_ptr< OsgPlane > getSharedPlane()
Returns the shared plane.
Definition: OsgPlaneRepresentation.cpp:41
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
SharedInstance.h
OsgRepresentation.h
SurgSim::Graphics::OsgRepresentation
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55