GlutRenderer Class Reference

Simple static class renderer built on Glut. More...

`#include <SurgSim/Testing/VisualTestCommon/GlutRenderer.h>`

## Static Public Member Functions

static void | run ()
| Initializes and runs the Glut main loop. This function will block until the Glut graphics window is closed. More...
static void | setCamera (std::shared_ptr< GlutCamera > camera)
| Sets the camera used to control the view of the scene. More...
static void | addObject (std::shared_ptr< GlutRenderObject > object)
| Adds an object to the scene. More...

## Static Private Member Functions

static void | initialize ()
| Initializes the Glut window. More...
static void | reshape (GLint width, GLint height)
| Glut reshape function which handles the resizing of the window. More...
static void | display ()
| Glut display function which handles the drawing of the scene. More...
static void | drawObjects ()
| Iterates through the scene objects to draw them. More...

## Static Private Attributes

static int | m_width = 1024
| Width of the window. More...
static int | m_height = 768
| Height of the window. More...
static std::shared_ptr< GlutCamera > | m_camera = nullptr
| Camera which controls the view of the scene. More...
static std::vector< std::shared_ptr< GlutRenderObject > > | m_objects
| Objects in the scene. More...

## Detailed Description

Simple static class renderer built on Glut.

## Member Function Documentation

## addObject()

static void GlutRenderer::addObject | ( | std::shared_ptr< GlutRenderObject > | object | ) |

inline static

Adds an object to the scene.

Parameters

  object | Scene object.

## display()

void GlutRenderer::display | ( |  | ) |

static private

Glut display function which handles the drawing of the scene.

## drawObjects()

static void GlutRenderer::drawObjects | ( |  | ) |

inline static private

Iterates through the scene objects to draw them.

## initialize()

void GlutRenderer::initialize | ( |  | ) |

static private

Initializes the Glut window.

## reshape()

static void GlutRenderer::reshape | ( | GLint | width,
|  | GLint | height
| ) |  |

inline static private

Glut reshape function which handles the resizing of the window.

## run()

static void GlutRenderer::run | ( |  | ) |

inline static

Initializes and runs the Glut main loop. This function will block until the Glut graphics window is closed.

## setCamera()

static void GlutRenderer::setCamera | ( | std::shared_ptr< GlutCamera > | camera | ) |

inline static

Sets the camera used to control the view of the scene.

Parameters

  camera | View camera.

## Member Data Documentation

## m_camera

std::shared_ptr< GlutCamera > GlutRenderer::m_camera = nullptr

static private

Camera which controls the view of the scene.

## m_height

int GlutRenderer::m_height = 768

static private

Height of the window.

## m_objects

std::vector< std::shared_ptr< GlutRenderObject > > GlutRenderer::m_objects

static private

Objects in the scene.

## m_width

int GlutRenderer::m_width = 1024

static private

Width of the window.

The documentation for this class was generated from the following files:

- SurgSim/Testing/VisualTestCommon/GlutRenderer.h
- SurgSim/Testing/VisualTestCommon/GlutRenderer.cpp