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

Last change on this file since 2844 was 2844, checked in by ldelgass, 8 years ago

Cleanups, no functional changes

  • 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#ifndef RENDERABLE_H
17#define RENDERABLE_H
18
19#include "Vector3.h"
20
21struct BoundBox {
22    Vector3 low;  ///< lower coordinates
23    Vector3 high; ///< higher coordinates
24
25    BoundBox()
26    {}
27
28    BoundBox(float low_x, float low_y, float low_z,
29             float high_x, float high_y, float high_z) :
30        low(low_x, low_y, low_z),
31        high(high_x, high_y, high_z)
32    {}
33};
34
35class Renderable
36{
37public:
38    Renderable(const Vector3& loc);
39
40    Renderable();
41
42    virtual ~Renderable();
43
44    void move(const Vector3& new_loc);
45
46    virtual void render() = 0;
47
48    void enable();
49
50    void disable();
51
52    bool is_enabled() const;
53
54protected:
55    Vector3 _location;  ///< the location (x,y,z) of the object
56    bool _enabled;      ///< display is enabled
57    BoundBox _boundary; ///< the bounding box
58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.