Last change
on this file since 425 was
401,
checked in by qiaow, 19 years ago
|
Added Renderable class, the superclass of every class that can be drawn.
|
File size:
927 bytes
|
Rev | Line | |
---|
[401] | 1 | /* |
---|
| 2 | * ---------------------------------------------------------------------- |
---|
| 3 | * Renderable.cpp: 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 | #include "Renderable.h" |
---|
| 18 | |
---|
| 19 | Renderable::Renderable(){} |
---|
| 20 | Renderable::Renderable(Vector3 loc): |
---|
| 21 | location(loc), |
---|
| 22 | enabled(true){ } |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | void Renderable::move(Vector3 new_loc) { location = new_loc; } |
---|
| 26 | |
---|
| 27 | void Renderable::enable() { enabled = true; } |
---|
| 28 | void Renderable::disable() { enabled = false; } |
---|
| 29 | bool Renderable::is_enabled() { return enabled; } |
---|
| 30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.