source: trunk/packages/vizservers/nanovis/Renderable.h @ 2798

Last change on this file since 2798 was 2798, checked in by ldelgass, 13 years ago

Add emacs mode magic line in preparation for indentation cleanup

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