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 
34 SURGSIM_STATIC_REGISTRATION(OsgAxesRepresentation);
35 
38 {
39 public:
40 
42  explicit OsgAxesRepresentation(const std::string& name);
44 
46 
49  void setSize(double val) override;
50 
53  double getSize() override;
54 
55 private:
56 
58  std::shared_ptr<OsgUnitAxes> m_sharedUnitAxes;
59 
61  static std::shared_ptr<OsgUnitAxes> getShareUnitAxes();
62 
64  double m_size;
65 };
66 
67 #if defined(_MSC_VER)
68 #pragma warning(pop)
69 #endif
70 
71 }; // Graphics
72 }; // SurgSim
73 
74 #endif
AxesRepresentation.h
SurgSim::Graphics::OsgAxesRepresentation::~OsgAxesRepresentation
~OsgAxesRepresentation()
Definition: OsgAxesRepresentation.cpp:39
SurgSim::Graphics::OsgAxesRepresentation::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Graphics::OsgAxesRepresentation)
SurgSim::Graphics::OsgAxesRepresentation
Osg axes representation implementation for the AxesRepresentation interface in graphics.
Definition: OsgAxesRepresentation.h:37
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
OsgUnitAxes.h
SurgSim::Graphics::OsgAxesRepresentation::getSize
double getSize() override
Gets the current size.
Definition: OsgAxesRepresentation.cpp:56
SurgSim::Graphics::OsgAxesRepresentation::setSize
void setSize(double val) override
Sets the size of the shown axes.
Definition: OsgAxesRepresentation.cpp:50
SurgSim::Graphics::OsgAxesRepresentation::m_size
double m_size
Hold the size.
Definition: OsgAxesRepresentation.h:64
SurgSim::Graphics::OsgAxesRepresentation::getShareUnitAxes
static std::shared_ptr< OsgUnitAxes > getShareUnitAxes()
Returns the shared unit axes.
Definition: OsgAxesRepresentation.cpp:44
SurgSim::Graphics::AxesRepresentation
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
SurgSim::Graphics::OsgAxesRepresentation::m_sharedUnitAxes
std::shared_ptr< OsgUnitAxes > m_sharedUnitAxes
Shared unit axes, so that the geometry can be instanced rather than having multiple copies.
Definition: OsgAxesRepresentation.h:58
OsgRepresentation.h
SurgSim::Graphics::OsgRepresentation
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55
SurgSim::Graphics::OsgAxesRepresentation::OsgAxesRepresentation
OsgAxesRepresentation(const std::string &name)
Constructor.
Definition: OsgAxesRepresentation.cpp:29