85 lines
No EOL
1.6 KiB
C++
85 lines
No EOL
1.6 KiB
C++
|
|
#ifndef ___FUR_H___
|
|
#define ___FUR_H___
|
|
|
|
|
|
typedef struct FurCenterMeca_
|
|
{
|
|
Vector curCenterPos;
|
|
Vector motionCenterPos;
|
|
Vector motionCenterSpeed;
|
|
float elasticity;
|
|
float friction;
|
|
DWORD lastTime;
|
|
} FurCenterMeca;
|
|
|
|
|
|
class FUR_OBJ
|
|
{
|
|
public:
|
|
int Mode; // 1 -> Use Orientation Tab 2-> Orientation en U
|
|
UnicID ThisID;
|
|
|
|
int nbFurElmt;
|
|
|
|
char Name[MAX_PATH];
|
|
char GeneratorName[MAX_PATH];
|
|
char SceneName[MAX_PATH];
|
|
char ObjectName[MAX_PATH];
|
|
|
|
_3D_Material *SpriteTextureMat;
|
|
u32 SpriteTextureAdded;
|
|
char SpriteTextureMatName[MAX_PATH];
|
|
int SpriteIsAnimated;
|
|
float SpriteWidth;
|
|
float SpriteWidthRand;
|
|
float SpriteHeight;
|
|
float SpriteHeightRand;
|
|
int SpriteLevels;
|
|
float SpritePosition;
|
|
float xyzSum;
|
|
|
|
char MassTextureName[MAX_PATH];
|
|
char ColorTextureName[MAX_PATH];
|
|
|
|
Vector *OriginList;
|
|
Vector *DirectionList;
|
|
Vector *VList;
|
|
Vector *UVList;
|
|
float *WidthList;
|
|
float *HeightList;
|
|
u32 *ColorList;
|
|
|
|
float *randW;
|
|
float *randH;
|
|
|
|
int nbOrientation;
|
|
Vector *OrientationList;
|
|
float OrientationStrengh;
|
|
FurCenterMeca OrientationMeca;
|
|
|
|
int MeshFaces;
|
|
float MeshSurface;
|
|
float *MeshSurfaceList;
|
|
|
|
public:
|
|
FUR_OBJ() {memset(this, 0, sizeof(*this)); };
|
|
~FUR_OBJ() {
|
|
if (OriginList) {CC_free(OriginList); OriginList = NULL;}
|
|
if (DirectionList) {CC_free(DirectionList); DirectionList = NULL;}
|
|
if (VList) {CC_free(VList); VList = NULL;}
|
|
if (MeshSurfaceList) {CC_free(MeshSurfaceList); MeshSurfaceList = NULL;}
|
|
if (randW) {CC_free(randW); randW = NULL;}
|
|
if (randH) {CC_free(randH); randH = NULL;}
|
|
};
|
|
|
|
void Init();
|
|
void Process(); // forces
|
|
|
|
void Draw();
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif //___FUR_H___
|