OsgAxesRepresentation.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_OSGAXESREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGAXESREPRESENTATION_H
18 
22 
23 
24 #if defined(_MSC_VER)
25 #pragma warning(push)
26 #pragma warning(disable:4250)
27 #endif
28 
29 namespace SurgSim
30 {
31 namespace Graphics
32 {
33 
36 {
37 public:
38 
40  explicit OsgAxesRepresentation(const std::string& name);
42 
45  virtual void setSize(double val) override;
46 
49  virtual double getSize() override;
50 
51 private:
52 
54  std::shared_ptr<OsgUnitAxes> m_sharedUnitAxes;
55 
57  static std::shared_ptr<OsgUnitAxes> getShareUnitAxes();
58 
60  double m_size;
61 };
62 
63 #if defined(_MSC_VER)
64 #pragma warning(pop)
65 #endif
66 
67 }; // Graphics
68 }; // SurgSim
69 
70 #endif
Definition: DriveElementFromInputBehavior.cpp:27
std::shared_ptr< OsgUnitAxes > m_sharedUnitAxes
Shared unit axes, so that the geometry can be instanced rather than having multiple copies...
Definition: OsgAxesRepresentation.h:54
virtual double getSize() override
Gets the current size.
Definition: OsgAxesRepresentation.cpp:54
OsgAxesRepresentation(const std::string &name)
Constructor.
Definition: OsgAxesRepresentation.cpp:27
virtual void setSize(double val) override
Sets the size of the shown axes.
Definition: OsgAxesRepresentation.cpp:48
double m_size
Hold the size.
Definition: OsgAxesRepresentation.h:60
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
Displays the coordinate axes, as three lines from the origin default size is 1.0, the X/Y/Z axis are ...
Definition: AxesRepresentation.h:28
Osg axes representation implementation for the AxesRepresentation interface in graphics.
Definition: OsgAxesRepresentation.h:35
~OsgAxesRepresentation()
Definition: OsgAxesRepresentation.cpp:37
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42
static std::shared_ptr< OsgUnitAxes > getShareUnitAxes()
Returns the shared unit axes.
Definition: OsgAxesRepresentation.cpp:42