source: trunk/vizservers/nanovis/Renderable.h @ 828

Last change on this file since 828 was 406, checked in by qiaow, 18 years ago

Added ScreenSnapper? class and VolumeRenderer? class.
VolumeRenderer? class can handle motiple volumes. Volume rendering code is seperated
from nanovis.cpp file.

File size: 1.3 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 * Renderable.h: abstract class, a drawable thing
4 *
5 * ======================================================================
6 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
7 *           Purdue Rendering and Perceptualization Lab (PURPL)
8 *
9 *  Copyright (c) 2004-2006  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15
16
17#ifndef _RENDERABLE_H_
18#define _RENDERABLE_H_
19
20
21#include "Vector3.h"
22
23struct BoundBox{
24  Vector3 low; //lower coordinates
25  Vector3 high; //higher coordinates
26
27  BoundBox(){}
28  BoundBox(float low_x, float low_y, float low_z,
29          float high_x, float high_y, float high_z):
30          low(Vector3(low_x, low_y, low_z)),
31          high(Vector3(high_x, high_y, high_z)){}
32};
33
34class Renderable{
35protected:
36  Vector3 location;     //the location (x,y,z) of the object
37  bool enabled;         //display is enabled
38  BoundBox boundary;    //the bounding box
39
40public:
41  Renderable(Vector3 loc);
42  Renderable();
43  //~Renderable();
44
45  void move(Vector3 new_loc);
46  virtual void render() = 0;
47  void enable();
48  void disable();
49  bool is_enabled();
50};
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.