MeshRepresentation.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_MESHREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_MESHREPRESENTATION_H
18 
20 
21 namespace SurgSim
22 {
23 namespace Graphics
24 {
25 class Mesh;
26 
28 class MeshRepresentation : public virtual Representation
29 {
30 public:
31 
33  {
41  };
42 
45  explicit MeshRepresentation(const std::string& name) : Representation(name)
46  {
49  }
50 
51  virtual ~MeshRepresentation() {}
52 
55  virtual std::shared_ptr<Mesh> getMesh() = 0;
56 
63  virtual void setFilename(std::string filename) = 0;
64 
67  virtual std::string getFilename() const = 0;
68 
73  virtual void setUpdateOptions(int val) = 0;
74 
77  virtual int getUpdateOptions() const = 0;
78 };
79 
80 }; // Graphics
81 }; // SurgSim
82 
83 #endif // SURGSIM_GRAPHICS_MESHREPRESENTATION_H
Definition: DriveElementFromInputBehavior.cpp:27
virtual std::string getFilename() const =0
Get the file name of the external file which contains the triangle mesh.
Graphics representation of a mesh, can be initialized from a Mesh structure.
Definition: MeshRepresentation.h:28
virtual ~MeshRepresentation()
Definition: MeshRepresentation.h:51
virtual int getUpdateOptions() const =0
Gets update options for this mesh.
virtual void setUpdateOptions(int val)=0
Sets the structures that are expected to change during the lifetime of the mesh, these will be update...
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
#define SURGSIM_ADD_SERIALIZABLE_PROPERTY(class, type, property, getter, setter)
A macro to register a serializable property, this needs to support reading, writing and all the conve...
Definition: Accessible.h:211
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
virtual std::shared_ptr< Mesh > getMesh()=0
Gets the mesh.
MeshRepresentation(const std::string &name)
Constructor.
Definition: MeshRepresentation.h:45
UpdateOption
Definition: MeshRepresentation.h:32
virtual void setFilename(std::string filename)=0
Set loading filename.