Logo
Particle.h
1#pragma once
2
3#include "gfx/Particle.h"
4#include "io/FS.h"
5#include "plugin/Plugin.h"
6
7#include "gfx/Particle/LegacyParticle.h"
8
9namespace XXSharpKmyGfx
10{
11 private ref class LegacyParticleDef
12 {
13 public:
14 kmyGfx::LegacyParticleDef* _def = nullptr;
15 LegacyParticleDef(kmyGfx::LegacyParticleDef* ptr);
16 Material^ getMaterial();
17
18 LegacyParticleDef^ getFirstChild();
19 LegacyParticleDef^ getNextSibling();
20 };
21
22 private ref class LegacyParticleRoot
23 {
24 public:
25 kmyGfx::LegacyParticleRoot* _root = nullptr;
26 LegacyParticleRoot(kmyGfx::LegacyParticleRoot* ptr);
27 void save();
28 LegacyParticleDef^ getFirstDef();
29 };
30
31 private ref class ParticleInstance
32 {
33 void ctorCore(System::String^ path, unsigned int displayID, bool useEfkTransformSetting);
34 public:
35 kmyGfx::ParticleInstance *obj;
36 bool useEfkTransform;
37
38 ParticleInstance(System::String^ path, unsigned int displayID);
39 ParticleInstance(System::String^ path, unsigned int displayID, bool useEfkTransformSetting);
40 ~ParticleInstance(){ SAFE_REMOVE_REF(obj); }
41 void start(XXSharpKmyMath::Matrix4 mtx, f32 prewarm);
42 void stopEmission();
43 void stopEmission(bool immediate);
44 //[[deplicated("use setTranslate/setRotate")]]
45 void setPosture(XXSharpKmyMath::Matrix4 mtx);
46 void draw(XXSharpKmyGfx::Render^ tgt);
47 void Release();
48 void setPickupID(u16 id);
49 void stopPickup(bool flg);
50 void pause(bool flg);
51 void setVisibility(bool flg);
52 void setDisplayID(unsigned int id);
53 void getBound(XXSharpKmyMath::Vector3 %min, XXSharpKmyMath::Vector3 %max);
54 void getBoundOne(XXSharpKmyMath::Vector3 %min, XXSharpKmyMath::Vector3 %max);
55 f32 getMaxLifeTime();
56 bool getUseDirection();
57 bool isEndPlaying();
58 void saveWithThumbnail(array<byte> ^img, int sz, int width, int height);
59 XXSharpKmyPhysics::PhysicsObject^ getPhysicsObject();
60 void setTarget(XXSharpKmyMath::Vector3 tgt);
61 void setColor(XXSharpKmyGfx::Color color);
62 void setScale(f32 s) { mScale = s; }
63
64 LegacyParticleRoot^ getLegacyRoot();
65
66 static void ParticleInitialize(int maxInstanceCount, int maxSquareCount);
67 static void ParticleFinalize();
68
69 private:
70 f32 mScale = 1.0f;
71 };
72
73 private ref class ParticleRoot
74 {
75 public:
76 static void preReimport(System::String^ path);
77 static void postReimport(System::String^ path);
78 };
79
80
81}