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-2015, 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/matrix.h"
28 #include "math/vector.h"
29 
30 #include "object/object_type.h"
31 
32 
33 class CAuto;
34 
35 
36 struct Character
37 {
38  float wheelFront = 0.0f; // position X of the front wheels
39  float wheelBack = 0.0f; // position X of the back wheels
40  float wheelLeft = 0.0f; // position Z of the left wheels
41  float wheelRight = 0.0f; // position Z of the right wheels
42  float height = 0.0f; // normal height on top of ground
43 };
44 
46 {
47 public:
48  virtual ~COldObjectInterface() {}
49 
50  virtual void Simplify();
51  virtual void DeletePart(int part);
52  virtual void SetType(ObjectType type);
53 
54  virtual int GetObjectRank(int part);
55 
56  virtual int GetOption();
57 
58  virtual void SetDrawFront(bool bDraw);
59 
60 
61  virtual void FloorAdjust();
62 
63  virtual void SetLinVibration(Math::Vector dir);
64  virtual void SetCirVibration(Math::Vector dir);
65 
66  virtual Math::Vector GetTilt();
67 
68  virtual void SetMasterParticle(int part, int parti);
69 
70  virtual Math::Matrix* GetWorldMatrix(int part);
71 
72  virtual Character* GetCharacter();
73 
74  virtual void FlatParent();
75 
76  // Not sure. Maybe a separate interface, or maybe CControllableObject (buildings can have viruses too)
77  virtual void SetVirusMode(bool bEnable);
78  virtual bool GetVirusMode();
79 
80  // This will be eventually removed after refactoring to subclasses
81  virtual CAuto* GetAuto();
82 };
Definition: old_object_interface.h:36
4x4 matrix
Definition: matrix.h:65
Definition: auto.h:56
ObjectType enum.
Matrix struct and related functions.
Vector struct and related functions.
ObjectType
Type of game object.
Definition: object_type.h:33
Definition: old_object_interface.h:45
3D (3x1) vector
Definition: vector.h:53