BsScriptPARTICLE_VELOCITY_DESC.generated.cpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #include "BsScriptPARTICLE_VELOCITY_DESC.generated.h"
  2. #include "BsMonoMethod.h"
  3. #include "BsMonoClass.h"
  4. #include "BsMonoUtil.h"
  5. #include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleDistribution.h"
  6. #include "BsScriptTDistribution.generated.h"
  7. namespace bs
  8. {
  9. ScriptPARTICLE_VELOCITY_DESC::ScriptPARTICLE_VELOCITY_DESC(MonoObject* managedInstance)
  10. :ScriptObject(managedInstance)
  11. { }
  12. void ScriptPARTICLE_VELOCITY_DESC::initRuntimeData()
  13. { }
  14. MonoObject*ScriptPARTICLE_VELOCITY_DESC::box(const __PARTICLE_VELOCITY_DESCInterop& value)
  15. {
  16. return MonoUtil::box(metaData.scriptClass->_getInternalClass(), (void*)&value);
  17. }
  18. __PARTICLE_VELOCITY_DESCInterop ScriptPARTICLE_VELOCITY_DESC::unbox(MonoObject* value)
  19. {
  20. return *(__PARTICLE_VELOCITY_DESCInterop*)MonoUtil::unbox(value);
  21. }
  22. PARTICLE_VELOCITY_DESC ScriptPARTICLE_VELOCITY_DESC::fromInterop(const __PARTICLE_VELOCITY_DESCInterop& value)
  23. {
  24. PARTICLE_VELOCITY_DESC output;
  25. SPtr<TDistribution<Vector3>> tmpvelocity;
  26. ScriptTDistributionVector3* scriptvelocity;
  27. scriptvelocity = ScriptTDistributionVector3::toNative(value.velocity);
  28. if(scriptvelocity != nullptr)
  29. tmpvelocity = scriptvelocity->getInternal();
  30. if(tmpvelocity != nullptr)
  31. output.velocity = *tmpvelocity;
  32. output.worldSpace = value.worldSpace;
  33. return output;
  34. }
  35. __PARTICLE_VELOCITY_DESCInterop ScriptPARTICLE_VELOCITY_DESC::toInterop(const PARTICLE_VELOCITY_DESC& value)
  36. {
  37. __PARTICLE_VELOCITY_DESCInterop output;
  38. MonoObject* tmpvelocity;
  39. SPtr<TDistribution<Vector3>> tmpvelocitycopy;
  40. tmpvelocitycopy = bs_shared_ptr_new<TDistribution<Vector3>>(value.velocity);
  41. tmpvelocity = ScriptTDistributionVector3::create(tmpvelocitycopy);
  42. output.velocity = tmpvelocity;
  43. output.worldSpace = value.worldSpace;
  44. return output;
  45. }
  46. }