Leviathan  0.8.0.0
Leviathan game engine
EntityBind.cpp
Go to the documentation of this file.
1 // ------------------------------------ //
2 #include "BindDefinitions.h"
3 
4 #include "Generated/StandardWorld.h"
5 
6 #include "Entities/GameWorld.h"
9 
11 
12 
13 using namespace Leviathan;
14 // ------------------------------------ //
15 
16 // Proxies etc.
17 // ------------------------------------ //
18 void ScriptSystemUsesProxyName(void* memory, const std::string& name)
19 {
20  new(memory) ScriptSystemUses(name);
21 }
22 
23 void ScriptSystemUsesProxyType(void* memory, uint16_t componenttype)
24 {
25  new(memory) ScriptSystemUses(componenttype);
26 }
27 
28 void ScriptSystemUsesProxyInvalid(void* memory)
29 {
30  new(memory) ScriptSystemUses();
31 }
32 
34 {
35  static_cast<ScriptSystemUses*>(memory)->~ScriptSystemUses();
36 }
37 
38 void SimpleAnimationConstructorProxy(void* memory, const std::string& name)
39 {
40  new(memory) SimpleAnimation(name);
41 }
42 
44 {
45  reinterpret_cast<SimpleAnimation*>(memory)->~SimpleAnimation();
46 }
47 
48 void AnimatedAddHelper(Animated* self, const SimpleAnimation& animation)
49 {
50 
51  self->Animations.push_back(animation);
52 }
53 
55 {
56 
57  if(index >= self->Animations.size())
58  return nullptr;
59 
60  return &self->Animations[index];
61 }
62 
64 {
65  auto node = self.Node;
66  if(node)
67  node->AddRef();
68  return node.get();
69 }
70 
72 {
73  auto obj = self.GraphicalObject;
74  if(obj)
75  obj->AddRef();
76  return obj.get();
77 }
78 
80 {
81  auto obj = self.ObjectMaterial;
82  if(obj)
83  obj->AddRef();
84  return obj.get();
85 }
86 
87 void ModelSetObjectMaterial(Model& self, Material* newmaterial)
88 {
89  self.ObjectMaterial = Material::WrapPtr(newmaterial);
90 }
91 // ------------------------------------ //
92 // Start of the actual bind
93 namespace Leviathan {
94 
95 
96 bool BindRayCast(asIScriptEngine* engine)
97 {
98  // // Result class for ray cast //
99  // ANGELSCRIPT_REGISTER_REF_TYPE("RayCastHitEntity", RayCastHitEntity);
100 
101  // if(engine->RegisterObjectMethod("RayCastHitEntity", "Float3 GetPosition()",
102  // asMETHOD(RayCastHitEntity, GetPosition), asCALL_THISCALL) < 0) {
103  // ANGELSCRIPT_REGISTERFAIL;
104  // }
105 
106  // // Compare function //
107  // if(engine->RegisterObjectMethod("RayCastHitEntity",
108  // "bool DoesBodyMatchThisHit(NewtonBody@ body)",
109  // asMETHOD(RayCastHitEntity, DoesBodyMatchThisHit), asCALL_THISCALL) < 0) {
110  // ANGELSCRIPT_REGISTERFAIL;
111  // }
112 
113 
114  return true;
115 }
116 
117 static uint16_t PhysicsTYPEProxy = static_cast<uint16_t>(Physics::TYPE);
118 static uint16_t PositionTYPEProxy = static_cast<uint16_t>(Position::TYPE);
119 static uint16_t RenderNodeTYPEProxy = static_cast<uint16_t>(RenderNode::TYPE);
120 static uint16_t SendableTYPEProxy = static_cast<uint16_t>(Sendable::TYPE);
121 static uint16_t ReceivedTYPEProxy = static_cast<uint16_t>(Received::TYPE);
122 static uint16_t ModelTYPEProxy = static_cast<uint16_t>(Model::TYPE);
123 static uint16_t BoxGeometryTYPEProxy = static_cast<uint16_t>(BoxGeometry::TYPE);
124 static uint16_t CameraTYPEProxy = static_cast<uint16_t>(Camera::TYPE);
125 // static uint16_t ManualObjectTYPEProxy = static_cast<uint16_t>(ManualObject::TYPE);
126 // static uint16_t PlaneTYPEProxy = static_cast<uint16_t>(Plane::TYPE);
127 static uint16_t AnimatedTYPEProxy = static_cast<uint16_t>(Animated::TYPE);
128 
130 bool BindComponentTypeID(asIScriptEngine* engine, const char* name, uint16_t* value)
131 {
132  if(engine->SetDefaultNamespace(name) < 0) {
134  }
135 
136  if(engine->RegisterGlobalProperty("const uint16 TYPE", value) < 0) {
137 
139  }
140 
141  if(engine->SetDefaultNamespace("") < 0) {
143  }
144 
145  return true;
146 }
147 
148 bool BindComponentTypes(asIScriptEngine* engine)
149 {
150  // ------------------------------------ //
151  // Position
152  if(engine->RegisterObjectType("Position", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
154  }
155 
156  if(engine->RegisterObjectProperty("Position", "bool Marked", asOFFSET(Position, Marked)) <
157  0) {
159  }
160 
161  if(engine->RegisterObjectProperty(
162  "Position", "Float3 _Position", asOFFSET(Position, Members._Position)) < 0) {
164  }
165 
166  if(engine->RegisterObjectProperty("Position", "Quaternion _Orientation",
167  asOFFSET(Position, Members._Orientation)) < 0) {
169  }
170 
171  if(!BindComponentTypeID(engine, "Position", &PositionTYPEProxy))
172  return false;
173 
174  // ------------------------------------ //
175  // Physics
176  if(engine->RegisterObjectType("Physics", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
178  }
179 
180  // Currently does nothing
181  if(engine->RegisterObjectProperty("Physics", "bool Marked", asOFFSET(Physics, Marked)) <
182  0) {
184  }
185 
186  if(engine->RegisterObjectMethod("Physics", "PhysicsBody@ get_Body() const",
187  asMETHOD(Physics, GetBodyWrapper), asCALL_THISCALL) < 0) {
189  }
190 
191  if(engine->RegisterObjectMethod("Physics",
192  "PhysicsBody@ CreatePhysicsBody(PhysicalWorld@ world, PhysicsShape@ shape, "
193  "float mass, int physicsmaterialid = -1)",
194  asMETHOD(Physics, CreatePhysicsBodyWrapper), asCALL_THISCALL) < 0) {
196  }
197 
198  if(engine->RegisterObjectMethod("Physics",
199  "bool ChangeShape(PhysicalWorld@ world, PhysicsShape@ shape)",
200  asMETHOD(Physics, ChangeShapeWrapper), asCALL_THISCALL) < 0) {
202  }
203 
204  if(engine->RegisterObjectMethod("Physics", "void JumpTo(Position@ positiontosync)",
205  asMETHOD(Physics, JumpTo), asCALL_THISCALL) < 0) {
207  }
208 
209  if(engine->RegisterObjectMethod("Physics", "void Release(PhysicalWorld@ world)",
210  asMETHOD(Physics, Release), asCALL_THISCALL) < 0) {
212  }
213 
214  if(!BindComponentTypeID(engine, "Physics", &PhysicsTYPEProxy))
215  return false;
216 
217  // ------------------------------------ //
218  // RenderNode
219  if(engine->RegisterObjectType("RenderNode", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
221  }
222 
223  if(engine->RegisterObjectProperty(
224  "RenderNode", "bool Marked", asOFFSET(RenderNode, Marked)) < 0) {
226  }
227 
228  if(engine->RegisterObjectProperty(
229  "RenderNode", "Float3 Scale", asOFFSET(RenderNode, Scale)) < 0) {
231  }
232 
233  if(engine->RegisterObjectMethod("RenderNode", "SceneNode@ get_Node()",
234  asFUNCTION(RenderNodeGetNode), asCALL_CDECL_OBJFIRST) < 0) {
236  }
237 
238  if(engine->RegisterObjectProperty(
239  "RenderNode", "bool Hidden", asOFFSET(RenderNode, Hidden)) < 0) {
241  }
242 
243  if(!BindComponentTypeID(engine, "RenderNode", &RenderNodeTYPEProxy))
244  return false;
245 
246  // ------------------------------------ //
247  // Sendable
248  if(engine->RegisterObjectType("Sendable", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
250  }
251 
252  if(engine->RegisterObjectProperty("Sendable", "bool Marked", asOFFSET(Sendable, Marked)) <
253  0) {
255  }
256 
257  if(!BindComponentTypeID(engine, "Sendable", &SendableTYPEProxy))
258  return false;
259 
260  // ------------------------------------ //
261  // Received
262  if(engine->RegisterObjectType("Received", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
264  }
265 
266  if(engine->RegisterObjectProperty("Received", "bool Marked", asOFFSET(Received, Marked)) <
267  0) {
269  }
270 
271  if(!BindComponentTypeID(engine, "Received", &ReceivedTYPEProxy))
272  return false;
273 
274  // ------------------------------------ //
275  // Model
276  if(engine->RegisterObjectType("Model", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
278  }
279 
280  if(engine->RegisterObjectProperty("Model", "bool Marked", asOFFSET(Model, Marked)) < 0) {
282  }
283 
284  if(!BindComponentTypeID(engine, "Model", &ModelTYPEProxy))
285  return false;
286 
287  if(engine->RegisterObjectMethod("Model", "Renderable@ get_GraphicalObject()",
288  asFUNCTION(ModelGetGraphicalObject), asCALL_CDECL_OBJFIRST) < 0) {
290  }
291 
292  if(engine->RegisterObjectMethod("Model", "Material@ get_ObjectMaterial()",
293  asFUNCTION(ModelGetObjectMaterial), asCALL_CDECL_OBJFIRST) < 0) {
295  }
296 
297  if(engine->RegisterObjectMethod("Model", "void set_ObjectMaterial(Material@ material)",
298  asFUNCTION(ModelSetObjectMaterial), asCALL_CDECL_OBJFIRST) < 0) {
300  }
301 
302  if(engine->RegisterObjectProperty("Model", "string MeshName", asOFFSET(Model, MeshName)) <
303  0) {
305  }
306 
307  // ------------------------------------ //
308  // BoxGeometry
309  if(engine->RegisterObjectType("BoxGeometry", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
311  }
312 
313  if(engine->RegisterObjectProperty(
314  "BoxGeometry", "bool Marked", asOFFSET(BoxGeometry, Marked)) < 0) {
316  }
317 
318  if(!BindComponentTypeID(engine, "BoxGeometry", &BoxGeometryTYPEProxy))
319  return false;
320 
321  // // ------------------------------------ //
322  // // ManualObject
323  // if(engine->RegisterObjectType("ManualObject", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
324  // ANGELSCRIPT_REGISTERFAIL;
325  // }
326 
327  // if(engine->RegisterObjectProperty(
328  // "ManualObject", "bool Marked", asOFFSET(ManualObject, Marked)) < 0) {
329  // ANGELSCRIPT_REGISTERFAIL;
330  // }
331 
332  // if(!BindComponentTypeID(engine, "ManualObject", &ManualObjectTYPEProxy))
333  // return false;
334 
335  // ------------------------------------ //
336  // Camera
337  if(engine->RegisterObjectType("Camera", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
339  }
340 
341  if(engine->RegisterObjectProperty("Camera", "bool Marked", asOFFSET(Camera, Marked)) < 0) {
343  }
344 
345  if(engine->RegisterObjectProperty("Camera", "uint8 FOV", asOFFSET(Camera, FOV)) < 0) {
347  }
348 
349  if(engine->RegisterObjectProperty(
350  "Camera", "bool SoundPerceiver", asOFFSET(Camera, SoundPerceiver)) < 0) {
352  }
353 
354  if(!BindComponentTypeID(engine, "Camera", &CameraTYPEProxy))
355  return false;
356 
357 
358  // // ------------------------------------ //
359  // // Plane
360  // if(engine->RegisterObjectType("Plane", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
361  // ANGELSCRIPT_REGISTERFAIL;
362  // }
363 
364  // if(engine->RegisterObjectProperty("Plane", "bool Marked", asOFFSET(Plane, Marked)) < 0)
365  // {
366  // ANGELSCRIPT_REGISTERFAIL;
367  // }
368 
369  // if(!BindComponentTypeID(engine, "Plane", &PlaneTYPEProxy))
370  // return false;
371 
372  // if(engine->RegisterObjectProperty(
373  // "Plane", "Ogre::Item@ GraphicalObject", asOFFSET(Plane, GraphicalObject)) < 0) {
374  // ANGELSCRIPT_REGISTERFAIL;
375  // }
376 
377  // ------------------------------------ //
378  // Animated
379  if(engine->RegisterObjectType("Animated", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
381  }
382 
383  if(engine->RegisterObjectProperty("Animated", "bool Marked", asOFFSET(Animated, Marked)) <
384  0) {
386  }
387 
388  if(!BindComponentTypeID(engine, "Animated", &AnimatedTYPEProxy))
389  return false;
390 
391  // if(engine->RegisterObjectProperty("Animated", "Ogre::Item@ GraphicalObject",
392  // asOFFSET(Animated, GraphicalObject)) < 0) {
393  // ANGELSCRIPT_REGISTERFAIL;
394  // }
395 
396  // ------------------------------------ //
397  // SimpleAnimation
398  if(engine->RegisterObjectType("SimpleAnimation", sizeof(SimpleAnimation),
399  asOBJ_VALUE | asGetTypeTraits<SimpleAnimation>()) < 0) {
401  }
402  if(engine->RegisterObjectBehaviour("SimpleAnimation", asBEHAVE_CONSTRUCT,
403  "void f(const string &in name)", asFUNCTION(SimpleAnimationConstructorProxy),
404  asCALL_CDECL_OBJFIRST) < 0) {
406  }
407  if(engine->RegisterObjectBehaviour("SimpleAnimation", asBEHAVE_DESTRUCT, "void f()",
408  asFUNCTION(SimpleAnimationDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
410  }
411 
412  if(engine->RegisterObjectProperty(
413  "SimpleAnimation", "bool Loop", asOFFSET(SimpleAnimation, Loop)) < 0) {
415  }
416 
417  if(engine->RegisterObjectProperty("SimpleAnimation", "float SpeedFactor",
418  asOFFSET(SimpleAnimation, SpeedFactor)) < 0) {
420  }
421 
422  if(engine->RegisterObjectProperty(
423  "SimpleAnimation", "bool Paused", asOFFSET(SimpleAnimation, Paused)) < 0) {
425  }
426 
427  // Animation helpers
428  if(engine->RegisterObjectMethod("Animated",
429  "void AddAnimation(const SimpleAnimation &in animation)",
430  asFUNCTION(AnimatedAddHelper), asCALL_CDECL_OBJFIRST) < 0) {
432  }
433 
434  if(engine->RegisterObjectMethod("Animated", "SimpleAnimation& GetAnimation(uint64 index)",
435  asFUNCTION(AnimatedGetHelper), asCALL_CDECL_OBJFIRST) < 0) {
437  }
438 
439  return true;
440 }
441 
442 bool BindScriptComponentTypeSupport(asIScriptEngine* engine)
443 {
444  // ------------------------------------ //
445  // ScriptSystemUses
446  if(engine->RegisterObjectType("ScriptSystemUses", sizeof(ScriptSystemUses),
447  asOBJ_VALUE | asGetTypeTraits<ScriptSystemUses>()) < 0) {
449  }
450  if(engine->RegisterObjectBehaviour("ScriptSystemUses", asBEHAVE_CONSTRUCT,
451  "void f(const string &in name)", asFUNCTION(ScriptSystemUsesProxyName),
452  asCALL_CDECL_OBJFIRST) < 0) {
454  }
455  if(engine->RegisterObjectBehaviour("ScriptSystemUses", asBEHAVE_CONSTRUCT,
456  "void f(uint16 type)", asFUNCTION(ScriptSystemUsesProxyType),
457  asCALL_CDECL_OBJFIRST) < 0) {
459  }
460  if(engine->RegisterObjectBehaviour("ScriptSystemUses", asBEHAVE_CONSTRUCT, "void f()",
461  asFUNCTION(ScriptSystemUsesProxyInvalid), asCALL_CDECL_OBJFIRST) < 0) {
463  }
464  if(engine->RegisterObjectBehaviour("ScriptSystemUses", asBEHAVE_DESTRUCT, "void f()",
465  asFUNCTION(ScriptSystemUsesDestructorProxy), asCALL_CDECL_OBJFIRST) < 0) {
467  }
468 
469  if(engine->RegisterObjectMethod("ScriptSystemUses",
470  "ScriptSystemUses& opAssign(const ScriptSystemUses &in other)",
471  asMETHOD(ScriptSystemUses, operator=), asCALL_THISCALL) < 0) {
473  }
474 
475  // ------------------------------------ //
476  // ScriptComponent
477  if(engine->RegisterInterface("ScriptComponent") < 0) {
479  }
480 
481  // Factory definition
482  if(engine->RegisterFuncdef("ScriptComponent@ ComponentFactoryFunc(GameWorld@ world)") <
483  0) {
485  }
486 
487  if(engine->RegisterInterface("ScriptSystem") < 0) {
489  }
490 
491  // ------------------------------------ //
492  // Required operations
493  if(engine->RegisterInterfaceMethod("ScriptSystem", "void Init(GameWorld@ world)") < 0) {
495  }
496 
497  if(engine->RegisterInterfaceMethod("ScriptSystem", "void Release()") < 0) {
499  }
500 
501  if(engine->RegisterInterfaceMethod("ScriptSystem", "void Run(float elapsed)") < 0) {
503  }
504 
505  if(engine->RegisterInterfaceMethod("ScriptSystem", "void CreateAndDestroyNodes()") < 0) {
507  }
508 
509  if(engine->RegisterInterfaceMethod("ScriptSystem", "void Clear()") < 0) {
511  }
512 
513  // ------------------------------------ //
514  // Component holder type
515  ANGELSCRIPT_REGISTER_REF_TYPE("ScriptComponentHolder", ScriptComponentHolder);
516 
517  if(engine->RegisterObjectMethod("ScriptComponentHolder",
518  "bool ReleaseComponent(ObjectID entity)",
519  asMETHOD(ScriptComponentHolder, ReleaseComponent), asCALL_THISCALL) < 0) {
521  }
522  // This is just a wrapper for the above function
523  if(engine->RegisterObjectMethod("ScriptComponentHolder", "bool Destroy(ObjectID entity)",
524  asMETHOD(ScriptComponentHolder, Destroy), asCALL_THISCALL) < 0) {
526  }
527 
528  // Not sure if scripts should be allowed to call this
529  if(engine->RegisterObjectMethod("ScriptComponentHolder", "void ReleaseAllComponents()",
530  asMETHOD(ScriptComponentHolder, ReleaseAllComponents), asCALL_THISCALL) < 0) {
532  }
533 
534  if(engine->RegisterObjectMethod("ScriptComponentHolder",
535  "ScriptComponent@ Create(ObjectID entity)", asMETHOD(ScriptComponentHolder, Create),
536  asCALL_THISCALL) < 0) {
538  }
539 
540  if(engine->RegisterObjectMethod("ScriptComponentHolder",
541  "ScriptComponent@ Find(ObjectID entity)", asMETHOD(ScriptComponentHolder, Find),
542  asCALL_THISCALL) < 0) {
544  }
545 
546  if(engine->RegisterObjectMethod("ScriptComponentHolder", "array<ObjectID>@ GetIndex()",
547  asMETHOD(ScriptComponentHolder, GetIndex), asCALL_THISCALL) < 0) {
549  }
550 
551  // ------------------------------------ //
552  // Helpers for creating and destroying nodes
553  // The second argument should be of type array<ThisSystemsCachedType>
554  if(engine->RegisterGlobalFunction(
555  "void ScriptSystemNodeHelper(GameWorld@ world, ?&in "
556  "cachedcomponents, array<ScriptSystemUses> &in systemcomponents)",
557  asFUNCTION(ScriptSystemNodeHelper), asCALL_CDECL) < 0) {
559  }
560 
561  return true;
562 }
563 } // namespace Leviathan
564 
565 bool Leviathan::BindEntity(asIScriptEngine* engine)
566 {
567 
568  // TODO: add reference counting for GameWorld
569  if(engine->RegisterObjectType("GameWorld", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
571  }
572 
573  if(!BindScriptComponentTypeSupport(engine))
574  return false;
575 
576  if(!BindRayCast(engine))
577  return false;
578 
579  if(!BindComponentTypes(engine))
580  return false;
581 
582  if(!BindGameWorldBaseMethods<GameWorld>(engine, "GameWorld"))
583  return false;
584 
585  // Component get functions //
586  // GameWorld
587 
588  // ------------------------------------ //
589  if(engine->RegisterObjectType("StandardWorld", 0, asOBJ_REF | asOBJ_NOCOUNT) < 0) {
591  }
592 
593  if(!BindStandardWorldMethods<StandardWorld>(engine, "StandardWorld"))
594  return false;
595 
596  // ------------------------------------ //
597 
598  return true;
599 }
Entity is received from a server.
Definition: Components.h:170
static uint16_t SendableTYPEProxy
Definition: EntityBind.cpp:120
Implements a basic renderable rendering a Mesh with a Material.
Definition: Renderable.h:13
SceneNode * RenderNodeGetNode(RenderNode &self)
Definition: EntityBind.cpp:63
static constexpr auto TYPE
Definition: Components.h:229
static uint16_t PhysicsTYPEProxy
Definition: EntityBind.cpp:117
#define ANGELSCRIPT_REGISTER_REF_TYPE(RegisterName, ClassName)
Definition: BindHelpers.h:92
static uint16_t ReceivedTYPEProxy
Definition: EntityBind.cpp:121
void ScriptSystemUsesProxyType(void *memory, uint16_t componenttype)
Definition: EntityBind.cpp:23
bool BindScriptComponentTypeSupport(asIScriptEngine *engine)
Definition: EntityBind.cpp:442
void SimpleAnimationDestructorProxy(void *memory)
Definition: EntityBind.cpp:43
Contains an animation for Animated component.
Definition: Components.h:257
A node in the Scene used to position renderables and other SceneNodes.
Definition: SceneNode.h:70
bool BindRayCast(asIScriptEngine *engine)
Definition: EntityBind.cpp:96
static uint16_t BoxGeometryTYPEProxy
Definition: EntityBind.cpp:123
Material * ModelGetObjectMaterial(Model &self)
Definition: EntityBind.cpp:79
static constexpr auto TYPE
Definition: Components.h:75
static constexpr auto TYPE
Definition: Components.h:497
void SimpleAnimationConstructorProxy(void *memory, const std::string &name)
Definition: EntityBind.cpp:38
void ScriptSystemUsesProxyName(void *memory, const std::string &name)
Definition: EntityBind.cpp:18
DLLEXPORT void ScriptSystemNodeHelper(GameWorld *world, void *cachedcomponents, int cachedtypeid, CScriptArray &systemcomponents)
Helper for script systems to call to properly handle added and removed nodes.
Entity has a box for geometry/model, possibly also physics.
Definition: Components.h:212
Entity has position and direction it is looking at.
Definition: Components.h:36
Entity has a scene node.
Definition: Components.h:82
void AnimatedAddHelper(Animated *self, const SimpleAnimation &animation)
Definition: EntityBind.cpp:48
void ScriptSystemUsesDestructorProxy(void *memory)
Definition: EntityBind.cpp:33
static constexpr auto TYPE
Definition: Components.h:312
void ScriptSystemUsesProxyInvalid(void *memory)
Definition: EntityBind.cpp:28
FORCE_INLINE void AddRef() const
unsigned short uint16_t
Definition: core.h:39
static constexpr auto TYPE
Definition: Components.h:164
bool BindComponentTypes(asIScriptEngine *engine)
Definition: EntityBind.cpp:148
Entity has a physical component.
Definition: Components.h:347
SimpleAnimation * AnimatedGetHelper(Animated *self, uint64_t index)
Definition: EntityBind.cpp:54
Entity has a model.
Definition: Components.h:233
static constexpr auto TYPE
Attaches this node to this parent (if null entity then attached to the scene root)
Definition: Components.h:106
static uint16_t AnimatedTYPEProxy
Definition: EntityBind.cpp:127
static constexpr auto TYPE
Definition: Components.h:731
Properties that a camera entity has (will also need a Position component)
Definition: Components.h:714
static uint16_t ModelTYPEProxy
Definition: EntityBind.cpp:122
#define ANGELSCRIPT_REGISTERFAIL
Definition: BindHelpers.h:12
static constexpr auto TYPE
Definition: Components.h:253
bool BindComponentTypeID(asIScriptEngine *engine, const char *name, uint16_t *value)
Helper for BindComponentTypes.
Definition: EntityBind.cpp:130
static constexpr auto TYPE
Definition: Components.h:206
Entity plays animations on an Ogre::Item.
Definition: Components.h:296
void ModelSetObjectMaterial(Model &self, Material *newmaterial)
Definition: EntityBind.cpp:87
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12
Entity is sendable to clients.
Definition: Components.h:115
bool BindEntity(asIScriptEngine *engine)
Definition: EntityBind.cpp:565
Renderable * ModelGetGraphicalObject(Model &self)
Definition: EntityBind.cpp:71
Holds a single component type from c++ or from script, which a ScriptSystem uses.
static boost::intrusive_ptr< ActualType > WrapPtr(ActualType *ptr)
Creates an intrusive_ptr from raw pointer.
static uint16_t PositionTYPEProxy
Definition: EntityBind.cpp:118
static uint16_t RenderNodeTYPEProxy
Definition: EntityBind.cpp:119
static uint16_t CameraTYPEProxy
Definition: EntityBind.cpp:124