ScreenSpaceQuadRepresentation.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_SCREENSPACEQUADREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_SCREENSPACEQUADREPRESENTATION_H
18 
20 
21 namespace SurgSim
22 {
23 namespace Graphics
24 {
25 
26 class View;
27 class Texture;
28 
32 {
33 public:
34 
37  explicit ScreenSpaceQuadRepresentation(const std::string name) : Representation(name)
38  {
39 
40  }
41 
43  {
44 
45  }
46 
49  virtual void setLocation(double x, double y) = 0;
50 
53  virtual void getLocation(double* x, double* y) = 0;
54 
58  virtual void setSize(double width, double height) = 0;
59 
63  virtual void getSize(double* width, double* height) const = 0;
64 
70  virtual bool setTexture(std::shared_ptr<Texture> texture) = 0;
71 
72 };
73 
74 }; // Graphics
75 }; // SurgSim
76 
77 #endif
Definition: DriveElementFromInputBehavior.cpp:27
~ScreenSpaceQuadRepresentation()
Definition: ScreenSpaceQuadRepresentation.h:42
virtual void getSize(double *width, double *height) const =0
Gets the size of the quad.
virtual bool setTexture(std::shared_ptr< Texture > texture)=0
Sets a Texture for this quad, this should replace a current texture, this is a convenience function a...
ScreenSpaceQuadRepresentation(const std::string name)
Constructor.
Definition: ScreenSpaceQuadRepresentation.h:37
A quad to display on the screen in screen space coordinates, use setPose() to set the position but x...
Definition: ScreenSpaceQuadRepresentation.h:31
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
virtual void setSize(double width, double height)=0
Sets the size for the quad in screen coordinates.
virtual void getLocation(double *x, double *y)=0
Gets the location in screen space.
virtual void setLocation(double x, double y)=0
Sets the location in screen space.