| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #include "Wrappers/Physics/BsScriptJointCommon.h"
- #include "BsMonoClass.h"
- #include "BsMonoMethod.h"
- #include "BsMonoUtil.h"
- // DEBUG ONLY
- #include "BsMonoProperty.h"
- namespace bs
- {
- ScriptD6JointDrive::GetNativeDataThunkDef ScriptD6JointDrive::getNativeDataThunk = nullptr;
- ScriptD6JointDrive::ScriptD6JointDrive(MonoObject* instance)
- :ScriptObject(instance)
- { }
- void ScriptD6JointDrive::initRuntimeData()
- {
- getNativeDataThunk = (GetNativeDataThunkDef)metaData.scriptClass->getMethod("Internal_GetNative")->getThunk();
- }
- D6Joint::Drive ScriptD6JointDrive::convert(MonoObject* instance)
- {
- MonoException* exception = nullptr;
- MonoObject* boxedOutput = getNativeDataThunk(instance, &exception);
- MonoUtil::throwIfException(exception);
- return *(D6Joint::Drive*)MonoUtil::unbox(boxedOutput);
- }
- ScriptHingeJointDrive::GetNativeDataThunkDef ScriptHingeJointDrive::getNativeDataThunk = nullptr;
- ScriptHingeJointDrive::ScriptHingeJointDrive(MonoObject* instance)
- :ScriptObject(instance)
- { }
- void ScriptHingeJointDrive::initRuntimeData()
- {
- getNativeDataThunk = (GetNativeDataThunkDef)metaData.scriptClass->getMethod("Internal_GetNative")->getThunk();
- }
- HingeJoint::Drive ScriptHingeJointDrive::convert(MonoObject* instance)
- {
- MonoException* exception = nullptr;
- MonoObject* boxedOutput = getNativeDataThunk(instance, &exception);
- MonoUtil::throwIfException(exception);
- return *(HingeJoint::Drive*)MonoUtil::unbox(boxedOutput);
- }
- ScriptLimitLinearRange::GetNativeDataThunkDef ScriptLimitLinearRange::getNativeDataThunk = nullptr;
- ScriptLimitLinearRange::ScriptLimitLinearRange(MonoObject* instance)
- :ScriptObject(instance)
- { }
- void ScriptLimitLinearRange::initRuntimeData()
- {
- getNativeDataThunk = (GetNativeDataThunkDef)metaData.scriptClass->getMethod("Internal_GetNative")->getThunk();
- }
- LimitLinearRange ScriptLimitLinearRange::convert(MonoObject* instance)
- {
- MonoException* exception = nullptr;
- MonoObject* boxedOutput = getNativeDataThunk(instance, &exception);
- MonoUtil::throwIfException(exception);
- return *(LimitLinearRange*)MonoUtil::unbox(boxedOutput);
- }
- ScriptLimitLinear::GetNativeDataThunkDef ScriptLimitLinear::getNativeDataThunk = nullptr;
- ScriptLimitLinear::ScriptLimitLinear(MonoObject* instance)
- :ScriptObject(instance)
- { }
- void ScriptLimitLinear::initRuntimeData()
- {
- getNativeDataThunk = (GetNativeDataThunkDef)metaData.scriptClass->getMethod("Internal_GetNative")->getThunk();
- }
- LimitLinear ScriptLimitLinear::convert(MonoObject* instance)
- {
- MonoException* exception = nullptr;
- MonoObject* boxedOutput = getNativeDataThunk(instance, &exception);
- MonoUtil::throwIfException(exception);
- return *(LimitLinear*)MonoUtil::unbox(boxedOutput);
- }
- ScriptLimitAngularRange::GetNativeDataThunkDef ScriptLimitAngularRange::getNativeDataThunk = nullptr;
- ScriptLimitAngularRange::ScriptLimitAngularRange(MonoObject* instance)
- :ScriptObject(instance)
- { }
- void ScriptLimitAngularRange::initRuntimeData()
- {
- getNativeDataThunk = (GetNativeDataThunkDef)metaData.scriptClass->getMethod("Internal_GetNative")->getThunk();
- }
- LimitAngularRange ScriptLimitAngularRange::convert(MonoObject* instance)
- {
- MonoException* exception = nullptr;
- MonoObject* boxedOutput = getNativeDataThunk(instance, &exception);
- MonoUtil::throwIfException(exception);
- return *(LimitAngularRange*)MonoUtil::unbox(boxedOutput);
- }
- ScriptLimitConeRange::GetNativeDataThunkDef ScriptLimitConeRange::getNativeDataThunk = nullptr;
- ScriptLimitConeRange::ScriptLimitConeRange(MonoObject* instance)
- :ScriptObject(instance)
- { }
- void ScriptLimitConeRange::initRuntimeData()
- {
- getNativeDataThunk = (GetNativeDataThunkDef)metaData.scriptClass->getMethod("Internal_GetNative")->getThunk();
- }
- LimitConeRange ScriptLimitConeRange::convert(MonoObject* instance)
- {
- MonoException* exception = nullptr;
- MonoObject* boxedOutput = getNativeDataThunk(instance, &exception);
- MonoUtil::throwIfException(exception);
- return *(LimitConeRange*)MonoUtil::unbox(boxedOutput);
- }
- }
|