home *** CD-ROM | disk | FTP | other *** search
- /*
- * Mountain.h
- *
- * Peter Janssen - janssen@cs.kuleuven.ac.be
- *
- */
-
- #ifndef MOUNTAIN_H
- #define MOUNTAIN_H
-
- #define GeomMountainCreate(p1, p2, n, d, e, l, s, g) \
- GeomCreate((GeomRef)MountainCreate(p1, p2, n, d, e, l, s, g), MountainMethods())
-
- #define X 0
- #define Y 1
- #define LOW 0
- #define HIGH 1
-
-
- typedef struct HeightValue {
- Float Value;
- struct HeightValue *Next;
- } HeightValue;
-
- typedef struct StartGridStruct {
- int Size;
- Float **Data;
- } StartGridStruct;
-
- typedef struct CalcList {
- struct CalcList *Previous;
- int x;
- int y;
- Float Data[3][3];
- int ToDo[3][3];
- struct CalcList *Next;
- } CalcList;
-
- typedef struct HeightCache {
- int x;
- int y;
- Float z;
- } HeightCache;
-
- typedef struct Mountain {
- int Number;
- int IterationLevel;
- int EvolveLevel;
- Float FractalDimension;
- Float Scale;
-
- int GridMax;
-
- int StartGridSize;
- Float **StartGridData;
- int EvolvedSize;
- Float **EvolvedData;
-
- HeightCache **Cache1, **Cache2;
- Float D2Bounds[2][2];
- Float XSize;
- Float YSize;
- Float InvXSize;
- Float InvYSize;
-
- int *MaxSize;
-
- Vector IntersectPos;
- Vector Normal;
-
- CalcList *ToCalcList;
-
- } Mountain;
-
- extern Mountain *MountainCreate();
- extern int MountainIntersect(), MountainNormal();
- extern void MountainUV(), MountainStats();
- extern char *MountainName();
- extern Methods *MountainMethods();
-
- #endif /* MOUNTAIN_H */
-