-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseObject.h
More file actions
52 lines (30 loc) · 1.07 KB
/
Copy pathBaseObject.h
File metadata and controls
52 lines (30 loc) · 1.07 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef MY_OBJECT_H
#define MY_OBJECT_H
#include <GLModel/GLModel.h>
#include <shared/defs.h>
#include <util/util.h>
#include "animTcl.h"
#include <string>
// Top level class. All objects must inherit from this one
class BaseObject
{
public:
// constructor. All objects must have a name
BaseObject( const std::string& name );
virtual ~BaseObject();
// obtain the name of the object
void getName( std::string& name ) const;
std::string retrieveName() const;
// override this method if you want the object to be drawable
virtual void display( GLenum mode = GL_RENDER );
// override this method to enable shell interaction
virtual int command( int argc, myCONST_SPEC char **argv );
// override this method to specify what happens when the object is reset
virtual void reset( double time );
protected:
std::string m_name;
// this mutator is not publicly available because changing the name
// of an object directly messes up the consistency of ResourceManager
void _setName( std::string& name );
};
#endif