OsgModel.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_OSGMODEL_H
17 #define SURGSIM_GRAPHICS_OSGMODEL_H
18 
19 
21 #include "SurgSim/Graphics/Model.h"
22 #include <osg/ref_ptr>
23 
24 namespace osg
25 {
26 class Node;
27 }
28 
29 namespace SurgSim
30 {
31 namespace Graphics
32 {
33 
36 class OsgModel : public Model
37 {
38 public:
39 
41  OsgModel();
42 
43  virtual ~OsgModel();
44 
46 
48  osg::ref_ptr<osg::Node> getOsgNode();
49 
50 private:
51 
52  bool doLoad(const std::string& filePath) override;
53 
54  osg::ref_ptr<osg::Node> m_root;
55 };
56 
57 }
58 }
59 
60 #endif
Definition: CompoundShapeToGraphics.cpp:29
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
osg::ref_ptr< osg::Node > m_root
Definition: OsgModel.h:54
Definition: Model.h:27
Definition: OculusView.h:25
Osg implementation of the Model class, inheriting from Asset, this class knows how to load models tha...
Definition: OsgModel.h:36