summaryrefslogtreecommitdiff
path: root/cad/plugins/NanoVision-1/src/Testing/OpenGL/TrajectoryTestGraphicsManager.cpp
blob: ebf6113fe145456c5089bba617a7cad045f31e26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2008 Nanorex, Inc.  See LICENSE file for details.

#include "TrajectoryTestGraphicsManager.h"
#include <Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngine.h>
#include <Plugins/RenderingEngines/OpenGL/Renderers/NXBallAndStickOpenGLRenderer.h>

using namespace Nanorex;
using namespace std;


TrajectoryTestGraphicsManager::TrajectoryTestGraphicsManager()
: NXGraphicsManager()
{
	NXOpenGLRenderingEngine *openglRenderingEngine =
		new NXOpenGLRenderingEngine((QWidget*) 0);
	
	renderingEngine = static_cast<NXRenderingEngine*>(openglRenderingEngine);
	
	defaultRenderer = new NXBallAndStickOpenGLRenderer(renderingEngine);
	renderStyleRendererPluginTable.insert(make_pair("bas", defaultRenderer));
	renderStyleNameTable.insert(make_pair("bas", "Ball-and-Stick"));
	// mapping between "def" and defaultRenderer done in newGraphicsInstance()
}


TrajectoryTestGraphicsManager::~TrajectoryTestGraphicsManager()
{
	delete renderingEngine;
	delete defaultRenderer;
}