opensurgsim
MockObjects.h
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2012-2016, 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_UNITTESTS_MOCKOBJECTS_H
17 #define SURGSIM_GRAPHICS_UNITTESTS_MOCKOBJECTS_H
18 
19 #include "SurgSim/Graphics/Camera.h"
20 #include "SurgSim/Graphics/Group.h"
21 #include "SurgSim/Graphics/Manager.h"
22 #include "SurgSim/Graphics/Material.h"
23 #include "SurgSim/Graphics/Program.h"
24 #include "SurgSim/Graphics/RenderTarget.h"
25 #include "SurgSim/Graphics/Representation.h"
26 #include "SurgSim/Graphics/Texture.h"
27 #include "SurgSim/Graphics/UniformBase.h"
28 #include "SurgSim/Graphics/View.h"
29 #include "SurgSim/Graphics/ViewElement.h"
30 #include "SurgSim/Math/Vector.h"
31 
32 #include <array>
33 
35 {
36 public:
39  explicit MockGroup(const std::string& name) : SurgSim::Graphics::Group(name), m_isVisible(false)
40  {
41  }
42 
45  virtual void setVisible(bool visible)
46  {
47  m_isVisible = visible;
48  }
49 
52  virtual bool isVisible() const
53  {
54  return m_isVisible;
55  }
56 
57 private:
59  bool m_isVisible;
60 };
61 
64 {
65 public:
66 
67  friend class GraphicsManagerTest;
68 
71  MockManager() : SurgSim::Graphics::Manager(),
72  m_numUpdates(0),
73  m_sumDt(0.0)
74  {
75  }
76 
78  int getNumUpdates() const
79  {
80  return m_numUpdates;
81  }
83  double getSumDt() const
84  {
85  return m_sumDt;
86  }
87 
88  void dumpDebugInfo() const
89  {
90  return;
91  }
92 
93  int getType() const override
94  {
95  return SurgSim::Framework::MANAGER_TYPE_NONE;
96  }
97 
98  virtual std::shared_ptr<SurgSim::Graphics::Group> getOrCreateGroup(const std::string& name)
99  {
100  if (getGroups().find(name) == std::end(getGroups()))
101  {
102  addGroup(std::make_shared<MockGroup>(name));
103  }
104  return getGroups().at(name);
105  }
106 
107 private:
111  virtual bool doUpdate(double dt)
112  {
113  if (Manager::doUpdate(dt))
114  {
115  ++m_numUpdates;
116  m_sumDt += dt;
117  return true;
118  }
119  else
120  {
121  return false;
122  }
123  }
124 
126  int m_numUpdates;
128  double m_sumDt;
129 };
130 
133 {
134 public:
140  explicit MockRepresentation(const std::string& name) : SurgSim::Graphics::Representation(name),
141  m_numUpdates(0),
142  m_sumDt(0.0),
143  m_isInitialized(false),
144  m_isAwoken(false),
145  m_drawAsWireFrame(false)
146  {
147  m_transform.setIdentity();
148  }
149 
151  int getNumUpdates() const
152  {
153  return m_numUpdates;
154  }
156  double getSumDt() const
157  {
158  return m_sumDt;
159  }
160 
164  virtual void update(double dt)
165  {
166  if (isActive())
167  {
168  ++m_numUpdates;
169  m_sumDt += dt;
170  }
171  }
172 
174  bool isInitialized() const
175  {
176  return m_isInitialized;
177  }
179  bool isAwoken() const
180  {
181  return m_isAwoken;
182  }
183 
187  virtual bool setMaterial(std::shared_ptr<SurgSim::Framework::Component> material)
188  {
189  return false;
190  }
191 
194  virtual std::shared_ptr<SurgSim::Graphics::Material> getMaterial() const
195  {
196  return nullptr;
197  }
198 
200  virtual void clearMaterial()
201  {
202  }
203 
204  virtual void setDrawAsWireFrame(bool val)
205  {
206  m_drawAsWireFrame = val;
207  }
208 
209  virtual bool getDrawAsWireFrame() const
210  {
211  return m_drawAsWireFrame;
212  }
213 
214 
215  void setGenerateTangents(bool value)
216  {
217 
218  }
219 
220  bool isGeneratingTangents() const
221  {
222  return false;
223  }
224 
225  void addUniform(const std::string& type, const std::string& name, const boost::any& value)
226  {
227  throw std::logic_error("The method or operation is not implemented.");
228  }
229 
230  void addUniform(std::shared_ptr<SurgSim::Graphics::UniformBase> uniform)
231  {
232  throw std::logic_error("The method or operation is not implemented.");
233  }
234 
235  void setUniforms(const std::vector<std::shared_ptr<SurgSim::Graphics::UniformBase>>& uniforms)
236  {
237  throw std::logic_error("The method or operation is not implemented.");
238  }
239 
240  std::vector<std::shared_ptr<SurgSim::Graphics::UniformBase>> getUniforms() const
241  {
242  throw std::logic_error("The method or operation is not implemented.");
243  }
244 
245 
246 
247 private:
250  virtual bool doInitialize()
251  {
252  m_isInitialized = true;
253  return true;
254  }
257  virtual bool doWakeUp()
258  {
259  m_isAwoken = true;
260  return true;
261  }
262 
263 
265  int m_numUpdates;
267  double m_sumDt;
268 
270  bool m_isInitialized;
272  bool m_isAwoken;
273 
275  bool m_drawAsWireFrame;
276 
279 };
280 
283 {
284 public:
290  explicit MockCamera(const std::string& name) :
291  SurgSim::Graphics::Representation(name),
292  SurgSim::Graphics::Camera(name),
293  m_numUpdates(0),
294  m_sumDt(0.0)
295  {
296  m_pose.setIdentity();
297  m_viewMatrix.setIdentity();
298  m_projectionMatrix.setIdentity();
299  }
300 
302  int getNumUpdates() const
303  {
304  return m_numUpdates;
305  }
307  double getSumDt() const
308  {
309  return m_sumDt;
310  }
311 
314  virtual void setPose(const SurgSim::Math::RigidTransform3d& transform)
315  {
316  m_pose = transform;
317  }
318 
322  {
323  return m_pose;
324  }
325 
328  virtual void setViewMatrix(const SurgSim::Math::Matrix44d& matrix)
329  {
330  m_viewMatrix = matrix;
331  }
332 
336  {
337  return m_viewMatrix;
338  }
339 
342  virtual void setProjectionMatrix(const SurgSim::Math::Matrix44d& matrix)
343  {
344  m_projectionMatrix = matrix;
345  }
346 
350  {
351  return m_projectionMatrix;
352  }
353 
355  {
356  return m_projectionMatrix.inverse();
357  }
358 
362  virtual void update(double dt)
363  {
364  ++m_numUpdates;
365  m_sumDt += dt;
366  }
367 
371  virtual bool setMaterial(std::shared_ptr<SurgSim::Framework::Component> material)
372  {
373  return false;
374  }
375 
378  virtual std::shared_ptr<SurgSim::Graphics::Material> getMaterial() const
379  {
380  return nullptr;
381  }
382 
384  virtual void clearMaterial()
385  {
386  }
387 
388  virtual void setDrawAsWireFrame(bool val)
389  {
390  }
391 
392  virtual bool getDrawAsWireFrame() const
393  {
394  return false;
395  }
396 
397  virtual bool setColorRenderTexture(std::shared_ptr<SurgSim::Graphics::Texture> texture)
398  {
399  return true;
400  }
401 
402  virtual std::shared_ptr<SurgSim::Graphics::Texture> getColorRenderTexture() const
403  {
404  return nullptr;
405  }
406 
407  virtual bool setRenderTarget(std::shared_ptr<SurgSim::Graphics::RenderTarget> renderTarget)
408  {
409  return true;
410  }
411 
412  virtual std::shared_ptr<SurgSim::Graphics::RenderTarget> getRenderTarget() const
413  {
414  return nullptr;
415  }
416 
417  void setRenderOrder(RenderOrder bin, int value) override
418  {
419  }
420 
421  void setMainCamera(bool val) override
422  {
423  }
424 
425  bool isMainCamera() override
426  {
427  return false;
428  }
429 
431  {
432  throw std::logic_error("The method or operation is not implemented.");
433  }
434 
436  {
437  throw std::logic_error("The method or operation is not implemented.");
438  }
439 
441  {
442  throw std::logic_error("The method or operation is not implemented.");
443  }
444 
445  void setGenerateTangents(bool value)
446  {
447  throw std::logic_error("The method or operation is not implemented.");
448  }
449 
450  bool isGeneratingTangents() const
451  {
452  throw std::logic_error("The method or operation is not implemented.");
453  }
454 
455  void setPerspectiveProjection(double fovy, double aspect, double near, double far)
456  {
457  throw std::logic_error("The method or operation is not implemented.");
458  }
459 
460  void setOrthogonalProjection(double left, double right, double bottom, double top, double near, double far)
461  {
462  throw std::logic_error("The method or operation is not implemented.");
463  }
464 
465  void setViewport(int x, int y, int width, int height)
466  {
467  throw std::logic_error("The method or operation is not implemented.");
468  }
469 
470  std::array<int, 4> getViewport() const
471  {
472  throw std::logic_error("The method or operation is not implemented.");
473  }
474 
475  void getViewport(int* x, int* y, int* width, int* height) const
476  {
477  throw std::logic_error("The method or operation is not implemented.");
478  }
479 
480  void setViewportSize(std::array<double, 2> dimensions)
481  {
482  throw std::logic_error("The method or operation is not implemented.");
483  }
484 
485  std::array<double, 2> getViewportSize() const
486  {
487  throw std::logic_error("The method or operation is not implemented.");
488  }
489 
490  void addUniform(const std::string& type, const std::string& name, const boost::any& value)
491  {
492  throw std::logic_error("The method or operation is not implemented.");
493  }
494 
495  void addUniform(std::shared_ptr<SurgSim::Graphics::UniformBase> uniform)
496  {
497  throw std::logic_error("The method or operation is not implemented.");
498  }
499 
500  void setUniforms(const std::vector<std::shared_ptr<SurgSim::Graphics::UniformBase>>& uniforms)
501  {
502  throw std::logic_error("The method or operation is not implemented.");
503  }
504 
505  std::vector<std::shared_ptr<SurgSim::Graphics::UniformBase>> getUniforms() const
506  {
507  throw std::logic_error("The method or operation is not implemented.");
508 
509  }
510 
511 private:
513  int m_numUpdates;
515  double m_sumDt;
516 
519 
521  SurgSim::Math::Matrix44d m_viewMatrix;
522 
524  SurgSim::Math::Matrix44d m_projectionMatrix;
525 
526 };
527 
530 {
531 public:
539  explicit MockView(const std::string& name) : SurgSim::Graphics::View(name),
540  m_x(0),
541  m_y(0),
542  m_width(800),
543  m_height(600),
544  m_isWindowBorderEnabled(true),
545  m_numUpdates(0),
546  m_sumDt(0.0),
547  m_isInitialized(false),
548  m_isAwoken(false)
549  {
550  }
551 
554  void setPosition(const std::array<int, 2>& position) override
555  {
556  m_x = position[0];
557  m_y = position[1];
558  }
559 
562  std::array<int, 2> getPosition() const override
563  {
564  std::array<int, 2> result = {m_x, m_y};
565  return result;
566  }
567 
570  void setDimensions(const std::array<int, 2>& dimensions) override
571  {
572  m_width = dimensions[0];
573  m_height = dimensions[1];
574  }
575 
578  std::array<int, 2> getDimensions() const override
579  {
580  std::array<int, 2> result = {m_width, m_height};
581  return result;
582  }
583 
584  void setDimensionsDouble(const std::array<double, 2>& dimensions)
585  {
586  m_width = static_cast<int>(dimensions[0]);
587  m_height = static_cast<int>(dimensions[1]);
588  }
589 
590  std::array<double, 2> getDimensionsDouble() const
591  {
592  std::array<double, 2> result = {static_cast<double>(m_width), static_cast<double>(m_height)};
593  return std::move(result);
594  }
595 
598  void setWindowBorderEnabled(bool enabled) override
599  {
600  m_isWindowBorderEnabled = enabled;
601  }
604  bool isWindowBorderEnabled() const override
605  {
606  return m_isWindowBorderEnabled;
607  }
608 
610  int getNumUpdates() const
611  {
612  return m_numUpdates;
613  }
615  double getSumDt() const
616  {
617  return m_sumDt;
618  }
619 
623  virtual void update(double dt)
624  {
625  ++m_numUpdates;
626  m_sumDt += dt;
627  }
628 
630  bool isInitialized() const
631  {
632  return m_isInitialized;
633  }
635  bool isAwoken() const
636  {
637  return m_isAwoken;
638  }
639 
640 private:
643  virtual bool doInitialize()
644  {
645  m_isInitialized = true;
646  return true;
647  }
650  virtual bool doWakeUp()
651  {
652  m_isAwoken = true;
653  return true;
654  }
655 
656  int doSetTargetScreen(int val)
657  {
658  return 0;
659  }
660 
662  int m_x, m_y;
664  int m_width, m_height;
666  bool m_isWindowBorderEnabled;
667 
669  int m_numUpdates;
671  double m_sumDt;
672 
674  bool m_isInitialized;
676  bool m_isAwoken;
677 
678 };
679 
682 {
683 public:
686  explicit NonGraphicsRepresentation(const std::string& name) : SurgSim::Framework::Representation(name)
687  {
688  }
689 };
690 
691 #endif // SURGSIM_GRAPHICS_UNITTESTS_MOCKOBJECTS_H
void setRenderOrder(RenderOrder bin, int value) override
Determine when this camera will render.
Definition: MockObjects.h:417
Base graphics view class, which defines the basic interface for all graphics views.
Definition: View.h:39
virtual void clearMaterial()
Removes the material from the representation.
Definition: MockObjects.h:200
MockManager()
Constructor.
Definition: MockObjects.h:71
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
virtual void update(double dt)
Updates the camera.
Definition: MockObjects.h:362
int getNumUpdates() const
Returns the number of times the manager has been updated.
Definition: MockObjects.h:78
virtual std::shared_ptr< SurgSim::Graphics::Material > getMaterial() const
Gets the material that defines the visual appearance of the representation.
Definition: MockObjects.h:194
Representation class for testing.
Definition: MockObjects.h:286
Eigen::Matrix< double, 4, 1 > Vector4d
A 4D vector of doubles.
Definition: Vector.h:61
double getSumDt() const
Returns the sum of the dt that the manager has been updated with.
Definition: MockObjects.h:83
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
virtual std::shared_ptr< SurgSim::Graphics::Material > getMaterial() const
Gets the material that defines the visual appearance of the representation.
Definition: MockObjects.h:378
MockGroup(const std::string &name)
Constructor.
Definition: MockObjects.h:39
virtual void update(double dt)
Updates the representation.
Definition: MockObjects.h:164
double getSumDt() const
Returns the sum of the dt that the representation has been updated with.
Definition: MockObjects.h:156
bool isMainCamera() override
Definition: MockObjects.h:425
void setPerspectiveProjection(double fovy, double aspect, double near, double far)
Set the projection matrix with the appropriate perspective projection parameters. ...
Definition: MockObjects.h:455
Definition: ManagerTests.cpp:36
std::array< double, 2 > getDimensionsDouble() const
Get the dimensions of this view in doubles.
Definition: MockObjects.h:590
virtual std::shared_ptr< SurgSim::Graphics::Group > getOrCreateGroup(const std::string &name)
Fetch a group with a given name, if the group does not exist, create it.
Definition: MockObjects.h:98
std::array< int, 2 > getPosition() const override
Get the position of this view.
Definition: MockObjects.h:562
virtual SurgSim::Math::Matrix44d getInverseProjectionMatrix() const
Gets the inverse projection matrix of the camera.
Definition: MockObjects.h:354
NonGraphicsRepresentation(const std::string &name)
Constructor.
Definition: MockObjects.h:686
virtual std::shared_ptr< SurgSim::Graphics::RenderTarget > getRenderTarget() const
Gets RenderTarget that is currently being used by the camera.
Definition: MockObjects.h:412
void addUniform(const std::string &type, const std::string &name, const boost::any &value)
Adds and a uniform to this representation and set its value.
Definition: MockObjects.h:225
void setViewportSize(std::array< double, 2 > dimensions)
Sets the width and height of the viewport.
Definition: MockObjects.h:480
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > Matrix44d
A 4x4 matrix of doubles.
Definition: Matrix.h:55
void getViewport(int *x, int *y, int *width, int *height) const
collect the viewport values
Definition: MockObjects.h:475
void addUniform(std::shared_ptr< SurgSim::Graphics::UniformBase > uniform)
Adds a uniform to this representation.
Definition: MockObjects.h:230
virtual bool getDrawAsWireFrame() const
Return if the representation is rendered as a wire frame.
Definition: MockObjects.h:392
virtual SurgSim::Math::RigidTransform3d getPose() const
Gets the pose of the camera.
Definition: MockObjects.h:321
Camera class for testing.
Definition: MockObjects.h:282
Definition: MockObjects.h:34
Manager class for testing.
Definition: MockObjects.h:196
MockCamera(const std::string &name)
Constructor.
Definition: MockObjects.h:290
void setViewport(int x, int y, int width, int height)
Sets the viewport size for this camera.
Definition: MockObjects.h:465
Base graphics camera class, which defines the basic interface for all graphics cameras.
Definition: Camera.h:51
std::vector< std::shared_ptr< SurgSim::Graphics::UniformBase > > getUniforms() const
Definition: MockObjects.h:505
virtual bool getDrawAsWireFrame() const
Return if the representation is rendered as a wire frame.
Definition: MockObjects.h:209
virtual void setDrawAsWireFrame(bool val)
Sets the representation to render as a wire frame.
Definition: MockObjects.h:388
virtual bool setRenderTarget(std::shared_ptr< SurgSim::Graphics::RenderTarget > renderTarget)
Sets RenderTarget for the current camera, enables the camera to render to off-screen textures...
Definition: MockObjects.h:407
bool isInitialized() const
Gets whether the representation has been initialized.
Definition: MockObjects.h:174
void dumpDebugInfo() const
Generic unspecified debug handle, there are no requirements on this interface the manager implementat...
Definition: MockObjects.h:88
int getNumUpdates() const
Returns the number of times the representation has been updated.
Definition: MockObjects.h:302
virtual void setPose(const SurgSim::Math::RigidTransform3d &transform)
Sets the current pose of the camera.
Definition: MockObjects.h:314
void setAmbientColor(const SurgSim::Math::Vector4d &color)
Sets a value for the ambient lighting term, this can add light to the scene when there is no lighting...
Definition: MockObjects.h:435
void setGenerateTangents(bool value)
Enable or disable the generation of tangents.
Definition: MockObjects.h:445
Representation that does not subclass any graphics components.
Definition: MockObjects.h:681
void setUniforms(const std::vector< std::shared_ptr< SurgSim::Graphics::UniformBase >> &uniforms)
Sets a set of uniforms for this representation.
Definition: MockObjects.h:235
void setGenerateTangents(bool value)
Enable or disable the generation of tangents.
Definition: MockObjects.h:215
void setDimensions(const std::array< int, 2 > &dimensions) override
Set the dimensions of this view.
Definition: MockObjects.h:570
virtual bool setMaterial(std::shared_ptr< SurgSim::Framework::Component > material)
Sets the material that defines the visual appearance of the representation.
Definition: MockObjects.h:371
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:40
virtual void clearMaterial()
Removes the material from the representation.
Definition: MockObjects.h:384
std::array< double, 2 > getViewportSize() const
Gets the dimensions of the viewport.
Definition: MockObjects.h:485
virtual void update(double dt)
Updates the view.
Definition: MockObjects.h:623
std::shared_ptr< PhysicsManagerState > doUpdate(const double &dt, const std::shared_ptr< PhysicsManagerState > &state) override
Override this function to implement the computations specific behavior.
Definition: ComputationGroup.cpp:36
bool isInitialized() const
Gets whether the view has been initialized.
Definition: MockObjects.h:630
std::vector< std::shared_ptr< SurgSim::Graphics::UniformBase > > getUniforms() const
Definition: MockObjects.h:240
Base graphics group class, which defines the interface that all graphics groups must implement...
Definition: Group.h:36
int getNumUpdates() const
Returns the number of times the representation has been updated.
Definition: MockObjects.h:151
void setMainCamera(bool val) override
Marks the camera as a main view camera, this means that view dependent passes should follow this came...
Definition: MockObjects.h:421
bool isWindowBorderEnabled() const override
Returns whether the view window has a border.
Definition: MockObjects.h:604
Definitions of small fixed-size vector types.
Basic graphics manager class which manages graphics components to provide a visualization of the scen...
Definition: Manager.h:37
void setPosition(const std::array< int, 2 > &position) override
Set the position of this view.
Definition: MockObjects.h:554
virtual SurgSim::Math::Matrix44d getViewMatrix() const
Gets the view matrix of the camera.
Definition: MockObjects.h:335
double getSumDt() const
Returns the sum of the dt that the representation has been updated with.
Definition: MockObjects.h:307
bool isAwoken() const
Gets whether the view has been awoken.
Definition: MockObjects.h:635
bool isGeneratingTangents() const
Definition: MockObjects.h:220
void setUniforms(const std::vector< std::shared_ptr< SurgSim::Graphics::UniformBase >> &uniforms)
Sets a set of uniforms for this representation.
Definition: MockObjects.h:500
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
View class for testing.
Definition: MockObjects.h:529
void addUniform(std::shared_ptr< SurgSim::Graphics::UniformBase > uniform)
Adds a uniform to this representation.
Definition: MockObjects.h:495
void addUniform(const std::string &type, const std::string &name, const boost::any &value)
Adds and a uniform to this representation and set its value.
Definition: MockObjects.h:490
virtual bool isVisible() const
Gets whether the group is currently visible.
Definition: MockObjects.h:52
virtual void setProjectionMatrix(const SurgSim::Math::Matrix44d &matrix)
Sets the projection matrix of the camera.
Definition: MockObjects.h:342
virtual SurgSim::Math::Matrix44d getInverseViewMatrix() const
Gets the inverse view matrix of the camera.
Definition: MockObjects.h:430
virtual void setViewMatrix(const SurgSim::Math::Matrix44d &matrix)
Sets the view matrix of the camera.
Definition: MockObjects.h:328
void setOrthogonalProjection(double left, double right, double bottom, double top, double near, double far)
Set the projection matrix with the appropriate orthogonal projection parameters.
Definition: MockObjects.h:460
bool isAwoken() const
Gets whether the representation has been awoken.
Definition: MockObjects.h:179
std::array< int, 2 > getDimensions() const override
Set the dimensions of this view.
Definition: MockObjects.h:578
void setDimensionsDouble(const std::array< double, 2 > &dimensions)
Set the dimensions of this view in doubles.
Definition: MockObjects.h:584
MockView(const std::string &name)
Constructor.
Definition: MockObjects.h:539
virtual void setVisible(bool visible)
Sets whether the group is currently visible.
Definition: MockObjects.h:45
int getType() const override
Returns the type of Manager.
Definition: MockObjects.h:93
Group(const std::string &name)
Constructor.
Definition: Group.cpp:25
void setWindowBorderEnabled(bool enabled) override
Sets whether the view window has a border.
Definition: MockObjects.h:598
bool isGeneratingTangents() const
Definition: MockObjects.h:450
MockRepresentation(const std::string &name)
Constructor.
Definition: MockObjects.h:140
double getSumDt() const
Returns the sum of the dt that the view has been updated with.
Definition: MockObjects.h:615
int getNumUpdates() const
Returns the number of times the view has been updated.
Definition: MockObjects.h:610
virtual bool setMaterial(std::shared_ptr< SurgSim::Framework::Component > material)
Sets the material that defines the visual appearance of the representation.
Definition: MockObjects.h:187
virtual const SurgSim::Math::Matrix44d & getProjectionMatrix() const
Gets the projection matrix of the camera.
Definition: MockObjects.h:349
virtual void setDrawAsWireFrame(bool val)
Sets the representation to render as a wire frame.
Definition: MockObjects.h:204
SurgSim::Math::Vector4d getAmbientColor()
Definition: MockObjects.h:440