Commit 8fc37ab4 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri

Improved style and documentation

Change-Id: I1c8194c4a0ba9fc3d10d18475f740dc4d4f823c6
parent 3e5a471c
......@@ -26,8 +26,7 @@
#include "vtkRenderingExternalModule.h" // For export macro
// Class that maintains an external render window.
class VTKRENDERINGEXTERNAL_EXPORT ExternalVTKWidget :
public vtkObject
class VTKRENDERINGEXTERNAL_EXPORT ExternalVTKWidget : public vtkObject
{
public:
static ExternalVTKWidget *New();
......
......@@ -18,14 +18,13 @@
#include "vtkMatrix4x4.h"
#include "vtkObjectFactory.h"
#include "vtkOpenGLError.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGL.h"
#include "vtkOpenGLRenderWindow.h"
#include "vtkOutputWindow.h"
#include "vtkPerspectiveTransform.h"
#include "vtkRenderer.h"
#include "vtkTransform.h"
#include "vtkOpenGL.h"
#include <math.h>
vtkStandardNewMacro(vtkExternalOpenGLCamera);
......
......@@ -16,6 +16,8 @@
// .SECTION Description
// vtkExternalOpenGLCamera is a concrete implementation of the abstract class
// vtkCamera. vtkExternalOpenGLCamera interfaces to the OpenGL rendering library.
// This class extends vtkOpenGLCamera by introducing API wherein the camera
// matrices can be set explicitly by the application.
#ifndef __vtkExternalOpenGLCamera_h
#define __vtkExternalOpenGLCamera_h
......@@ -23,9 +25,8 @@
#include "vtkRenderingExternalModule.h" // For export macro
#include "vtkOpenGLCamera.h"
class vtkOpenGLRenderer;
class VTKRENDERINGEXTERNAL_EXPORT vtkExternalOpenGLCamera : public vtkOpenGLCamera
class VTKRENDERINGEXTERNAL_EXPORT vtkExternalOpenGLCamera :
public vtkOpenGLCamera
{
public:
static vtkExternalOpenGLCamera *New();
......
......@@ -15,9 +15,25 @@
// .NAME vtkExternalOpenGLRenderWindow - OpenGL render window that allows using
// an external window to render vtk objects
// .SECTION Description
// vtkExternalOpenGLRenderWindow is a concrete implementation of the abstract class
// vtkRenderWindow. vtkExternalOpenGLRenderer interfaces to the OpenGL graphics
// library.
// vtkExternalOpenGLRenderWindow is a concrete implementation of the abstract
// class vtkRenderWindow. vtkExternalOpenGLRenderer interfaces to the OpenGL
// graphics library.
//
// This class extends vtkGenericOpenGLRenderWindow to allow sharing the
// same OpenGL context by various visualization applications. Basically, this
// class prevents VTK from creating a new OpenGL context. Thus, it requires that
// an OpenGL context be initialized before Render is called.
// \sa Render()
//
// It is a generic implementation; this window is platform agnostic. However,
// the application user must explicitly make sure the window size is
// synchronized when the external application window/viewport resizes.
// \sa SetSize()
//
// It has the same requirements as the vtkGenericOpenGLRenderWindow, whereby,
// one must register an observer for WindowMakeCurrentEvent,
// WindowIsCurrentEvent and WindowFrameEvent.
// \sa vtkGenericOpenGLRenderWindow
#ifndef __vtkExternalOpenGLRenderWindow_h
#define __vtkExternalOpenGLRenderWindow_h
......
......@@ -16,7 +16,16 @@
// .SECTION Description
// vtkExternalOpenGLRenderer is a secondary implementation of the class
// vtkOpenGLRenderer. vtkExternalOpenGLRenderer interfaces to the
// OpenGL graphics library.
// OpenGL graphics library. This class provides API to preserve the color and
// depth buffers, thereby allowing external applications to manage the OpenGL
// buffers. This becomes very useful when there are multiple OpenGL applications
// sharing the same OpenGL context.
//
// vtkExternalOpenGLRenderer makes sure that the camera used in the scene if of
// type vtkExternalOpenGLCamera. It manages light and camera transformations for
// VTK objects in the OpenGL context.
//
// \sa vtkExternalOpenGLCamera
#ifndef __vtkExternalOpenGLRenderer_h
#define __vtkExternalOpenGLRenderer_h
......@@ -43,7 +52,7 @@ public:
// Description:
// Normally the vtkOpenGLRenderer clears the color buffer before rendering a
// new frame. When this flag is true, the color buffer is not cleared. This
// can be helpful when rendering there are multiple visualization systems
// can be helpful when there are multiple visualization systems
// sharing the same context. Default value is 1.
vtkGetMacro(PreserveColorBuffer, int);
vtkSetMacro(PreserveColorBuffer, int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment