Revision 657,
1.4 KB
checked in by mattausch, 19 years ago
(diff) |
added ogre dependencies and patched ogre sources
|
Rev | Line | |
---|
[657] | 1 |
|
---|
| 2 | #ifndef _LWOBJECT_H_
|
---|
| 3 | #define _LWOBJECT_H_
|
---|
| 4 |
|
---|
| 5 | #include "lwo.h"
|
---|
| 6 | #include "lwEnvelope.h"
|
---|
| 7 | #include "lwClip.h"
|
---|
| 8 | #include "lwLayer.h"
|
---|
| 9 |
|
---|
| 10 | class lwObject
|
---|
| 11 | {
|
---|
| 12 | public:
|
---|
| 13 | lwObject()
|
---|
| 14 | {
|
---|
| 15 | tagsoffset = 0;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | ~lwObject()
|
---|
| 19 | {
|
---|
| 20 | unsigned int i;
|
---|
| 21 |
|
---|
| 22 | for (i=0; i < layers.size(); delete layers[i++]);
|
---|
| 23 | for (i=0; i < envelopes.size(); delete envelopes[i++]);
|
---|
| 24 | for (i=0; i < clips.size(); delete clips[i++]);
|
---|
| 25 | for (i=0; i < surfaces.size(); i++)
|
---|
| 26 | {
|
---|
| 27 | lwSurface *s = surfaces[i];
|
---|
| 28 | if(s)
|
---|
| 29 | {
|
---|
| 30 | for (unsigned int j = i+1; j < surfaces.size(); j++)
|
---|
| 31 | if (s == surfaces[j]) surfaces[j] = 0;
|
---|
| 32 | delete s;
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 | for (i=0; i < tags.size(); free(tags[i++]));
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | lwClip *lwFindClip( int index )
|
---|
| 39 | {
|
---|
| 40 | for (unsigned int i = 0; i < clips.size(); i++)
|
---|
| 41 | if (clips[i]->index == index)
|
---|
| 42 | return clips[i];
|
---|
| 43 | return 0;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | lwEnvelope *lwFindEnvelope( int index )
|
---|
| 47 | {
|
---|
| 48 | for (unsigned int i = 0; i < envelopes.size(); i++)
|
---|
| 49 | if (envelopes[i]->index == index)
|
---|
| 50 | return envelopes[i];
|
---|
| 51 | return 0;
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | vlayers layers; /* linked list of layers */
|
---|
| 55 | venvelopes envelopes; /* linked list of envelopes */
|
---|
| 56 | vclips clips; /* linked list of clips */
|
---|
| 57 | vsurfaces surfaces; /* linked list of surfaces */
|
---|
| 58 | int tagsoffset;
|
---|
| 59 | vtags tags; /* array of strings */
|
---|
| 60 | };
|
---|
| 61 |
|
---|
| 62 | typedef vector<lwObject*> vobjects;
|
---|
| 63 |
|
---|
| 64 | #endif // _LWOBJECT_H_
|
---|
| 65 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.