Colobot
old_object_interface.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsitec.ch; http://colobot.info; http://github.com/colobot
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://gnu.org/licenses
18  */
19 
25 #pragma once
26 
27 #include "math/vector.h"
28 
29 #include "object/object_type.h"
30 
31 namespace Math
32 {
33 struct Matrix;
34 } // namespace Math
35 
36 class CAuto;
37 
38 
39 struct Character
40 {
41  float wheelFront = 0.0f; // position X of the front wheels
42  float wheelBack = 0.0f; // position X of the back wheels
43  float wheelLeft = 0.0f; // position Z of the left wheels
44  float wheelRight = 0.0f; // position Z of the right wheels
45  float height = 0.0f; // normal height on top of ground
46 };
47 
49 {
50 public:
51  virtual ~COldObjectInterface() {}
52 
53  virtual void Simplify();
54  virtual void DeletePart(int part);
55  virtual void SetType(ObjectType type);
56 
57  virtual int GetObjectRank(int part);
58 
59  virtual int GetOption();
60 
61  virtual void SetDrawFront(bool bDraw);
62 
63 
64  virtual void FloorAdjust();
65 
66  virtual void SetLinVibration(Math::Vector dir);
67  virtual void SetCirVibration(Math::Vector dir);
68 
69  virtual Math::Vector GetTilt();
70 
71  virtual void SetMasterParticle(int part, int parti);
72 
73  virtual Math::Matrix* GetWorldMatrix(int part);
74 
75  virtual Character* GetCharacter();
76 
77  virtual void FlatParent();
78 
79  // Not sure. Maybe a separate interface, or maybe CControllableObject (buildings can have viruses too)
80  virtual void SetVirusMode(bool bEnable);
81  virtual bool GetVirusMode();
82 
83  // This will be eventually removed after refactoring to subclasses
84  virtual CAuto* GetAuto();
85 };
Definition: old_object_interface.h:39
4x4 matrix
Definition: matrix.h:65
Definition: auto.h:53
ObjectType enum.
Namespace for (new) math code.
Definition: device.h:39
Vector struct and related functions.
ObjectType
Type of game object.
Definition: object_type.h:33
Definition: old_object_interface.h:48
3D (3x1) vector
Definition: vector.h:53