00001
00002
00003
00004
00005
00006
00007
00008 #include "Revolt.h"
00009 #include "Particle.h"
00010
00011 #ifndef _PSX
00012
00013 #include "Model.h"
00014 #include "Aerial.h"
00015 #include "Geom.h"
00016
00017 #endif
00018
00020
00021
00022
00024 #ifdef _PC
00025 AERIAL *CreateAerial(void)
00026 {
00027
00028 return (AERIAL *)malloc(sizeof(AERIAL));
00029 }
00030 #endif
00031
00033
00034
00035
00037 #ifdef _PC
00038 void DestroyAerial(AERIAL *aerial)
00039 {
00040 free(aerial);
00041 }
00042 #endif
00043
00044
00046
00047
00048
00050
00051 void SetAerialSprings(AERIAL *aerial, REAL stiffness, REAL damping, REAL antiGrav)
00052 {
00053 aerial->Stiffness = stiffness;
00054 aerial->Damping = damping;
00055 aerial->AntiGrav = antiGrav;
00056 }
00057
00058
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00073
00074 void InitAerial
00075 (AERIAL *aerial,
00076 VEC *direction,
00077 REAL secLength,
00078 REAL mass,
00079 REAL hardness,
00080 REAL resistance,
00081 REAL gravity)
00082 {
00083 int iSec;
00084 PARTICLE *pSection;
00085
00086 aerial->Length = secLength;
00087
00088 CopyVec(direction, &aerial->Direction);
00089
00090
00091 for (iSec = 0; iSec < AERIAL_NSECTIONS; iSec++) {
00092
00093 pSection = &aerial->Section[iSec];
00094
00095 SetParticleMass(pSection, mass);
00096
00097 pSection->Hardness = hardness;
00098 pSection->Resistance = resistance;
00099 pSection->Gravity = gravity;
00100 }
00101
00102 }
00103
00104