00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __AERIAL_H__
00010 #define __AERIAL_H__
00011
00012 #include "particle.h"
00013
00014 #ifndef _PSX
00015 #define AERIAL_NSECTIONS 3 // Odd number > 2
00016 #define AERIAL_LASTSECTION 2 // AERIAL_NSECTIONS - 1
00017 #define AERIAL_SKIP 1 // (AERIAL_NSECTIONS - 1) / 2
00018 #define AERIAL_START 1 // always = AERIAL_SKIP
00019
00020 #define AERIAL_NTOTSECTIONS 5 // Total number of sections to draw
00021 #define AERIAL_UNITLEN (1.0f / 4.0f) // 1.0 / (AERIAL_NTOTSECTIONS - 1)
00022 #else
00023 #define AERIAL_NSECTIONS 3 // Odd number > 2
00024 #define AERIAL_LASTSECTION 2 // AERIAL_NSECTIONS - 1
00025 #define AERIAL_SKIP 1 // (AERIAL_NSECTIONS - 1) / 2
00026 #define AERIAL_START 1 // always = AERIAL_SKIP
00027
00028 #define AERIAL_NTOTSECTIONS 5 // Total number of sections to draw
00029 #define AERIAL_UNITLEN (1.0f / 4.0f) // 1.0 / (AERIAL_NTOTSECTIONS - 1)
00030 #endif
00031
00032
00033 typedef PARTICLE AERIALSECTION;
00034
00035 typedef struct {
00036
00037 VEC Direction;
00038 REAL Length;
00039 REAL Stiffness;
00040 REAL Damping;
00041 REAL AntiGrav;
00042 AERIALSECTION Section[AERIAL_NSECTIONS];
00043 } AERIAL;
00044
00045
00046
00047 #ifdef _PC
00048 extern AERIAL *CreateAerial();
00049 extern void DestroyAerial(AERIAL *aerial);
00050 #endif
00051 extern void SetAerialSprings(AERIAL *aerial, REAL stiffness, REAL damping, REAL antiGrav);
00052 extern void InitAerial(AERIAL *aerial, VEC *direction, REAL secLength, REAL mass, REAL hardness, REAL resistance, REAL gravity);
00053
00054
00055
00056
00057 #endif