Effekseer
Effekseer.h
1 
2 #ifndef __EFFEKSEER_BASE_PRE_H__
3 #define __EFFEKSEER_BASE_PRE_H__
4 
5 //----------------------------------------------------------------------------------
6 // Include
7 //----------------------------------------------------------------------------------
8 #include <stdio.h>
9 #include <string.h>
10 #include <atomic>
11 #include <stdint.h>
12 
13 //----------------------------------------------------------------------------------
14 //
15 //----------------------------------------------------------------------------------
16 #ifdef _WIN32
17 #define EFK_STDCALL __stdcall
18 #else
19 #define EFK_STDCALL
20 #endif
21 
22 //----------------------------------------------------------------------------------
23 //
24 //----------------------------------------------------------------------------------
25 
26 #ifdef _WIN32
27 #include <windows.h>
28 #elif defined(_PSVITA)
29 #include "Effekseer.PSVita.h"
30 #elif defined(_PS4)
31 #include "Effekseer.PS4.h"
32 #elif defined(_SWITCH)
33 #include "Effekseer.Switch.h"
34 #elif defined(_XBOXONE)
35 #include "Effekseer.XBoxOne.h"
36 #else
37 #include <unistd.h>
38 #include <pthread.h>
39 #include <sys/time.h>
40 #endif
41 
42 //----------------------------------------------------------------------------------
43 //
44 //----------------------------------------------------------------------------------
45 typedef uint16_t EFK_CHAR;
46 
47 //----------------------------------------------------------------------------------
48 //
49 //----------------------------------------------------------------------------------
50 namespace Effekseer
51 {
52 //----------------------------------------------------------------------------------
53 //
54 //----------------------------------------------------------------------------------
55 struct Vector2D;
56 struct Vector3D;
57 struct Matrix43;
58 struct Matrix44;
59 struct RectF;
60 
61 class Manager;
62 class Effect;
63 class EffectNode;
64 
65 class ParticleRenderer;
66 class SpriteRenderer;
67 class RibbonRenderer;
68 class RingRenderer;
69 class ModelRenderer;
70 class TrackRenderer;
71 
72 class Setting;
73 class EffectLoader;
74 class TextureLoader;
75 
76 class SoundPlayer;
77 class SoundLoader;
78 
79 class ModelLoader;
80 
81 class Model;
82 
83 typedef int Handle;
84 
88 typedef void* ( EFK_STDCALL *MallocFunc ) ( unsigned int size );
89 
93 typedef void ( EFK_STDCALL *FreeFunc ) ( void* p, unsigned int size );
94 
98 typedef int ( EFK_STDCALL *RandFunc ) (void);
99 
106 typedef void ( EFK_STDCALL *EffectInstanceRemovingCallback ) ( Manager* manager, Handle handle, bool isRemovingManager );
107 
108 #define ES_SAFE_ADDREF(val) if ( (val) != NULL ) { (val)->AddRef(); }
109 #define ES_SAFE_RELEASE(val) if ( (val) != NULL ) { (val)->Release(); (val) = NULL; }
110 #define ES_SAFE_DELETE(val) if ( (val) != NULL ) { delete (val); (val) = NULL; }
111 #define ES_SAFE_DELETE_ARRAY(val) if ( (val) != NULL ) { delete [] (val); (val) = NULL; }
112 
113 //----------------------------------------------------------------------------------
114 //
115 //----------------------------------------------------------------------------------
119 enum class AlphaBlendType : int32_t
120 {
124  Opacity = 0,
128  Blend = 1,
132  Add = 2,
136  Sub = 3,
140  Mul = 4,
141 };
142 
143 enum class TextureFilterType : int32_t
144 {
145  Nearest = 0,
146  Linear = 1,
147 };
148 
149 enum class TextureWrapType : int32_t
150 {
151  Repeat = 0,
152  Clamp = 1,
153 };
154 
155 enum class CullingType : int32_t
156 {
157  Front = 0,
158  Back = 1,
159  Double = 2,
160 };
161 
162 //----------------------------------------------------------------------------------
163 //
164 //----------------------------------------------------------------------------------
165 enum class BillboardType : int32_t
166 {
167  Billboard = 0,
168  YAxisFixed = 1,
169  Fixed = 2,
170  RotatedBillboard = 3,
171 };
172 
173 enum class CoordinateSystem : int32_t
174 {
175  LH,
176  RH,
177 };
178 
179 enum class CullingShape : int32_t
180 {
181  NoneShape = 0,
182  Sphere = 1,
183 };
184 
185 enum class TextureType : int32_t
186 {
187  Color,
188  Normal,
189  Distortion,
190 };
191 
192 enum class TextureFormatType : int32_t
193 {
194  ABGR8,
195  BC1,
196  BC2,
197  BC3,
198 };
199 
200 //----------------------------------------------------------------------------------
201 //
202 //----------------------------------------------------------------------------------
206 template <typename T,typename U>
207 T Max( T t, U u )
208 {
209  if( t > (T)u )
210  {
211  return t;
212  }
213  return u;
214 }
215 
219 template <typename T,typename U>
220 T Min( T t, U u )
221 {
222  if( t < (T)u )
223  {
224  return t;
225  }
226  return u;
227 }
228 
232 template <typename T,typename U,typename V>
233 T Clamp( T t, U max_, V min_ )
234 {
235  if( t > (T)max_ )
236  {
237  t = (T)max_;
238  }
239 
240  if( t < (T)min_ )
241  {
242  t = (T)min_;
243  }
244 
245  return t;
246 }
247 
248 //----------------------------------------------------------------------------------
249 //
250 //----------------------------------------------------------------------------------
251 inline float NormalizeAngle(float angle)
252 {
253  int32_t ofs = (*(int32_t*)&angle & 0x80000000) | 0x3F000000;
254  return (angle - ((int)(angle * 0.159154943f + *(float*)&ofs) * 6.283185307f));
255 }
256 
257 //----------------------------------------------------------------------------------
258 //
259 //----------------------------------------------------------------------------------
260 inline void SinCos(float x, float& s, float& c)
261 {
262  x = NormalizeAngle(x);
263  float x2 = x * x;
264  float x4 = x * x * x * x;
265  float x6 = x * x * x * x * x * x;
266  float x8 = x * x * x * x * x * x * x * x;
267  float x10 = x * x * x * x * x * x * x * x * x * x;
268  s = x * (1.0f - x2 / 6.0f + x4 / 120.0f - x6 / 5040.0f + x8 / 362880.0f - x10 / 39916800.0f);
269  c = 1.0f - x2 / 2.0f + x4 / 24.0f - x6 / 720.0f + x8 / 40320.0f - x10 / 3628800.0f;
270 }
271 
272 //----------------------------------------------------------------------------------
273 //
274 //----------------------------------------------------------------------------------
282 inline int32_t ConvertUtf16ToUtf8( int8_t* dst, int32_t dst_size, const int16_t* src )
283 {
284  int32_t cnt = 0;
285  const int16_t* wp = src;
286  int8_t* cp = dst;
287 
288  if (dst_size == 0) return 0;
289 
290  dst_size -= 3;
291 
292  for (cnt = 0; cnt < dst_size; )
293  {
294  int16_t wc = *wp++;
295  if (wc == 0)
296  {
297  break;
298  }
299  if ((wc & ~0x7f) == 0)
300  {
301  *cp++ = wc & 0x7f;
302  cnt += 1;
303  } else if ((wc & ~0x7ff) == 0)
304  {
305  *cp++ = ((wc >> 6) & 0x1f) | 0xc0;
306  *cp++ = ((wc) & 0x3f) | 0x80;
307  cnt += 2;
308  } else {
309  *cp++ = ((wc >> 12) & 0xf) | 0xe0;
310  *cp++ = ((wc >> 6) & 0x3f) | 0x80;
311  *cp++ = ((wc) & 0x3f) | 0x80;
312  cnt += 3;
313  }
314  }
315  *cp = '\0';
316  return cnt;
317 }
318 
326 inline int32_t ConvertUtf8ToUtf16( int16_t* dst, int32_t dst_size, const int8_t* src )
327 {
328  int32_t i, code;
329  int8_t c0, c1, c2;
330 
331  if (dst_size == 0) return 0;
332 
333  dst_size -= 1;
334 
335  for (i = 0; i < dst_size; i++)
336  {
337  int16_t wc;
338 
339  c0 = *src++;
340  if (c0 == '\0')
341  {
342  break;
343  }
344  // UTF8からUTF16に変換
345  code = (uint8_t)c0 >> 4;
346  if (code <= 7)
347  {
348  // 8bit文字
349  wc = c0;
350  }
351  else if (code >= 12 && code <= 13)
352  {
353  // 16bit文字
354  c1 = *src++;
355  wc = ((c0 & 0x1F) << 6) | (c1 & 0x3F);
356  }
357  else if (code == 14)
358  {
359  // 24bit文字
360  c1 = *src++;
361  c2 = *src++;
362  wc = ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
363  }
364  else
365  {
366  continue;
367  }
368  dst[i] = wc;
369  }
370  dst[i] = 0;
371  return i;
372 }
373 
374 
375 //----------------------------------------------------------------------------------
376 //
377 //----------------------------------------------------------------------------------
382 {
383 public:
388  virtual int AddRef() = 0;
389 
394  virtual int GetRef() = 0;
395 
400  virtual int Release() = 0;
401 };
402 
403 //----------------------------------------------------------------------------------
404 //
405 //----------------------------------------------------------------------------------
410  : public IReference
411 {
412 private:
413  mutable std::atomic<int32_t> m_reference;
414 
415 public:
417  : m_reference(1)
418  {
419  }
420 
421  virtual ~ReferenceObject()
422  {}
423 
424  virtual int AddRef()
425  {
426  std::atomic_fetch_add_explicit(&m_reference, 1, std::memory_order_consume);
427 
428  return m_reference;
429  }
430 
431  virtual int GetRef()
432  {
433  return m_reference;
434  }
435 
436  virtual int Release()
437  {
438  bool destroy = std::atomic_fetch_sub_explicit(&m_reference, 1, std::memory_order_consume) == 1;
439  if (destroy)
440  {
441  delete this;
442  return 0;
443  }
444 
445  return m_reference;
446  }
447 };
448 //----------------------------------------------------------------------------------
449 //
450 //----------------------------------------------------------------------------------
456 {
457  int32_t Width;
458  int32_t Height;
459  TextureFormatType TextureFormat;
460  void* UserPtr;
461  int64_t UserID;
462 };
463 
464 //----------------------------------------------------------------------------------
465 //
466 //----------------------------------------------------------------------------------
467 }
468 //----------------------------------------------------------------------------------
469 //
470 //----------------------------------------------------------------------------------
471 #endif // __EFFEKSEER_BASE_PRE_H__
472 #ifndef __EFFEKSEER_VECTOR2D_H__
473 #define __EFFEKSEER_VECTOR2D_H__
474 
475 //----------------------------------------------------------------------------------
476 // Include
477 //----------------------------------------------------------------------------------
478 
479 //----------------------------------------------------------------------------------
480 //
481 //----------------------------------------------------------------------------------
482 namespace Effekseer {
483 //----------------------------------------------------------------------------------
484 //
485 //----------------------------------------------------------------------------------
489 struct Vector2D
490 {
491 public:
495  float X;
496 
500  float Y;
501 
505  Vector2D();
506 
510  Vector2D( float x, float y );
511 
512  Vector2D& operator+=( const Vector2D& value );
513 };
514 
515 //----------------------------------------------------------------------------------
516 //
517 //----------------------------------------------------------------------------------
518  }
519 //----------------------------------------------------------------------------------
520 //
521 //----------------------------------------------------------------------------------
522 #endif // __EFFEKSEER_VECTOR3D_H__
523 
524 #ifndef __EFFEKSEER_VECTOR3D_H__
525 #define __EFFEKSEER_VECTOR3D_H__
526 
527 //----------------------------------------------------------------------------------
528 // Include
529 //----------------------------------------------------------------------------------
530 
531 //----------------------------------------------------------------------------------
532 //
533 //----------------------------------------------------------------------------------
534 namespace Effekseer {
535 //----------------------------------------------------------------------------------
536 //
537 //----------------------------------------------------------------------------------
541 struct Vector3D
542 {
543 public:
547  float X;
548 
552  float Y;
553 
557  float Z;
558 
562  Vector3D();
563 
567  Vector3D( float x, float y, float z );
568 
569  Vector3D operator + ( const Vector3D& o ) const;
570 
571  Vector3D operator - ( const Vector3D& o ) const;
572 
573  Vector3D operator * ( const float& o ) const;
574 
575  Vector3D operator / ( const float& o ) const;
576 
577  Vector3D& operator += ( const Vector3D& o );
578 
579  Vector3D& operator -= ( const Vector3D& o );
580 
581  Vector3D& operator *= ( const float& o );
582 
583  Vector3D& operator /= ( const float& o );
584 
588  static void Add( Vector3D* pOut, const Vector3D* pIn1, const Vector3D* pIn2 );
589 
593  static Vector3D& Sub( Vector3D& o, const Vector3D& in1, const Vector3D& in2 );
594 
598  static float Length( const Vector3D& in );
599 
603  static float LengthSq( const Vector3D& in );
604 
608  static float Dot( const Vector3D& in1, const Vector3D& in2 );
609 
613  static void Normal( Vector3D& o, const Vector3D& in );
614 
621  static Vector3D& Cross( Vector3D& o, const Vector3D& in1, const Vector3D& in2 );
622 
623  static Vector3D& Transform( Vector3D& o, const Vector3D& in, const Matrix43& mat );
624 
625  static Vector3D& Transform( Vector3D& o, const Vector3D& in, const Matrix44& mat );
626 };
627 
628 //----------------------------------------------------------------------------------
629 //
630 //----------------------------------------------------------------------------------
631  }
632 //----------------------------------------------------------------------------------
633 //
634 //----------------------------------------------------------------------------------
635 #endif // __EFFEKSEER_VECTOR3D_H__
636 
637 #ifndef __EFFEKSEER_COLOR_H__
638 #define __EFFEKSEER_COLOR_H__
639 
640 //----------------------------------------------------------------------------------
641 // Include
642 //----------------------------------------------------------------------------------
643 
644 //----------------------------------------------------------------------------------
645 //
646 //----------------------------------------------------------------------------------
647 namespace Effekseer
648 {
649 //----------------------------------------------------------------------------------
650 //
651 //----------------------------------------------------------------------------------
652 enum ColorMode
653 {
654  COLOR_MODE_RGBA,
655  COLOR_MODE_HSVA,
656  COLOR_MODE_DWORD = 0x7FFFFFFF
657 };
658 
662 #pragma pack(push,1)
663 struct Color
664 {
668  uint8_t R;
669 
673  uint8_t G;
674 
678  uint8_t B;
679 
683  uint8_t A;
684 
688  Color();
689 
693  Color( uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255 );
694 
698  static void Mul( Color& o, const Color& in1, const Color& in2 );
699 };
700 #pragma pack(pop)
701 //----------------------------------------------------------------------------------
702 //
703 //----------------------------------------------------------------------------------
704 }
705 //----------------------------------------------------------------------------------
706 //
707 //----------------------------------------------------------------------------------
708 #endif // __EFFEKSEER_COLOR_H__
709 
710 #ifndef __EFFEKSEER_RECTF_H__
711 #define __EFFEKSEER_RECTF_H__
712 
713 //----------------------------------------------------------------------------------
714 // Include
715 //----------------------------------------------------------------------------------
716 
717 //----------------------------------------------------------------------------------
718 //
719 //----------------------------------------------------------------------------------
720 namespace Effekseer {
721 //----------------------------------------------------------------------------------
722 //
723 //----------------------------------------------------------------------------------
727 struct RectF
728 {
729 private:
730 
731 public:
732  float X;
733 
734  float Y;
735 
736  float Width;
737 
738  float Height;
739 
740  RectF();
741 
742  RectF( float x, float y, float width, float height );
743 
744  Vector2D Position() const;
745 
746  Vector2D Size() const;
747 };
748 
749 //----------------------------------------------------------------------------------
750 //
751 //----------------------------------------------------------------------------------
752  }
753 //----------------------------------------------------------------------------------
754 //
755 //----------------------------------------------------------------------------------
756 #endif // __EFFEKSEER_RECTF_H__
757 
758 #ifndef __EFFEKSEER_MATRIX43_H__
759 #define __EFFEKSEER_MATRIX43_H__
760 
761 //----------------------------------------------------------------------------------
762 // Include
763 //----------------------------------------------------------------------------------
764 
765 //----------------------------------------------------------------------------------
766 //
767 //----------------------------------------------------------------------------------
768 namespace Effekseer {
769 //----------------------------------------------------------------------------------
770 //
771 //----------------------------------------------------------------------------------
772 
783 #pragma pack(push,1)
784 struct Matrix43
785 {
786 private:
787 
788 public:
792  float Value[4][3];
793 
797  void Indentity();
798 
805  void Scaling( float x, float y, float z );
806 
811  void RotationX( float angle );
812 
817  void RotationY( float angle );
818 
823  void RotationZ( float angle );
824 
831  void RotationXYZ( float rx, float ry, float rz );
832 
839  void RotationZXY( float rz, float rx, float ry );
840 
846  void RotationAxis( const Vector3D& axis, float angle );
847 
854  void RotationAxis( const Vector3D& axis, float s, float c );
855 
862  void Translation( float x, float y, float z );
863 
870  void GetSRT( Vector3D& s, Matrix43& r, Vector3D& t ) const;
871 
876  void GetScale( Vector3D& s ) const;
877 
882  void GetRotation( Matrix43& r ) const;
883 
888  void GetTranslation( Vector3D& t ) const;
889 
896  void SetSRT( const Vector3D& s, const Matrix43& r, const Vector3D& t );
897 
904  static void Multiple( Matrix43& out, const Matrix43& in1, const Matrix43& in2 );
905 };
906 
907 #pragma pack(pop)
908 //----------------------------------------------------------------------------------
909 //
910 //----------------------------------------------------------------------------------
911  }
912 //----------------------------------------------------------------------------------
913 //
914 //----------------------------------------------------------------------------------
915 #endif // __EFFEKSEER_MATRIX43_H__
916 
917 #ifndef __EFFEKSEER_MATRIX44_H__
918 #define __EFFEKSEER_MATRIX44_H__
919 
920 //----------------------------------------------------------------------------------
921 // Include
922 //----------------------------------------------------------------------------------
923 
924 //----------------------------------------------------------------------------------
925 //
926 //----------------------------------------------------------------------------------
927 namespace Effekseer {
928 //----------------------------------------------------------------------------------
929 //
930 //----------------------------------------------------------------------------------
931 
943 #pragma pack(push,1)
944 struct Matrix44
945 {
946 private:
947 
948 public:
949 
953  Matrix44();
954 
958  float Values[4][4];
959 
963  Matrix44& Indentity();
964 
968  Matrix44& Transpose();
969 
973  Matrix44& LookAtRH( const Vector3D& eye, const Vector3D& at, const Vector3D& up );
974 
978  Matrix44& LookAtLH( const Vector3D& eye, const Vector3D& at, const Vector3D& up );
979 
983  Matrix44& PerspectiveFovRH( float ovY, float aspect, float zn, float zf );
984 
988  Matrix44& PerspectiveFovRH_OpenGL( float ovY, float aspect, float zn, float zf );
989 
993  Matrix44& PerspectiveFovLH( float ovY, float aspect, float zn, float zf );
994 
998  Matrix44& PerspectiveFovLH_OpenGL( float ovY, float aspect, float zn, float zf );
999 
1003  Matrix44& OrthographicRH( float width, float height, float zn, float zf );
1004 
1008  Matrix44& OrthographicLH( float width, float height, float zn, float zf );
1009 
1013  void Scaling( float x, float y, float z );
1014 
1018  void RotationX( float angle );
1019 
1023  void RotationY( float angle );
1024 
1028  void RotationZ( float angle );
1029 
1033  void Translation( float x, float y, float z );
1034 
1038  void RotationAxis( const Vector3D& axis, float angle );
1039 
1043  void Quaternion( float x, float y, float z, float w );
1044 
1048  static Matrix44& Mul( Matrix44& o, const Matrix44& in1, const Matrix44& in2 );
1049 
1053  static Matrix44& Inverse( Matrix44& o, const Matrix44& in );
1054 };
1055 
1056 #pragma pack(pop)
1057 //----------------------------------------------------------------------------------
1058 //
1059 //----------------------------------------------------------------------------------
1060  }
1061 //----------------------------------------------------------------------------------
1062 //
1063 //----------------------------------------------------------------------------------
1064 #endif // __EFFEKSEER_MATRIX44_H__
1065 
1066 #ifndef __EFFEKSEER_FILE_H__
1067 #define __EFFEKSEER_FILE_H__
1068 
1069 //----------------------------------------------------------------------------------
1070 // Include
1071 //----------------------------------------------------------------------------------
1072 
1073 //----------------------------------------------------------------------------------
1074 //
1075 //----------------------------------------------------------------------------------
1076 namespace Effekseer {
1077 //----------------------------------------------------------------------------------
1078 //
1079 //----------------------------------------------------------------------------------
1084 {
1085 private:
1086 
1087 public:
1088  FileReader() {}
1089 
1090  virtual ~FileReader() {}
1091 
1092  virtual size_t Read( void* buffer, size_t size ) = 0;
1093 
1094  virtual void Seek(int position) = 0;
1095 
1096  virtual int GetPosition() = 0;
1097 
1098  virtual size_t GetLength() = 0;
1099 };
1100 
1105 {
1106 private:
1107 
1108 public:
1109  FileWriter() {}
1110 
1111  virtual ~FileWriter() {}
1112 
1113  virtual size_t Write( const void* buffer, size_t size ) = 0;
1114 
1115  virtual void Flush() = 0;
1116 
1117  virtual void Seek(int position) = 0;
1118 
1119  virtual int GetPosition() = 0;
1120 
1121  virtual size_t GetLength() = 0;
1122 };
1123 
1128 {
1129 private:
1130 
1131 public:
1132  virtual FileReader* OpenRead( const EFK_CHAR* path ) = 0;
1133 
1134  virtual FileWriter* OpenWrite( const EFK_CHAR* path ) = 0;
1135 };
1136 
1137 //----------------------------------------------------------------------------------
1138 //
1139 //----------------------------------------------------------------------------------
1140  }
1141 //----------------------------------------------------------------------------------
1142 //
1143 //----------------------------------------------------------------------------------
1144 #endif // __EFFEKSEER_FILE_H__
1145 
1146 #ifndef __EFFEKSEER_DEFAULT_FILE_H__
1147 #define __EFFEKSEER_DEFAULT_FILE_H__
1148 
1149 //----------------------------------------------------------------------------------
1150 // Include
1151 //----------------------------------------------------------------------------------
1152 
1153 //----------------------------------------------------------------------------------
1154 //
1155 //----------------------------------------------------------------------------------
1156 namespace Effekseer {
1157 //----------------------------------------------------------------------------------
1158 //
1159 //----------------------------------------------------------------------------------
1165 {
1166 private:
1167  FILE* m_filePtr;
1168 
1169 public:
1170  DefaultFileReader( FILE* filePtr );
1171 
1172  ~DefaultFileReader();
1173 
1174  size_t Read( void* buffer, size_t size );
1175 
1176  void Seek( int position );
1177 
1178  int GetPosition();
1179 
1180  size_t GetLength();
1181 };
1182 
1184 {
1185 private:
1186  FILE* m_filePtr;
1187 
1188 public:
1189  DefaultFileWriter( FILE* filePtr );
1190 
1191  ~DefaultFileWriter();
1192 
1193  size_t Write( const void* buffer, size_t size );
1194 
1195  void Flush();
1196 
1197  void Seek( int position );
1198 
1199  int GetPosition();
1200 
1201  size_t GetLength();
1202 };
1203 
1205 {
1206 private:
1207 
1208 public:
1209  FileReader* OpenRead( const EFK_CHAR* path );
1210 
1211  FileWriter* OpenWrite( const EFK_CHAR* path );
1212 };
1213 
1214 
1215 //----------------------------------------------------------------------------------
1216 //
1217 //----------------------------------------------------------------------------------
1218  }
1219 //----------------------------------------------------------------------------------
1220 //
1221 //----------------------------------------------------------------------------------
1222 #endif // __EFFEKSEER_DEFAULT_FILE_H__
1223 
1224 #ifndef __EFFEKSEER_EFFECT_H__
1225 #define __EFFEKSEER_EFFECT_H__
1226 
1227 //----------------------------------------------------------------------------------
1228 // Include
1229 //----------------------------------------------------------------------------------
1230 
1231 //----------------------------------------------------------------------------------
1232 //
1233 //----------------------------------------------------------------------------------
1234 namespace Effekseer
1235 {
1236 //----------------------------------------------------------------------------------
1237 //
1238 //----------------------------------------------------------------------------------
1239 
1245 class Effect
1246  : public IReference
1247 {
1248 protected:
1249  Effect() {}
1250  ~Effect() {}
1251 
1252 public:
1253 
1263  static Effect* Create( Manager* manager, void* data, int32_t size, float magnification = 1.0f, const EFK_CHAR* materialPath = NULL );
1264 
1273  static Effect* Create( Manager* manager, const EFK_CHAR* path, float magnification = 1.0f, const EFK_CHAR* materialPath = NULL );
1274 
1284  static Effect* Create( Setting* setting, void* data, int32_t size, float magnification = 1.0f, const EFK_CHAR* materialPath = NULL );
1285 
1294  static Effect* Create( Setting* setting, const EFK_CHAR* path, float magnification = 1.0f, const EFK_CHAR* materialPath = NULL );
1295 
1299  static ::Effekseer::EffectLoader* CreateEffectLoader(::Effekseer::FileInterface* fileInterface = NULL);
1300 
1305  virtual Setting* GetSetting() const = 0;
1306 
1311  virtual float GetMaginification() const = 0;
1312 
1316  virtual int GetVersion() const = 0;
1317 
1323  virtual TextureData* GetColorImage( int n ) const = 0;
1324 
1328  virtual int32_t GetColorImageCount() const = 0;
1329 
1335  virtual TextureData* GetNormalImage(int n) const = 0;
1336 
1340  virtual int32_t GetNormalImageCount() const = 0;
1341 
1347  virtual TextureData* GetDistortionImage(int n) const = 0;
1348 
1352  virtual int32_t GetDistortionImageCount() const = 0;
1353 
1357  virtual void* GetWave( int n ) const = 0;
1358 
1362  virtual int32_t GetWaveCount() const = 0;
1363 
1367  virtual void* GetModel( int n ) const = 0;
1368 
1372  virtual int32_t GetModelCount() const = 0;
1373 
1377  virtual bool Reload( void* data, int32_t size, const EFK_CHAR* materialPath = NULL ) = 0;
1378 
1382  virtual bool Reload( const EFK_CHAR* path, const EFK_CHAR* materialPath = NULL ) = 0;
1383 
1395  virtual bool Reload( Manager* managers, int32_t managersCount, void* data, int32_t size, const EFK_CHAR* materialPath = NULL ) = 0;
1396 
1407  virtual bool Reload( Manager* managers, int32_t managersCount,const EFK_CHAR* path, const EFK_CHAR* materialPath = NULL ) = 0;
1408 
1412  virtual void ReloadResources( const EFK_CHAR* materialPath = NULL ) = 0;
1413 
1417  virtual void UnloadResources() = 0;
1418 
1422  virtual EffectNode* GetRoot() const = 0;
1423 };
1424 
1431 {
1432  int32_t ColorTextureIndex;
1433  AlphaBlendType AlphaBlend;
1434  TextureFilterType FilterType;
1435  TextureWrapType WrapType;
1436  bool ZWrite;
1437  bool ZTest;
1438  bool Distortion;
1439  float DistortionIntensity;
1440 };
1441 
1452 {
1453  bool Lighting;
1454 };
1455 
1462 {
1463 public:
1464  EffectNode() {}
1465  virtual ~EffectNode(){}
1466 
1470  virtual Effect* GetEffect() const = 0;
1471 
1475  virtual int GetChildrenCount() const = 0;
1476 
1480  virtual EffectNode* GetChild(int index) const = 0;
1481 
1485  virtual EffectBasicRenderParameter GetBasicRenderParameter() = 0;
1486 
1490  virtual void SetBasicRenderParameter(EffectBasicRenderParameter param) = 0;
1491 
1497  virtual EffectModelParameter GetEffectModelParameter() = 0;
1498 };
1499 
1500 //----------------------------------------------------------------------------------
1501 //
1502 //----------------------------------------------------------------------------------
1503 }
1504 //----------------------------------------------------------------------------------
1505 //
1506 //----------------------------------------------------------------------------------
1507 #endif // __EFFEKSEER_EFFECT_H__
1508 
1509 #ifndef __EFFEKSEER_MANAGER_H__
1510 #define __EFFEKSEER_MANAGER_H__
1511 
1512 //----------------------------------------------------------------------------------
1513 // Include
1514 //----------------------------------------------------------------------------------
1515 
1516 //----------------------------------------------------------------------------------
1517 //
1518 //----------------------------------------------------------------------------------
1519 namespace Effekseer
1520 {
1521 //----------------------------------------------------------------------------------
1522 //
1523 //----------------------------------------------------------------------------------
1524 
1528 class Manager
1529  : public IReference
1530 {
1531 protected:
1532  Manager() {}
1533  ~Manager() {}
1534 
1535 public:
1542  static Manager* Create( int instance_max, bool autoFlip = true );
1543 
1549  virtual void Destroy() = 0;
1550 
1554  virtual MallocFunc GetMallocFunc() const = 0;
1555 
1559  virtual void SetMallocFunc( MallocFunc func ) = 0;
1560 
1564  virtual FreeFunc GetFreeFunc() const = 0;
1565 
1569  virtual void SetFreeFunc( FreeFunc func ) = 0;
1570 
1574  virtual RandFunc GetRandFunc() const = 0;
1575 
1579  virtual void SetRandFunc( RandFunc func ) = 0;
1580 
1584  virtual int GetRandMax() const = 0;
1585 
1589  virtual void SetRandMax( int max_ ) = 0;
1590 
1595  virtual CoordinateSystem GetCoordinateSystem() const = 0;
1596 
1604  virtual void SetCoordinateSystem( CoordinateSystem coordinateSystem ) = 0;
1605 
1609  virtual SpriteRenderer* GetSpriteRenderer() = 0;
1610 
1614  virtual void SetSpriteRenderer( SpriteRenderer* renderer ) = 0;
1615 
1619  virtual RibbonRenderer* GetRibbonRenderer() = 0;
1620 
1624  virtual void SetRibbonRenderer( RibbonRenderer* renderer ) = 0;
1625 
1629  virtual RingRenderer* GetRingRenderer() = 0;
1630 
1634  virtual void SetRingRenderer( RingRenderer* renderer ) = 0;
1635 
1639  virtual ModelRenderer* GetModelRenderer() = 0;
1640 
1644  virtual void SetModelRenderer( ModelRenderer* renderer ) = 0;
1645 
1649  virtual TrackRenderer* GetTrackRenderer() = 0;
1650 
1654  virtual void SetTrackRenderer( TrackRenderer* renderer ) = 0;
1655 
1659  virtual Setting* GetSetting() = 0;
1660 
1665  virtual void SetSetting(Setting* setting) = 0;
1666 
1670  virtual EffectLoader* GetEffectLoader() = 0;
1671 
1675  virtual void SetEffectLoader( EffectLoader* effectLoader ) = 0;
1676 
1680  virtual TextureLoader* GetTextureLoader() = 0;
1681 
1685  virtual void SetTextureLoader( TextureLoader* textureLoader ) = 0;
1686 
1690  virtual SoundPlayer* GetSoundPlayer() = 0;
1691 
1695  virtual void SetSoundPlayer( SoundPlayer* soundPlayer ) = 0;
1696 
1700  virtual SoundLoader* GetSoundLoader() = 0;
1701 
1705  virtual void SetSoundLoader( SoundLoader* soundLoader ) = 0;
1706 
1710  virtual ModelLoader* GetModelLoader() = 0;
1711 
1715  virtual void SetModelLoader( ModelLoader* modelLoader ) = 0;
1716 
1721  virtual void StopEffect( Handle handle ) = 0;
1722 
1726  virtual void StopAllEffects() = 0;
1727 
1732  virtual void StopRoot( Handle handle ) = 0;
1733 
1738  virtual void StopRoot( Effect* effect ) = 0;
1739 
1745  virtual bool Exists( Handle handle ) = 0;
1746 
1756  virtual int32_t GetInstanceCount( Handle handle ) = 0;
1757 
1763  virtual Matrix43 GetMatrix( Handle handle ) = 0;
1764 
1770  virtual void SetMatrix( Handle handle, const Matrix43& mat ) = 0;
1771 
1777  virtual Vector3D GetLocation( Handle handle ) = 0;
1778 
1785  virtual void SetLocation( Handle handle, float x, float y, float z ) = 0;
1786 
1791  virtual void SetLocation( Handle handle, const Vector3D& location ) = 0;
1792 
1797  virtual void AddLocation( Handle handle, const Vector3D& location ) = 0;
1798 
1802  virtual void SetRotation( Handle handle, float x, float y, float z ) = 0;
1803 
1810  virtual void SetRotation( Handle handle, const Vector3D& axis, float angle ) = 0;
1811 
1819  virtual void SetScale( Handle handle, float x, float y, float z ) = 0;
1820 
1827  virtual void SetTargetLocation( Handle handle, float x, float y, float z ) = 0;
1828 
1833  virtual void SetTargetLocation( Handle handle, const Vector3D& location ) = 0;
1834 
1840  virtual Matrix43 GetBaseMatrix( Handle handle ) = 0;
1841 
1849  virtual void SetBaseMatrix( Handle handle, const Matrix43& mat ) = 0;
1850 
1856  virtual void SetRemovingCallback( Handle handle, EffectInstanceRemovingCallback callback ) = 0;
1857 
1865  virtual bool GetShown(Handle handle) = 0;
1866 
1872  virtual void SetShown( Handle handle, bool shown ) = 0;
1873 
1881  virtual bool GetPaused(Handle handle) = 0;
1882 
1890  virtual void SetPaused( Handle handle, bool paused ) = 0;
1891 
1898  virtual void SetPausedToAllEffects(bool paused) = 0;
1899 
1905  virtual void SetSpeed( Handle handle, float speed ) = 0;
1906 
1912  virtual void SetAutoDrawing( Handle handle, bool autoDraw ) = 0;
1913 
1917  virtual void Flip() = 0;
1918 
1923  virtual void Update( float deltaFrame = 1.0f ) = 0;
1924 
1930  virtual void BeginUpdate() = 0;
1931 
1937  virtual void EndUpdate() = 0;
1938 
1946  virtual void UpdateHandle( Handle handle, float deltaFrame = 1.0f ) = 0;
1947 
1951  virtual void Draw() = 0;
1952 
1956  virtual void DrawHandle( Handle handle ) = 0;
1957 
1966  virtual Handle Play( Effect* effect, float x, float y, float z ) = 0;
1967 
1971  virtual int GetUpdateTime() const = 0;
1972 
1976  virtual int GetDrawTime() const = 0;
1977 
1981  virtual int32_t GetRestInstancesCount() const = 0;
1982 
1990  virtual void CreateCullingWorld( float xsize, float ysize, float zsize, int32_t layerCount) = 0;
1991 
1997  virtual void CalcCulling(const Matrix44& cameraProjMat, bool isOpenGL) = 0;
1998 
2002  virtual void RessignCulling() = 0;
2003 };
2004 //----------------------------------------------------------------------------------
2005 //
2006 //----------------------------------------------------------------------------------
2007 }
2008 //----------------------------------------------------------------------------------
2009 //
2010 //----------------------------------------------------------------------------------
2011 #endif // __EFFEKSEER_MANAGER_H__
2012 
2013 #ifndef __EFFEKSEER_SPRITE_RENDERER_H__
2014 #define __EFFEKSEER_SPRITE_RENDERER_H__
2015 
2016 //----------------------------------------------------------------------------------
2017 // Include
2018 //----------------------------------------------------------------------------------
2019 
2020 //----------------------------------------------------------------------------------
2021 //
2022 //----------------------------------------------------------------------------------
2023 namespace Effekseer
2024 {
2025 //----------------------------------------------------------------------------------
2026 //
2027 //----------------------------------------------------------------------------------
2028 
2030 {
2031 public:
2032 
2034  {
2035  Effect* EffectPointer;
2036  int32_t ColorTextureIndex;
2037  AlphaBlendType AlphaBlend;
2038  TextureFilterType TextureFilter;
2039  TextureWrapType TextureWrap;
2040  bool ZTest;
2041  bool ZWrite;
2042  BillboardType Billboard;
2043 
2044  bool Distortion;
2045  float DistortionIntensity;
2046  };
2047 
2049  {
2050  Matrix43 SRTMatrix43;
2051  Color AllColor;
2052 
2053  // 左下、右下、左上、右上
2054  Color Colors[4];
2055 
2056  Vector2D Positions[4];
2057 
2058  RectF UV;
2059  };
2060 
2061 public:
2062  SpriteRenderer() {}
2063 
2064  virtual ~SpriteRenderer() {}
2065 
2066  virtual void BeginRendering( const NodeParameter& parameter, int32_t count, void* userData ) {}
2067 
2068  virtual void Rendering( const NodeParameter& parameter, const InstanceParameter& instanceParameter, void* userData ) {}
2069 
2070  virtual void EndRendering( const NodeParameter& parameter, void* userData ) {}
2071 };
2072 
2073 //----------------------------------------------------------------------------------
2074 //
2075 //----------------------------------------------------------------------------------
2076 }
2077 //----------------------------------------------------------------------------------
2078 //
2079 //----------------------------------------------------------------------------------
2080 #endif // __EFFEKSEER_SPRITE_RENDERER_H__
2081 
2082 #ifndef __EFFEKSEER_RIBBON_RENDERER_H__
2083 #define __EFFEKSEER_RIBBON_RENDERER_H__
2084 
2085 //----------------------------------------------------------------------------------
2086 // Include
2087 //----------------------------------------------------------------------------------
2088 
2089 //----------------------------------------------------------------------------------
2090 //
2091 //----------------------------------------------------------------------------------
2092 namespace Effekseer
2093 {
2094 //----------------------------------------------------------------------------------
2095 //
2096 //----------------------------------------------------------------------------------
2097 
2099 {
2100 public:
2101 
2103  {
2104  Effect* EffectPointer;
2105  int32_t ColorTextureIndex;
2106  AlphaBlendType AlphaBlend;
2107  TextureFilterType TextureFilter;
2108  TextureWrapType TextureWrap;
2109  bool ZTest;
2110  bool ZWrite;
2111  bool ViewpointDependent;
2112 
2113  bool Distortion;
2114  float DistortionIntensity;
2115  };
2116 
2118  {
2119  int32_t InstanceCount;
2120  int32_t InstanceIndex;
2121  Matrix43 SRTMatrix43;
2122  Color AllColor;
2123 
2124  // 左、右
2125  Color Colors[2];
2126 
2127  float Positions[2];
2128 
2129  RectF UV;
2130  };
2131 
2132 public:
2133  RibbonRenderer() {}
2134 
2135  virtual ~RibbonRenderer() {}
2136 
2137  virtual void BeginRendering( const NodeParameter& parameter, int32_t count, void* userData ) {}
2138 
2139  virtual void Rendering( const NodeParameter& parameter, const InstanceParameter& instanceParameter, void* userData ) {}
2140 
2141  virtual void EndRendering( const NodeParameter& parameter, void* userData ) {}
2142 };
2143 
2144 //----------------------------------------------------------------------------------
2145 //
2146 //----------------------------------------------------------------------------------
2147 }
2148 //----------------------------------------------------------------------------------
2149 //
2150 //----------------------------------------------------------------------------------
2151 #endif // __EFFEKSEER_RIBBON_RENDERER_H__
2152 
2153 #ifndef __EFFEKSEER_RING_RENDERER_H__
2154 #define __EFFEKSEER_RING_RENDERER_H__
2155 
2156 //----------------------------------------------------------------------------------
2157 // Include
2158 //----------------------------------------------------------------------------------
2159 
2160 //----------------------------------------------------------------------------------
2161 //
2162 //----------------------------------------------------------------------------------
2163 namespace Effekseer
2164 {
2165 //----------------------------------------------------------------------------------
2166 //
2167 //----------------------------------------------------------------------------------
2168 
2170 {
2171 public:
2172 
2174  {
2175  Effect* EffectPointer;
2176  int32_t ColorTextureIndex;
2177  AlphaBlendType AlphaBlend;
2178  TextureFilterType TextureFilter;
2179  TextureWrapType TextureWrap;
2180  bool ZTest;
2181  bool ZWrite;
2182  BillboardType Billboard;
2183  int32_t VertexCount;
2184 
2185  bool Distortion;
2186  float DistortionIntensity;
2187  };
2188 
2190  {
2191  Matrix43 SRTMatrix43;
2192  float ViewingAngle;
2193  Vector2D OuterLocation;
2194  Vector2D InnerLocation;
2195  float CenterRatio;
2196  Color OuterColor;
2197  Color CenterColor;
2198  Color InnerColor;
2199 
2200  RectF UV;
2201  };
2202 
2203 public:
2204  RingRenderer() {}
2205 
2206  virtual ~RingRenderer() {}
2207 
2208  virtual void BeginRendering( const NodeParameter& parameter, int32_t count, void* userData ) {}
2209 
2210  virtual void Rendering( const NodeParameter& parameter, const InstanceParameter& instanceParameter, void* userData ) {}
2211 
2212  virtual void EndRendering( const NodeParameter& parameter, void* userData ) {}
2213 };
2214 
2215 //----------------------------------------------------------------------------------
2216 //
2217 //----------------------------------------------------------------------------------
2218 }
2219 //----------------------------------------------------------------------------------
2220 //
2221 //----------------------------------------------------------------------------------
2222 #endif // __EFFEKSEER_RING_RENDERER_H__
2223 
2224 #ifndef __EFFEKSEER_MODEL_RENDERER_H__
2225 #define __EFFEKSEER_MODEL_RENDERER_H__
2226 
2227 //----------------------------------------------------------------------------------
2228 // Include
2229 //----------------------------------------------------------------------------------
2230 
2231 //----------------------------------------------------------------------------------
2232 //
2233 //----------------------------------------------------------------------------------
2234 namespace Effekseer
2235 {
2236 //----------------------------------------------------------------------------------
2237 //
2238 //----------------------------------------------------------------------------------
2239 
2241 {
2242 public:
2243 
2245  {
2246  Effect* EffectPointer;
2247  AlphaBlendType AlphaBlend;
2248  TextureFilterType TextureFilter;
2249  TextureWrapType TextureWrap;
2250  bool ZTest;
2251  bool ZWrite;
2252  bool Lighting;
2253  CullingType Culling;
2254  int32_t ModelIndex;
2255  int32_t ColorTextureIndex;
2256  int32_t NormalTextureIndex;
2257  float Magnification;
2258  bool IsRightHand;
2259 
2260  bool Distortion;
2261  float DistortionIntensity;
2262  };
2263 
2265  {
2266  Matrix43 SRTMatrix43;
2267  RectF UV;
2268  Color AllColor;
2269  };
2270 
2271 public:
2272  ModelRenderer() {}
2273 
2274  virtual ~ModelRenderer() {}
2275 
2276  virtual void BeginRendering( const NodeParameter& parameter, int32_t count, void* userData ) {}
2277 
2278  virtual void Rendering( const NodeParameter& parameter, const InstanceParameter& instanceParameter, void* userData ) {}
2279 
2280  virtual void EndRendering( const NodeParameter& parameter, void* userData ) {}
2281 };
2282 
2283 //----------------------------------------------------------------------------------
2284 //
2285 //----------------------------------------------------------------------------------
2286 }
2287 //----------------------------------------------------------------------------------
2288 //
2289 //----------------------------------------------------------------------------------
2290 #endif // __EFFEKSEER_MODEL_RENDERER_H__
2291 
2292 #ifndef __EFFEKSEER_TRACK_RENDERER_H__
2293 #define __EFFEKSEER_TRACK_RENDERER_H__
2294 
2295 //----------------------------------------------------------------------------------
2296 // Include
2297 //----------------------------------------------------------------------------------
2298 
2299 //----------------------------------------------------------------------------------
2300 //
2301 //----------------------------------------------------------------------------------
2302 namespace Effekseer
2303 {
2304 //----------------------------------------------------------------------------------
2305 //
2306 //----------------------------------------------------------------------------------
2307 
2309 {
2310 public:
2311 
2313  {
2314  Effect* EffectPointer;
2315  int32_t ColorTextureIndex;
2316  AlphaBlendType AlphaBlend;
2317  TextureFilterType TextureFilter;
2318  TextureWrapType TextureWrap;
2319  bool ZTest;
2320  bool ZWrite;
2321 
2322  bool Distortion;
2323  float DistortionIntensity;
2324  };
2325 
2327  {
2328 
2329  };
2330 
2332  {
2333  int32_t InstanceCount;
2334  int32_t InstanceIndex;
2335  Matrix43 SRTMatrix43;
2336 
2337  Color ColorLeft;
2338  Color ColorCenter;
2339  Color ColorRight;
2340 
2341  Color ColorLeftMiddle;
2342  Color ColorCenterMiddle;
2343  Color ColorRightMiddle;
2344 
2345  float SizeFor;
2346  float SizeMiddle;
2347  float SizeBack;
2348 
2349  RectF UV;
2350  };
2351 
2352 public:
2353  TrackRenderer() {}
2354 
2355  virtual ~TrackRenderer() {}
2356 
2357  virtual void BeginRendering( const NodeParameter& parameter, int32_t count, void* userData ) {}
2358 
2359  virtual void Rendering( const NodeParameter& parameter, const InstanceParameter& instanceParameter, void* userData ) {}
2360 
2361  virtual void EndRendering( const NodeParameter& parameter, void* userData ) {}
2362 };
2363 
2364 //----------------------------------------------------------------------------------
2365 //
2366 //----------------------------------------------------------------------------------
2367 }
2368 //----------------------------------------------------------------------------------
2369 //
2370 //----------------------------------------------------------------------------------
2371 #endif // __EFFEKSEER_TRACK_RENDERER_H__
2372 
2373 #ifndef __EFFEKSEER_EFFECTLOADER_H__
2374 #define __EFFEKSEER_EFFECTLOADER_H__
2375 
2376 //----------------------------------------------------------------------------------
2377 // Include
2378 //----------------------------------------------------------------------------------
2379 
2380 //----------------------------------------------------------------------------------
2381 //
2382 //----------------------------------------------------------------------------------
2383 namespace Effekseer {
2384 //----------------------------------------------------------------------------------
2385 //
2386 //----------------------------------------------------------------------------------
2391 {
2392 public:
2397 
2401  virtual ~EffectLoader() {}
2402 
2413  virtual bool Load( const EFK_CHAR* path, void*& data, int32_t& size ) = 0;
2414 
2423  virtual void Unload( void* data, int32_t size ) = 0;
2424 };
2425 
2426 //----------------------------------------------------------------------------------
2427 //
2428 //----------------------------------------------------------------------------------
2429  }
2430 //----------------------------------------------------------------------------------
2431 //
2432 //----------------------------------------------------------------------------------
2433 #endif // __EFFEKSEER_EFFECTLOADER_H__
2434 
2435 #ifndef __EFFEKSEER_TEXTURELOADER_H__
2436 #define __EFFEKSEER_TEXTURELOADER_H__
2437 
2438 //----------------------------------------------------------------------------------
2439 // Include
2440 //----------------------------------------------------------------------------------
2441 
2442 //----------------------------------------------------------------------------------
2443 //
2444 //----------------------------------------------------------------------------------
2445 namespace Effekseer {
2446 //----------------------------------------------------------------------------------
2447 //
2448 //----------------------------------------------------------------------------------
2453 {
2454 public:
2459 
2463  virtual ~TextureLoader() {}
2464 
2474  virtual TextureData* Load( const EFK_CHAR* path, TextureType textureType ) { return nullptr; }
2475 
2483  virtual void Unload(TextureData* data ) {}
2484 };
2485 
2486 //----------------------------------------------------------------------------------
2487 //
2488 //----------------------------------------------------------------------------------
2489  }
2490 //----------------------------------------------------------------------------------
2491 //
2492 //----------------------------------------------------------------------------------
2493 #endif // __EFFEKSEER_TEXTURELOADER_H__
2494 
2495 #ifndef __EFFEKSEER_MODELLOADER_H__
2496 #define __EFFEKSEER_MODELLOADER_H__
2497 
2498 //----------------------------------------------------------------------------------
2499 // Include
2500 //----------------------------------------------------------------------------------
2501 
2502 //----------------------------------------------------------------------------------
2503 //
2504 //----------------------------------------------------------------------------------
2505 namespace Effekseer {
2506 //----------------------------------------------------------------------------------
2507 //
2508 //----------------------------------------------------------------------------------
2513 {
2514 public:
2519 
2523  virtual ~ModelLoader() {}
2524 
2533  virtual void* Load( const EFK_CHAR* path ) { return NULL; }
2534 
2542  virtual void Unload( void* data ) {}
2543 };
2544 
2545 //----------------------------------------------------------------------------------
2546 //
2547 //----------------------------------------------------------------------------------
2548  }
2549 //----------------------------------------------------------------------------------
2550 //
2551 //----------------------------------------------------------------------------------
2552 #endif // __EFFEKSEER_MODELLOADER_H__
2553 
2554 #ifndef __EFFEKSEER_MODEL_H__
2555 #define __EFFEKSEER_MODEL_H__
2556 
2557 //----------------------------------------------------------------------------------
2558 // Include
2559 //----------------------------------------------------------------------------------
2560 
2561 //----------------------------------------------------------------------------------
2562 //
2563 //----------------------------------------------------------------------------------
2564 namespace Effekseer {
2565 //----------------------------------------------------------------------------------
2566 //
2567 //----------------------------------------------------------------------------------
2573 class Model
2574 {
2575 public:
2576  static const int32_t Version = 1;
2577 
2578  struct Vertex
2579  {
2580  Vector3D Position;
2581  Vector3D Normal;
2582  Vector3D Binormal;
2583  Vector3D Tangent;
2584  Vector2D UV;
2585  Color VColor;
2586  };
2587 
2589  {
2590  Vector3D Position;
2591  Vector3D Normal;
2592  Vector3D Binormal;
2593  Vector3D Tangent;
2594  Vector2D UV;
2595  Color VColor;
2596  uint8_t Index[4];
2597  };
2598 
2599  struct Face
2600  {
2601  int32_t Indexes[3];
2602  };
2603 
2604  struct Emitter
2605  {
2606  Vector3D Position;
2607  Vector3D Normal;
2608  Vector3D Binormal;
2609  Vector3D Tangent;
2610  };
2611 
2612 private:
2613  uint8_t* m_data;
2614  int32_t m_size;
2615 
2616  int32_t m_version;
2617 
2618  int32_t m_vertexCount;
2619  Vertex* m_vertexes;
2620 
2621  int32_t m_faceCount;
2622  Face* m_faces;
2623 
2624  int32_t m_modelCount;
2625 
2626 public:
2627 
2633  Model( void* data, int32_t size )
2634  : m_data ( NULL )
2635  , m_size ( size )
2636  , m_version ( 0 )
2637  , m_vertexCount ( 0 )
2638  , m_vertexes ( NULL )
2639  , m_faceCount ( 0 )
2640  , m_faces ( NULL )
2641  {
2642  m_data = new uint8_t[m_size];
2643  memcpy( m_data, data, m_size );
2644 
2645  uint8_t* p = (uint8_t*)m_data;
2646 
2647  memcpy( &m_version, p, sizeof(int32_t) );
2648  p += sizeof(int32_t);
2649 
2650  // load scale except version 3(for compatibility)
2651  if (m_version == 2)
2652  {
2653  // Scale
2654  p += sizeof(int32_t);
2655  }
2656 
2657  memcpy( &m_modelCount, p, sizeof(int32_t) );
2658  p += sizeof(int32_t);
2659 
2660  memcpy( &m_vertexCount, p, sizeof(int32_t) );
2661  p += sizeof(int32_t);
2662 
2663  if (m_version >= 1)
2664  {
2665  m_vertexes = (Vertex*) p;
2666  p += (sizeof(Vertex) * m_vertexCount);
2667  }
2668  else
2669  {
2670  // allocate new buffer
2671  m_vertexes = new Vertex[m_vertexCount];
2672 
2673  for (int32_t i = 0; i < m_vertexCount; i++)
2674  {
2675  memcpy(&m_vertexes[i], p, sizeof(Vertex) - sizeof(Color));
2676  m_vertexes[i].VColor = Color(255, 255, 255, 255);
2677 
2678  p += sizeof(Vertex) - sizeof(Color);
2679  }
2680  }
2681 
2682  memcpy( &m_faceCount, p, sizeof(int32_t) );
2683  p += sizeof(int32_t);
2684 
2685  m_faces = (Face*)p;
2686  p += ( sizeof(Face) * m_faceCount );
2687  }
2688 
2689  Vertex* GetVertexes() const { return m_vertexes; }
2690  int32_t GetVertexCount() { return m_vertexCount; }
2691 
2692  Face* GetFaces() const { return m_faces; }
2693  int32_t GetFaceCount() { return m_faceCount; }
2694 
2695  int32_t GetModelCount() { return m_modelCount; }
2696 
2702  virtual ~Model()
2703  {
2704  if (m_version == 0)
2705  {
2706  ES_SAFE_DELETE_ARRAY(m_vertexes);
2707  }
2708 
2709  ES_SAFE_DELETE_ARRAY( m_data );
2710  }
2711 
2712  Emitter GetEmitter( Manager* manager, CoordinateSystem coordinate, float magnification )
2713  {
2714  RandFunc randFunc = manager->GetRandFunc();
2715  int32_t randMax = manager->GetRandMax();
2716 
2717  int32_t faceInd = (int32_t)( (GetFaceCount() - 1) * ( (float)randFunc() / (float)randMax ) );
2718  faceInd = Clamp( faceInd, GetFaceCount() - 1, 0 );
2719  Face& face = GetFaces()[faceInd];
2720  Vertex& v0 = GetVertexes()[face.Indexes[0]];
2721  Vertex& v1 = GetVertexes()[face.Indexes[1]];
2722  Vertex& v2 = GetVertexes()[face.Indexes[2]];
2723 
2724  float p1 = ( (float)randFunc() / (float)randMax );
2725  float p2 = ( (float)randFunc() / (float)randMax );
2726 
2727  // Fit within plane
2728  if( p1 + p2 > 1.0f )
2729  {
2730  p1 = 1.0f - p1;
2731  p2 = 1.0f - p2;
2732  }
2733 
2734  float p0 = 1.0f - p1 - p2;
2735 
2736  Emitter emitter;
2737  emitter.Position = (v0.Position * p0 + v1.Position * p1 + v2.Position * p2) * magnification;
2738  emitter.Normal = v0.Normal * p0 + v1.Normal * p1 + v2.Normal * p2;
2739  emitter.Binormal = v0.Binormal * p0 + v1.Binormal * p1 + v2.Binormal * p2;
2740  emitter.Tangent = v0.Tangent * p0 + v1.Tangent * p1 + v2.Tangent * p2;
2741 
2742  if( coordinate == CoordinateSystem::LH )
2743  {
2744  emitter.Position.Z = - emitter.Position.Z;
2745  emitter.Normal.Z = - emitter.Normal.Z;
2746  emitter.Binormal.Z = - emitter.Binormal.Z;
2747  emitter.Tangent.Z = - emitter.Tangent.Z;
2748  }
2749 
2750  return emitter;
2751  }
2752 
2753  Emitter GetEmitterFromVertex( Manager* manager, CoordinateSystem coordinate, float magnification )
2754  {
2755  RandFunc randFunc = manager->GetRandFunc();
2756  int32_t randMax = manager->GetRandMax();
2757 
2758  int32_t vertexInd = (int32_t)( (GetVertexCount() - 1) * ( (float)randFunc() / (float)randMax ) );
2759  vertexInd = Clamp( vertexInd, GetVertexCount() - 1, 0 );
2760  Vertex& v = GetVertexes()[vertexInd];
2761 
2762  Emitter emitter;
2763  emitter.Position = v.Position * magnification;
2764  emitter.Normal = v.Normal;
2765  emitter.Binormal = v.Binormal;
2766  emitter.Tangent = v.Tangent;
2767 
2768  if( coordinate == CoordinateSystem::LH )
2769  {
2770  emitter.Position.Z = - emitter.Position.Z;
2771  emitter.Normal.Z = - emitter.Normal.Z;
2772  emitter.Binormal.Z = - emitter.Binormal.Z;
2773  emitter.Tangent.Z = - emitter.Tangent.Z;
2774  }
2775 
2776  return emitter;
2777  }
2778 
2779  Emitter GetEmitterFromVertex( int32_t index, CoordinateSystem coordinate, float magnification )
2780  {
2781  int32_t vertexInd = index % GetVertexCount();
2782  Vertex& v = GetVertexes()[vertexInd];
2783 
2784  Emitter emitter;
2785  emitter.Position = v.Position * magnification;
2786  emitter.Normal = v.Normal;
2787  emitter.Binormal = v.Binormal;
2788  emitter.Tangent = v.Tangent;
2789 
2790  if( coordinate == CoordinateSystem::LH )
2791  {
2792  emitter.Position.Z = - emitter.Position.Z;
2793  emitter.Normal.Z = - emitter.Normal.Z;
2794  emitter.Binormal.Z = - emitter.Binormal.Z;
2795  emitter.Tangent.Z = - emitter.Tangent.Z;
2796  }
2797 
2798  return emitter;
2799  }
2800 
2801  Emitter GetEmitterFromFace( Manager* manager, CoordinateSystem coordinate, float magnification )
2802  {
2803  RandFunc randFunc = manager->GetRandFunc();
2804  int32_t randMax = manager->GetRandMax();
2805 
2806  int32_t faceInd = (int32_t)( (GetFaceCount() - 1) * ( (float)randFunc() / (float)randMax ) );
2807  faceInd = Clamp( faceInd, GetFaceCount() - 1, 0 );
2808  Face& face = GetFaces()[faceInd];
2809  Vertex& v0 = GetVertexes()[face.Indexes[0]];
2810  Vertex& v1 = GetVertexes()[face.Indexes[1]];
2811  Vertex& v2 = GetVertexes()[face.Indexes[2]];
2812 
2813  float p0 = 1.0f / 3.0f;
2814  float p1 = 1.0f / 3.0f;
2815  float p2 = 1.0f / 3.0f;
2816 
2817  Emitter emitter;
2818  emitter.Position = (v0.Position * p0 + v1.Position * p1 + v2.Position * p2) * magnification;
2819  emitter.Normal = v0.Normal * p0 + v1.Normal * p1 + v2.Normal * p2;
2820  emitter.Binormal = v0.Binormal * p0 + v1.Binormal * p1 + v2.Binormal * p2;
2821  emitter.Tangent = v0.Tangent * p0 + v1.Tangent * p1 + v2.Tangent * p2;
2822 
2823  if( coordinate == CoordinateSystem::LH )
2824  {
2825  emitter.Position.Z = - emitter.Position.Z;
2826  emitter.Normal.Z = - emitter.Normal.Z;
2827  emitter.Binormal.Z = - emitter.Binormal.Z;
2828  emitter.Tangent.Z = - emitter.Tangent.Z;
2829  }
2830 
2831  return emitter;
2832  }
2833 
2834  Emitter GetEmitterFromFace( int32_t index, CoordinateSystem coordinate, float magnification )
2835  {
2836  int32_t faceInd = index % (GetFaceCount() - 1);
2837  Face& face = GetFaces()[faceInd];
2838  Vertex& v0 = GetVertexes()[face.Indexes[0]];
2839  Vertex& v1 = GetVertexes()[face.Indexes[1]];
2840  Vertex& v2 = GetVertexes()[face.Indexes[2]];
2841 
2842  float p0 = 1.0f / 3.0f;
2843  float p1 = 1.0f / 3.0f;
2844  float p2 = 1.0f / 3.0f;
2845 
2846  Emitter emitter;
2847  emitter.Position = (v0.Position * p0 + v1.Position * p1 + v2.Position * p2) * magnification;
2848  emitter.Normal = v0.Normal * p0 + v1.Normal * p1 + v2.Normal * p2;
2849  emitter.Binormal = v0.Binormal * p0 + v1.Binormal * p1 + v2.Binormal * p2;
2850  emitter.Tangent = v0.Tangent * p0 + v1.Tangent * p1 + v2.Tangent * p2;
2851 
2852  if( coordinate == CoordinateSystem::LH )
2853  {
2854  emitter.Position.Z = - emitter.Position.Z;
2855  emitter.Normal.Z = - emitter.Normal.Z;
2856  emitter.Binormal.Z = - emitter.Binormal.Z;
2857  emitter.Tangent.Z = - emitter.Tangent.Z;
2858  }
2859 
2860  return emitter;
2861  }
2862 };
2863 
2864 //----------------------------------------------------------------------------------
2865 //
2866 //----------------------------------------------------------------------------------
2867  }
2868 //----------------------------------------------------------------------------------
2869 //
2870 //----------------------------------------------------------------------------------
2871 #endif // __EFFEKSEER_MODEL_H__
2872 
2873 #ifndef __EFFEKSEER_SOUND_PLAYER_H__
2874 #define __EFFEKSEER_SOUND_PLAYER_H__
2875 
2876 //----------------------------------------------------------------------------------
2877 // Include
2878 //----------------------------------------------------------------------------------
2879 
2880 //----------------------------------------------------------------------------------
2881 //
2882 //----------------------------------------------------------------------------------
2883 namespace Effekseer
2884 {
2885 //----------------------------------------------------------------------------------
2886 //
2887 //----------------------------------------------------------------------------------
2888 
2889 typedef void* SoundHandle;
2890 typedef void* SoundTag;
2891 
2893 {
2894 public:
2896  {
2897  void* Data;
2898  float Volume;
2899  float Pan;
2900  float Pitch;
2901  bool Mode3D;
2902  Vector3D Position;
2903  float Distance;
2904  };
2905 
2906 public:
2907  SoundPlayer() {}
2908 
2909  virtual ~SoundPlayer() {}
2910 
2911  virtual SoundHandle Play( SoundTag tag, const InstanceParameter& parameter ) = 0;
2912 
2913  virtual void Stop( SoundHandle handle, SoundTag tag ) = 0;
2914 
2915  virtual void Pause( SoundHandle handle, SoundTag tag, bool pause ) = 0;
2916 
2917  virtual bool CheckPlaying( SoundHandle handle, SoundTag tag ) = 0;
2918 
2919  virtual void StopTag( SoundTag tag ) = 0;
2920 
2921  virtual void PauseTag( SoundTag tag, bool pause ) = 0;
2922 
2923  virtual bool CheckPlayingTag( SoundTag tag ) = 0;
2924 
2925  virtual void StopAll() = 0;
2926 };
2927 
2928 //----------------------------------------------------------------------------------
2929 //
2930 //----------------------------------------------------------------------------------
2931 }
2932 //----------------------------------------------------------------------------------
2933 //
2934 //----------------------------------------------------------------------------------
2935 #endif // __EFFEKSEER_SOUND_PLAYER_H__
2936 
2937 #ifndef __EFFEKSEER_SOUNDLOADER_H__
2938 #define __EFFEKSEER_SOUNDLOADER_H__
2939 
2940 //----------------------------------------------------------------------------------
2941 // Include
2942 //----------------------------------------------------------------------------------
2943 
2944 //----------------------------------------------------------------------------------
2945 //
2946 //----------------------------------------------------------------------------------
2947 namespace Effekseer {
2948 //----------------------------------------------------------------------------------
2949 //
2950 //----------------------------------------------------------------------------------
2955 {
2956 public:
2961 
2965  virtual ~SoundLoader() {}
2966 
2975  virtual void* Load( const EFK_CHAR* path ) { return NULL; }
2976 
2984  virtual void Unload( void* source ) {}
2985 };
2986 
2987 //----------------------------------------------------------------------------------
2988 //
2989 //----------------------------------------------------------------------------------
2990  }
2991 //----------------------------------------------------------------------------------
2992 //
2993 //----------------------------------------------------------------------------------
2994 #endif // __EFFEKSEER_SOUNDLOADER_H__
2995 
2996 #ifndef __EFFEKSEER_LOADER_H__
2997 #define __EFFEKSEER_LOADER_H__
2998 
2999 //----------------------------------------------------------------------------------
3000 // Include
3001 //----------------------------------------------------------------------------------
3002 
3003 //----------------------------------------------------------------------------------
3004 //
3005 //----------------------------------------------------------------------------------
3006 namespace Effekseer {
3007 //----------------------------------------------------------------------------------
3008 //
3009 //----------------------------------------------------------------------------------
3016  class Setting
3017  : public ReferenceObject
3018  {
3019  private:
3020  /* 座標系 */
3021  CoordinateSystem m_coordinateSystem;
3022 
3023  EffectLoader* m_effectLoader;
3024  TextureLoader* m_textureLoader;
3025  SoundLoader* m_soundLoader;
3026  ModelLoader* m_modelLoader;
3027 
3028  protected:
3032  Setting();
3033 
3037  ~Setting();
3038  public:
3039 
3043  static Setting* Create();
3044 
3049  CoordinateSystem GetCoordinateSystem() const;
3050 
3058  void SetCoordinateSystem(CoordinateSystem coordinateSystem);
3059 
3064  EffectLoader* GetEffectLoader();
3065 
3070  void SetEffectLoader(EffectLoader* loader);
3071 
3076  TextureLoader* GetTextureLoader();
3077 
3082  void SetTextureLoader(TextureLoader* loader);
3083 
3088  ModelLoader* GetModelLoader();
3089 
3094  void SetModelLoader(ModelLoader* loader);
3095 
3100  SoundLoader* GetSoundLoader();
3101 
3106  void SetSoundLoader(SoundLoader* loader);
3107  };
3108 
3109 //----------------------------------------------------------------------------------
3110 //
3111 //----------------------------------------------------------------------------------
3112  }
3113 //----------------------------------------------------------------------------------
3114 //
3115 //----------------------------------------------------------------------------------
3116 #endif // __EFFEKSEER_LOADER_H__
3117 
3118 #ifndef __EFFEKSEER_SERVER_H__
3119 #define __EFFEKSEER_SERVER_H__
3120 
3121 #if !( defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE) )
3122 
3123 //----------------------------------------------------------------------------------
3124 // Include
3125 //----------------------------------------------------------------------------------
3126 
3127 //----------------------------------------------------------------------------------
3128 //
3129 //----------------------------------------------------------------------------------
3130 namespace Effekseer {
3131 //----------------------------------------------------------------------------------
3132 //
3133 //----------------------------------------------------------------------------------
3134 class Server
3135 {
3136 public:
3137 
3138  Server() {}
3139  virtual ~Server() {}
3140 
3141  static Server* Create();
3142 
3146  virtual bool Start( uint16_t port ) = 0;
3147 
3148  virtual void Stop() = 0;
3149 
3155  virtual void Regist( const EFK_CHAR* key, Effect* effect ) = 0;
3156 
3161  virtual void Unregist( Effect* effect ) = 0;
3162 
3166  virtual void Update() = 0;
3167 
3171  virtual void SetMaterialPath( const EFK_CHAR* materialPath ) = 0;
3172 };
3173 
3174 //----------------------------------------------------------------------------------
3175 //
3176 //----------------------------------------------------------------------------------
3177  }
3178 //----------------------------------------------------------------------------------
3179 //
3180 //----------------------------------------------------------------------------------
3181 
3182 #endif // #if !( defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE) )
3183 
3184 #endif // __EFFEKSEER_SERVER_H__
3185 
3186 #ifndef __EFFEKSEER_CLIENT_H__
3187 #define __EFFEKSEER_CLIENT_H__
3188 
3189 #if !( defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE) )
3190 
3191 //----------------------------------------------------------------------------------
3192 // Include
3193 //----------------------------------------------------------------------------------
3194 
3195 //----------------------------------------------------------------------------------
3196 //
3197 //----------------------------------------------------------------------------------
3198 namespace Effekseer {
3199 //----------------------------------------------------------------------------------
3200 //
3201 //----------------------------------------------------------------------------------
3202 class Client
3203 {
3204 public:
3205  Client() {}
3206  virtual ~Client() {}
3207 
3208  static Client* Create();
3209 
3210  virtual bool Start( char* host, uint16_t port ) = 0;
3211  virtual void Stop()= 0;
3212 
3213  virtual void Reload( const EFK_CHAR* key, void* data, int32_t size ) = 0;
3214  virtual void Reload( Manager* manager, const EFK_CHAR* path, const EFK_CHAR* key ) = 0;
3215  virtual bool IsConnected() = 0;
3216 };
3217 
3218 //----------------------------------------------------------------------------------
3219 //
3220 //----------------------------------------------------------------------------------
3221  }
3222 //----------------------------------------------------------------------------------
3223 //
3224 //----------------------------------------------------------------------------------
3225 
3226 #endif // #if !( defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE) )
3227 
3228 #endif // __EFFEKSEER_CLIENT_H__
3229 
3230 #ifndef __EFFEKSEER_CRITICALSESSION_H__
3231 #define __EFFEKSEER_CRITICALSESSION_H__
3232 
3233 //----------------------------------------------------------------------------------
3234 // Include
3235 //----------------------------------------------------------------------------------
3236 
3237 //----------------------------------------------------------------------------------
3238 //
3239 //----------------------------------------------------------------------------------
3240 namespace Effekseer
3241 {
3242 //----------------------------------------------------------------------------------
3243 //
3244 //----------------------------------------------------------------------------------
3249 {
3250 private:
3251 #ifdef _WIN32
3252  mutable CRITICAL_SECTION m_criticalSection;
3253 #elif defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE)
3254  mutable CONSOLE_GAME_MUTEX m_mutex;
3255 #else
3256  mutable pthread_mutex_t m_mutex;
3257 #endif
3258 
3259 public:
3260 
3261  CriticalSection();
3262 
3263  ~CriticalSection();
3264 
3265  void Enter() const;
3266 
3267  void Leave() const;
3268 };
3269 
3270 //----------------------------------------------------------------------------------
3271 //
3272 //----------------------------------------------------------------------------------
3273 }
3274 //----------------------------------------------------------------------------------
3275 //
3276 //----------------------------------------------------------------------------------
3277 #endif // __EFFEKSEER_CRITICALSESSION_H__
3278 
3279 #ifndef __EFFEKSEER_THREAD_H__
3280 #define __EFFEKSEER_THREAD_H__
3281 
3282 //----------------------------------------------------------------------------------
3283 // Include
3284 //----------------------------------------------------------------------------------
3285 
3286 //----------------------------------------------------------------------------------
3287 //
3288 //----------------------------------------------------------------------------------
3289 namespace Effekseer {
3290 //----------------------------------------------------------------------------------
3291 //
3292 //----------------------------------------------------------------------------------
3293 
3294 class Thread
3295 {
3296 private:
3297 #ifdef _WIN32
3298  /* DWORDを置きかえ */
3299  static unsigned long EFK_STDCALL ThreadProc(void* arguments);
3300 #elif defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE)
3301 
3302 #else
3303  static void* ThreadProc( void* arguments );
3304 #endif
3305 
3306 private:
3307 #ifdef _WIN32
3308  HANDLE m_thread;
3309 #elif defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE)
3310 
3311 #else
3312  pthread_t m_thread;
3313  bool m_running;
3314 #endif
3315 
3316  void* m_data;
3317  void (*m_mainProc)( void* );
3318  CriticalSection m_cs;
3319 
3320 public:
3321 
3322  Thread();
3323  ~Thread();
3324 
3325 
3332  bool Create( void (*threadFunc)( void* ), void* data );
3333 
3337  bool IsExitThread() const;
3338 
3342  bool Wait() const;
3343 };
3344 //----------------------------------------------------------------------------------
3345 //
3346 //----------------------------------------------------------------------------------
3347  }
3348 //----------------------------------------------------------------------------------
3349 //
3350 //----------------------------------------------------------------------------------
3351 #endif // __EFFEKSEER_VECTOR3D_H__
virtual int Release()
参照カウンタを減算する。0になった時、インスタンスを削除する。
Definition: Effekseer.h:436
virtual int AddRef()
参照カウンタを加算する。
Definition: Effekseer.h:424
エフェクトファイル読み込み破棄関数指定クラス
Definition: Effekseer.h:2390
標準のファイル読み込みクラス
Definition: Effekseer.h:1164
Definition: Effekseer.h:2604
Definition: Effekseer.h:2240
モデルパラメーター
Definition: Effekseer.h:1451
クリティカルセクション
Definition: Effekseer.h:3248
float Z
Z
Definition: Effekseer.h:557
virtual int GetRef()
参照カウンタを取得する。
Definition: Effekseer.h:431
ノードインスタンス生成クラス
Definition: Effekseer.h:1461
Model(void *data, int32_t size)
コンストラクタ
Definition: Effekseer.h:2633
Definition: Effekseer.h:2098
ModelLoader()
コンストラクタ
Definition: Effekseer.h:2518
virtual RandFunc GetRandFunc() const =0
ランダム関数を取得する。
サウンド読み込み破棄関数指定クラス
Definition: Effekseer.h:2954
virtual ~TextureLoader()
デストラクタ
Definition: Effekseer.h:2463
Definition: Effekseer.h:2029
virtual int GetRandMax() const =0
ランダム最大値を取得する。
ファイルアクセス用のファクトリクラス
Definition: Effekseer.h:1127
uint8_t A
透明度
Definition: Effekseer.h:683
Definition: Effekseer.h:2189
エフェクト管理クラス
Definition: Effekseer.h:1528
Definition: Effekseer.h:2244
Definition: Effekseer.h:2578
テクスチャデータ
Definition: Effekseer.h:455
行列
Definition: Effekseer.h:944
Definition: Effekseer.h:1183
SoundLoader()
コンストラクタ
Definition: Effekseer.h:2960
virtual ~EffectLoader()
デストラクタ
Definition: Effekseer.h:2401
Definition: Effekseer.h:2102
Definition: Effekseer.h:50
テクスチャ読み込み破棄関数指定クラス
Definition: Effekseer.h:2452
モデル読み込み破棄関数指定クラス
Definition: Effekseer.h:2512
virtual void Unload(TextureData *data)
テクスチャを破棄する。
Definition: Effekseer.h:2483
float X
X
Definition: Effekseer.h:495
四角形
Definition: Effekseer.h:727
virtual void * Load(const EFK_CHAR *path)
サウンドを読み込む。
Definition: Effekseer.h:2975
エフェクトパラメータークラス
Definition: Effekseer.h:1245
virtual ~Model()
デストラクタ
Definition: Effekseer.h:2702
Definition: Effekseer.h:2169
4x3行列
Definition: Effekseer.h:784
Definition: Effekseer.h:2895
virtual ~SoundLoader()
デストラクタ
Definition: Effekseer.h:2965
ファイル読み込みクラス
Definition: Effekseer.h:1083
virtual void Unload(void *source)
サウンドを破棄する。
Definition: Effekseer.h:2984
Definition: Effekseer.h:1204
3次元ベクトル
Definition: Effekseer.h:541
3次元ベクトル
Definition: Effekseer.h:489
ファイル書き込みクラス
Definition: Effekseer.h:1104
float X
X
Definition: Effekseer.h:547
参照カウンタのインターフェース
Definition: Effekseer.h:381
共通描画パラメーター
Definition: Effekseer.h:1430
Definition: Effekseer.h:2173
virtual void * Load(const EFK_CHAR *path)
モデルを読み込む。
Definition: Effekseer.h:2533
Definition: Effekseer.h:2588
Definition: Effekseer.h:2308
Definition: Effekseer.h:3134
Definition: Effekseer.h:663
float Y
Y
Definition: Effekseer.h:500
Definition: Effekseer.h:2312
virtual ~ModelLoader()
デストラクタ
Definition: Effekseer.h:2523
Definition: Effekseer.h:2599
uint8_t R
Definition: Effekseer.h:668
EffectLoader()
コンストラクタ
Definition: Effekseer.h:2396
モデルクラス
Definition: Effekseer.h:2573
Definition: Effekseer.h:2033
Definition: Effekseer.h:3202
Definition: Effekseer.h:3294
設定クラス
Definition: Effekseer.h:3016
Definition: Effekseer.h:2892
TextureLoader()
コンストラクタ
Definition: Effekseer.h:2458
virtual TextureData * Load(const EFK_CHAR *path, TextureType textureType)
テクスチャを読み込む。
Definition: Effekseer.h:2474
float Y
Y
Definition: Effekseer.h:552
参照カウンタオブジェクト
Definition: Effekseer.h:409
uint8_t B
Definition: Effekseer.h:678
uint8_t G
Definition: Effekseer.h:673
virtual void Unload(void *data)
モデルを破棄する。
Definition: Effekseer.h:2542