ScummVM API documentation
ad_object_3d.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * This file is based on WME.
24  * http://dead-code.org/redir.php?target=wme
25  * Copyright (c) 2003-2013 Jan Nedoma and contributors
26  */
27 
28 #ifndef WINTERMUTE_AD_OBJECT_3D_H
29 #define WINTERMUTE_AD_OBJECT_3D_H
30 
31 #include "engines/wintermute/ad/ad_object.h"
32 
33 #include "math/matrix4.h"
34 #include "math/vector3d.h"
35 
36 namespace Wintermute {
37 
38 class ShadowVolume;
39 
40 class AdObject3D : public AdObject {
41 public:
42  bool setupLights();
43  bool convert3DTo2D(Math::Matrix4 *worldMat, int32 *posX, int32 *posY);
44  bool skipTo(int x, int y, bool tolerant = false);
45  char *_tempSkelAnim;
46  Math::Vector3d _lastPosVector;
47  DECLARE_PERSISTENT(AdObject3D, AdObject)
48  bool _dropToFloor;
49  bool display() override;
50  bool update() override;
51  AdObject3D(BaseGame *inGame);
52  virtual ~AdObject3D();
53  bool getBonePosition2D(const char *boneName, int32 *x, int32 *y);
54  bool getBonePosition3D(const char *boneName, Math::Vector3d *pos, Math::Vector3d *offset = nullptr);
55 
56  float _velocity;
57  float _angVelocity;
58 
59  uint32 _ambientLightColor;
60  bool _hasAmbientLightColor;
61 
62  // scripting interface
63  ScValue *scGetProperty(const Common::String &name) override;
64  bool scSetProperty(const char *name, ScValue *value) override;
65  bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
66  const char *scToString() override;
67 
68  ShadowVolume *getShadowVolume();
69 
70 private:
71  ShadowVolume *_shadowVolume;
72  BaseArray<char *> _ignoredLights;
73  void clearIgnoredLights();
74  bool addIgnoredLight(char *lightName);
75  bool removeIgnoredLight(char *lightName);
76 };
77 
78 } // namespace Wintermute
79 
80 #endif
Definition: script.h:44
Definition: base_game.h:75
Definition: script_value.h:42
Definition: str.h:59
Definition: ad_object.h:46
Definition: script_stack.h:41
Definition: 3dshadow_volume.h:48
Definition: ad_object_3d.h:40
Definition: coll_templ.h:89
Definition: achievements_tables.h:27