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 
23 
24 #include <array>
25 
26 namespace SurgSim
27 {
28 namespace Graphics
29 {
30 
31 class View;
32 class Texture;
33 
37 {
38 public:
39 
43  {
44  }
45 
47  {
48 
49  }
50 
53  virtual void setLocation(double x, double y) = 0;
54 
57  virtual void getLocation(double* x, double* y) = 0;
58 
62  virtual void setSize(double width, double height) = 0;
63 
67  virtual void getSize(double* width, double* height) const = 0;
68 
74  virtual bool setTexture(std::shared_ptr<Texture> texture) = 0;
75 
78  {
79  return getLocalPose();
80  }
81 
82 };
83 
84 }; // Graphics
85 }; // SurgSim
86 
87 #endif
SurgSim::Graphics::ScreenSpaceQuadRepresentation::setTexture
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...
Macros.h
SurgSim::Graphics::ScreenSpaceQuadRepresentation::~ScreenSpaceQuadRepresentation
~ScreenSpaceQuadRepresentation()
Definition: ScreenSpaceQuadRepresentation.h:46
SurgSim::Math::RigidTransform3d
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
SurgSim::Graphics::ScreenSpaceQuadRepresentation::setSize
virtual void setSize(double width, double height)=0
Sets the size for the quad in screen coordinates.
Representation.h
SurgSim::Graphics::ScreenSpaceQuadRepresentation::getLocation
virtual void getLocation(double *x, double *y)=0
Gets the location in screen space.
SurgSim::Graphics::ScreenSpaceQuadRepresentation::ScreenSpaceQuadRepresentation
ScreenSpaceQuadRepresentation(const std::string name)
Constructor.
Definition: ScreenSpaceQuadRepresentation.h:42
SurgSim
Definition: CompoundShapeToGraphics.cpp:30
FrameworkConvert.h
SurgSim::Graphics::ScreenSpaceQuadRepresentation
A quad to display on the screen in screen space coordinates, use setPose() to set the position but x,...
Definition: ScreenSpaceQuadRepresentation.h:37
SurgSim::Graphics::ScreenSpaceQuadRepresentation::getSize
virtual void getSize(double *width, double *height) const =0
Gets the size of the quad.
DataStructuresConvert.h
SurgSim::Graphics::ScreenSpaceQuadRepresentation::setLocation
virtual void setLocation(double x, double y)=0
Sets the location in screen space.
SurgSim::Framework::Representation::getLocalPose
virtual SurgSim::Math::RigidTransform3d getLocalPose() const
Get the pose of the representation with respect to the Scene Element.
Definition: Representation.cpp:67
SurgSim::Graphics::Representation
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:40
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
SurgSim::Graphics::ScreenSpaceQuadRepresentation::getPose
SurgSim::Math::RigidTransform3d getPose() const override
Definition: ScreenSpaceQuadRepresentation.h:77