Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
MoveablePhysDefClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__MOVEABLEPHYSDEFCLASS_H
13#define TT_INCLUDE__MOVEABLEPHYSDEFCLASS_H
14
15#include "DynamicPhysDefClass.h"
16
17
18class MoveablePhysDefClass : public DynamicPhysDefClass
19{
20public:
21 MoveablePhysDefClass(void);
22 virtual const char * Get_Type_Name(void) { return "MoveablePhysDef"; }
23 virtual bool Is_Type(const char *);
24 virtual bool Save(ChunkSaveClass &csave);
25 virtual bool Load(ChunkLoadClass &cload);
26 float Get_Mass(void) { return Mass; }
27 float Get_Grav_Scale(void) { return GravScale; }
28 float Get_Elasticity(void) { return Elasticity; }
29 void Set_Mass(float new_mass) { Mass = new_mass; }
30 void Set_Grav_Scale(float new_g){ GravScale = new_g; }
31 void Set_Elasticity(float new_e) { Elasticity = new_e; }
32#ifdef DDBEDIT
33 virtual void Dump (FileClass &file);
34#endif
35 DECLARE_EDITABLE(MoveablePhysDefClass,DynamicPhysDefClass);
36protected:
37 float Mass;
38 float GravScale;
39 float Elasticity;
40 enum {
41 CINEMATIC_COLLISION_NONE = 0,
42 CINEMATIC_COLLISION_STOP,
43 CINEMATIC_COLLISION_PUSH,
44 CINEMATIC_COLLISION_KILL
45 };
46 int CinematicCollisionMode;
47 friend class MoveablePhysClass;
48 friend class PresetDump;
49}; // 36
50
51#endif