1 | /**********************************************************************
|
---|
2 | *<
|
---|
3 | FILE: modstack.h
|
---|
4 |
|
---|
5 | DESCRIPTION:
|
---|
6 |
|
---|
7 | CREATED BY: Rolf Berteig
|
---|
8 |
|
---|
9 | HISTORY: created January 20, 1996
|
---|
10 |
|
---|
11 | *> Copyright (c) 1994, All Rights Reserved.
|
---|
12 | **********************************************************************/
|
---|
13 |
|
---|
14 | #ifndef __MODSTACK__
|
---|
15 | #define __MODSTACK__
|
---|
16 |
|
---|
17 |
|
---|
18 | // These are the class IDs for object space derived objects and
|
---|
19 | // world space derived objects
|
---|
20 | extern CoreExport Class_ID derivObjClassID;
|
---|
21 | extern CoreExport Class_ID WSMDerivObjClassID;
|
---|
22 |
|
---|
23 |
|
---|
24 | class IDerivedObject : public Object {
|
---|
25 | public:
|
---|
26 | // Adds a modifier to the derived object.
|
---|
27 | // before = 0 :Place modifier at the end of the pipeline (top of stack)
|
---|
28 | // before = NumModifiers() :Place modifier at the start of the pipeline (bottom of stack)
|
---|
29 | virtual void AddModifier(Modifier *mod, ModContext *mc=NULL, int before=0)=0;
|
---|
30 | virtual void DeleteModifier(int index=0)=0;
|
---|
31 | virtual int NumModifiers()=0;
|
---|
32 |
|
---|
33 | // Searches down the pipeline for the base object (an object that is not a
|
---|
34 | // derived object). May step into other derived objects
|
---|
35 | virtual Object *FindBaseObject()=0;
|
---|
36 |
|
---|
37 | // Get and set the object that this derived object reference.
|
---|
38 | // This is the next object down in the stack and may be the base object.
|
---|
39 | virtual Object *GetObjRef()=0;
|
---|
40 | virtual RefResult ReferenceObject(Object *pob)=0;
|
---|
41 |
|
---|
42 | // Access the ith modifier.
|
---|
43 | virtual Modifier *GetModifier(int index)=0;
|
---|
44 |
|
---|
45 | // Replaces the ith modifier in the stack
|
---|
46 | virtual void SetModifier(int index, Modifier *mod)=0;
|
---|
47 |
|
---|
48 | // Access the mod context for the ith modifier
|
---|
49 | virtual ModContext* GetModContext(int index)=0;
|
---|
50 | };
|
---|
51 |
|
---|
52 | // Create a world space or object space derived object.
|
---|
53 | // If the given object pointer is non-NULL then the derived
|
---|
54 | // object will be set up to reference that object.
|
---|
55 | CoreExport IDerivedObject *CreateWSDerivedObject(Object *pob=NULL);
|
---|
56 | CoreExport IDerivedObject *CreateDerivedObject(Object *pob=NULL);
|
---|
57 |
|
---|
58 |
|
---|
59 | #endif //__MODSTACK__
|
---|