Leviathan  0.8.0.0
Leviathan game engine
EntityBind.cpp File Reference
#include "BindDefinitions.h"
#include "Generated/StandardWorld.h"
#include "Entities/GameWorld.h"
#include "Entities/ScriptComponentHolder.h"
#include "Entities/ScriptSystemWrapper.h"
#include "StandardWorldBindHelper.h"

Go to the source code of this file.

Namespaces

 Leviathan
 The access mask controls which registered functions and classes a script sees.
 

Functions

void ScriptSystemUsesProxyName (void *memory, const std::string &name)
 
void ScriptSystemUsesProxyType (void *memory, uint16_t componenttype)
 
void ScriptSystemUsesProxyInvalid (void *memory)
 
void ScriptSystemUsesDestructorProxy (void *memory)
 
void SimpleAnimationConstructorProxy (void *memory, const std::string &name)
 
void SimpleAnimationDestructorProxy (void *memory)
 
void AnimatedAddHelper (Animated *self, const SimpleAnimation &animation)
 
SimpleAnimationAnimatedGetHelper (Animated *self, uint64_t index)
 
SceneNodeRenderNodeGetNode (RenderNode &self)
 
RenderableModelGetGraphicalObject (Model &self)
 
MaterialModelGetObjectMaterial (Model &self)
 
void ModelSetObjectMaterial (Model &self, Material *newmaterial)
 
bool Leviathan::BindRayCast (asIScriptEngine *engine)
 
bool Leviathan::BindComponentTypeID (asIScriptEngine *engine, const char *name, uint16_t *value)
 Helper for BindComponentTypes. More...
 
bool Leviathan::BindComponentTypes (asIScriptEngine *engine)
 
bool Leviathan::BindScriptComponentTypeSupport (asIScriptEngine *engine)
 

Variables

static uint16_t Leviathan::PhysicsTYPEProxy = static_cast<uint16_t>(Physics::TYPE)
 
static uint16_t Leviathan::PositionTYPEProxy = static_cast<uint16_t>(Position::TYPE)
 
static uint16_t Leviathan::RenderNodeTYPEProxy = static_cast<uint16_t>(RenderNode::TYPE)
 
static uint16_t Leviathan::SendableTYPEProxy = static_cast<uint16_t>(Sendable::TYPE)
 
static uint16_t Leviathan::ReceivedTYPEProxy = static_cast<uint16_t>(Received::TYPE)
 
static uint16_t Leviathan::ModelTYPEProxy = static_cast<uint16_t>(Model::TYPE)
 
static uint16_t Leviathan::BoxGeometryTYPEProxy = static_cast<uint16_t>(BoxGeometry::TYPE)
 
static uint16_t Leviathan::CameraTYPEProxy = static_cast<uint16_t>(Camera::TYPE)
 
static uint16_t Leviathan::AnimatedTYPEProxy = static_cast<uint16_t>(Animated::TYPE)
 

Function Documentation

◆ AnimatedAddHelper()

void AnimatedAddHelper ( Animated self,
const SimpleAnimation animation 
)

Definition at line 48 of file EntityBind.cpp.

49 {
50 
51  self->Animations.push_back(animation);
52 }

◆ AnimatedGetHelper()

SimpleAnimation* AnimatedGetHelper ( Animated self,
uint64_t  index 
)

Definition at line 54 of file EntityBind.cpp.

55 {
56 
57  if(index >= self->Animations.size())
58  return nullptr;
59 
60  return &self->Animations[index];
61 }
std::vector< SimpleAnimation > Animations
Definition: Components.h:310

◆ ModelGetGraphicalObject()

Renderable* ModelGetGraphicalObject ( Model self)

Definition at line 71 of file EntityBind.cpp.

72 {
73  auto obj = self.GraphicalObject;
74  if(obj)
75  obj->AddRef();
76  return obj.get();
77 }

◆ ModelGetObjectMaterial()

Material* ModelGetObjectMaterial ( Model self)

Definition at line 79 of file EntityBind.cpp.

80 {
81  auto obj = self.ObjectMaterial;
82  if(obj)
83  obj->AddRef();
84  return obj.get();
85 }

◆ ModelSetObjectMaterial()

void ModelSetObjectMaterial ( Model self,
Material newmaterial 
)

Definition at line 87 of file EntityBind.cpp.

88 {
89  self.ObjectMaterial = Material::WrapPtr(newmaterial);
90 }

◆ RenderNodeGetNode()

SceneNode* RenderNodeGetNode ( RenderNode self)

Definition at line 63 of file EntityBind.cpp.

64 {
65  auto node = self.Node;
66  if(node)
67  node->AddRef();
68  return node.get();
69 }

◆ ScriptSystemUsesDestructorProxy()

void ScriptSystemUsesDestructorProxy ( void *  memory)

Definition at line 33 of file EntityBind.cpp.

34 {
35  static_cast<ScriptSystemUses*>(memory)->~ScriptSystemUses();
36 }

◆ ScriptSystemUsesProxyInvalid()

void ScriptSystemUsesProxyInvalid ( void *  memory)

Definition at line 28 of file EntityBind.cpp.

29 {
30  new(memory) ScriptSystemUses();
31 }
Holds a single component type from c++ or from script, which a ScriptSystem uses.

◆ ScriptSystemUsesProxyName()

void ScriptSystemUsesProxyName ( void *  memory,
const std::string &  name 
)

Definition at line 18 of file EntityBind.cpp.

19 {
20  new(memory) ScriptSystemUses(name);
21 }
Holds a single component type from c++ or from script, which a ScriptSystem uses.

◆ ScriptSystemUsesProxyType()

void ScriptSystemUsesProxyType ( void *  memory,
uint16_t  componenttype 
)

Definition at line 23 of file EntityBind.cpp.

24 {
25  new(memory) ScriptSystemUses(componenttype);
26 }
Holds a single component type from c++ or from script, which a ScriptSystem uses.

◆ SimpleAnimationConstructorProxy()

void SimpleAnimationConstructorProxy ( void *  memory,
const std::string &  name 
)

Definition at line 38 of file EntityBind.cpp.

39 {
40  new(memory) SimpleAnimation(name);
41 }
Contains an animation for Animated component.
Definition: Components.h:257

◆ SimpleAnimationDestructorProxy()

void SimpleAnimationDestructorProxy ( void *  memory)

Definition at line 43 of file EntityBind.cpp.

44 {
45  reinterpret_cast<SimpleAnimation*>(memory)->~SimpleAnimation();
46 }