2 #ifndef __EFFEKSEER_BASE_PRE_H__ 3 #define __EFFEKSEER_BASE_PRE_H__ 22 #define EFK_STDCALL __stdcall 33 #elif defined(_PSVITA) 34 #include "Effekseer.PSVita.h" 36 #include "Effekseer.PS4.h" 37 #elif defined(_SWITCH) 38 #include "Effekseer.Switch.h" 39 #elif defined(_XBOXONE) 40 #include "Effekseer.XBoxOne.h" 70 class ParticleRenderer;
124 #define ES_SAFE_ADDREF(val) if ( (val) != NULL ) { (val)->AddRef(); } 125 #define ES_SAFE_RELEASE(val) if ( (val) != NULL ) { (val)->Release(); (val) = NULL; } 126 #define ES_SAFE_DELETE(val) if ( (val) != NULL ) { delete (val); (val) = NULL; } 127 #define ES_SAFE_DELETE_ARRAY(val) if ( (val) != NULL ) { delete [] (val); (val) = NULL; } 129 #define EFK_ASSERT(x) assert(x) 265 template <
typename T,
typename U>
278 template <
typename T,
typename U>
291 template <
typename T,
typename U,
typename V>
323 if (dst_size == 0)
return 0;
327 for (cnt = 0; cnt < dst_size; )
334 if ((wc & ~0x7f) == 0)
338 }
else if ((wc & ~0x7ff) == 0)
340 *cp++ = ((wc >> 6) & 0x1f) | 0xc0;
341 *cp++ = ((wc) & 0x3f) | 0x80;
344 *cp++ = ((wc >> 12) & 0xf) | 0xe0;
345 *cp++ = ((wc >> 6) & 0x3f) | 0x80;
346 *cp++ = ((wc) & 0x3f) | 0x80;
366 if (dst_size == 0)
return 0;
370 for (i = 0; i < dst_size; i++)
386 else if (code >= 12 && code <= 13)
390 wc = ((c0 & 0x1F) << 6) | (c1 & 0x3F);
397 wc = ((c0 & 0x0F) << 12) | ((c1 & 0x3F) << 6) | (c2 & 0x3F);
441 template <
typename T>
457 return std::unique_ptr<T, ReferenceDeleter<T>>(
nullptr);
464 return std::unique_ptr<T, ReferenceDeleter<T>>(ptr);
477 mutable std::atomic<int32_t> m_reference;
490 std::atomic_fetch_add_explicit(&m_reference, 1, std::memory_order_consume);
502 bool destroy = std::atomic_fetch_sub_explicit(&m_reference, 1, std::memory_order_consume) == 1;
644 #ifdef __EFFEKSEER_BUILD_VERSION16__ 655 #ifdef __EFFEKSEER_BUILD_VERSION16__ 659 bool EnableInterpolation =
false;
674 #endif // __EFFEKSEER_BASE_PRE_H__ 675 #ifndef __EFFEKSEER_CUSTOM_ALLOCATOR_H__ 676 #define __EFFEKSEER_CUSTOM_ALLOCATOR_H__ 792 template <
class T>
using CustomVector = std::vector<T, CustomAllocator<T>>;
794 template <
class T>
using CustomList = std::list<T, CustomAllocator<T>>;
800 #endif // __EFFEKSEER_BASE_PRE_H__ 801 #ifndef __EFFEKSEER_VECTOR2D_H__ 802 #define __EFFEKSEER_VECTOR2D_H__ 851 #endif // __EFFEKSEER_VECTOR3D_H__ 853 #ifndef __EFFEKSEER_VECTOR3D_H__ 854 #define __EFFEKSEER_VECTOR3D_H__ 974 #endif // __EFFEKSEER_VECTOR3D_H__ 976 #ifndef __EFFEKSEER_COLOR_H__ 977 #define __EFFEKSEER_COLOR_H__ 1001 #pragma pack(push,1) 1053 #endif // __EFFEKSEER_COLOR_H__ 1055 #ifndef __EFFEKSEER_RECTF_H__ 1056 #define __EFFEKSEER_RECTF_H__ 1101 #endif // __EFFEKSEER_RECTF_H__ 1103 #ifndef __EFFEKSEER_MATRIX43_H__ 1104 #define __EFFEKSEER_MATRIX43_H__ 1270 #endif // __EFFEKSEER_MATRIX43_H__ 1272 #ifndef __EFFEKSEER_MATRIX44_H__ 1273 #define __EFFEKSEER_MATRIX44_H__ 1298 #pragma pack(push,1) 1419 #endif // __EFFEKSEER_MATRIX44_H__ 1421 #ifndef __EFFEKSEER_FILE_H__ 1422 #define __EFFEKSEER_FILE_H__ 1449 virtual void Seek(
int position) = 0;
1470 virtual void Flush() = 0;
1472 virtual void Seek(
int position) = 0;
1508 #endif // __EFFEKSEER_FILE_H__ 1510 #ifndef __EFFEKSEER_DEFAULT_FILE_H__ 1511 #define __EFFEKSEER_DEFAULT_FILE_H__ 1540 void Seek(
int position );
1561 void Seek(
int position );
1586 #endif // __EFFEKSEER_DEFAULT_FILE_H__ 1588 #ifndef __EFFEKSEER_EFFECT_H__ 1589 #define __EFFEKSEER_EFFECT_H__ 1784 virtual const char*
GetName()
const;
1859 virtual const char16_t*
GetName()
const = 0;
1948 virtual void*
GetWave(
int n )
const = 0;
1964 virtual void*
GetModel(
int n )
const = 0;
2232 #endif // __EFFEKSEER_EFFECT_H__ 2234 #ifndef __EFFEKSEER_MANAGER_H__ 2235 #define __EFFEKSEER_MANAGER_H__ 2292 static Manager*
Create(
int instance_max,
bool autoFlip =
true );
2761 virtual void Flip() = 0;
2771 virtual void Update(
float deltaFrame = 1.0
f ) = 0;
2931 #endif // __EFFEKSEER_MANAGER_H__ 2933 #ifndef __EFFEKSEER_EFFECTLOADER_H__ 2934 #define __EFFEKSEER_EFFECTLOADER_H__ 2993 #endif // __EFFEKSEER_EFFECTLOADER_H__ 2995 #ifndef __EFFEKSEER_TEXTURELOADER_H__ 2996 #define __EFFEKSEER_TEXTURELOADER_H__ 3072 #endif // __EFFEKSEER_TEXTURELOADER_H__ 3074 #ifndef __EFFEKSEER_MODELLOADER_H__ 3075 #define __EFFEKSEER_MODELLOADER_H__ 3147 #endif // __EFFEKSEER_MODELLOADER_H__ 3149 #ifndef __EFFEKSEER_MATERIALLOADER_H__ 3150 #define __EFFEKSEER_MATERIALLOADER_H__ 3223 #endif // __EFFEKSEER_TEXTURELOADER_H__ 3225 #ifndef __EFFEKSEER_MODEL_H__ 3226 #define __EFFEKSEER_MODEL_H__ 3289 struct InternalModel
3298 InternalModel* models;
3319 memcpy(m_data,
data, m_size);
3323 memcpy(&m_version,
p,
sizeof(
int32_t));
3327 if (m_version == 2 || m_version >= 5)
3333 memcpy(&m_modelCount,
p,
sizeof(
int32_t));
3338 memcpy(&m_frameCount,
p,
sizeof(
int32_t));
3346 models =
new InternalModel[m_frameCount];
3350 memcpy(&models[
f].m_vertexCount,
p,
sizeof(
int32_t));
3355 models[
f].m_vertexes = (
Vertex*)
p;
3356 p += (
sizeof(
Vertex) * models[
f].m_vertexCount);
3361 models[
f].m_vertexes =
new Vertex[models[
f].m_vertexCount];
3363 for (
int32_t i = 0; i < models[
f].m_vertexCount; i++)
3365 memcpy((
void*)&models[
f].m_vertexes[i],
p,
sizeof(
Vertex) -
sizeof(
Color));
3366 models[
f].m_vertexes[i].
VColor =
Color(255, 255, 255, 255);
3372 memcpy(&models[
f].m_faceCount,
p,
sizeof(
int32_t));
3375 models[
f].m_faces = (
Face*)
p;
3376 p += (
sizeof(
Face) * models[
f].m_faceCount);
3419 float p1 =
g->GetRand();
3420 float p2 =
g->GetRand();
3423 if( p1 + p2 > 1.0
f )
3429 float p0 = 1.0f - p1 - p2;
3432 emitter.
Position = (
v0.Position * p0 +
v1.Position * p1 +
v2.Position * p2) * magnification;
3434 emitter.
Binormal =
v0.Binormal * p0 +
v1.Binormal * p1 +
v2.Binormal * p2;
3435 emitter.
Tangent =
v0.Tangent * p0 +
v1.Tangent * p1 +
v2.Tangent * p2;
3457 emitter.
Position =
v.Position * magnification;
3481 emitter.
Position =
v.Position * magnification;
3508 float p0 = 1.0f / 3.0f;
3509 float p1 = 1.0f / 3.0f;
3510 float p2 = 1.0f / 3.0f;
3513 emitter.
Position = (
v0.Position * p0 +
v1.Position * p1 +
v2.Position * p2) * magnification;
3515 emitter.
Binormal =
v0.Binormal * p0 +
v1.Binormal * p1 +
v2.Binormal * p2;
3516 emitter.
Tangent =
v0.Tangent * p0 +
v1.Tangent * p1 +
v2.Tangent * p2;
3539 float p0 = 1.0f / 3.0f;
3540 float p1 = 1.0f / 3.0f;
3541 float p2 = 1.0f / 3.0f;
3544 emitter.
Position = (
v0.Position * p0 +
v1.Position * p1 +
v2.Position * p2) * magnification;
3546 emitter.
Binormal =
v0.Binormal * p0 +
v1.Binormal * p1 +
v2.Binormal * p2;
3547 emitter.
Tangent =
v0.Tangent * p0 +
v1.Tangent * p1 +
v2.Tangent * p2;
3568 #endif // __EFFEKSEER_MODEL_H__ 3570 #ifndef __EFFEKSEER_SOUND_PLAYER_H__ 3571 #define __EFFEKSEER_SOUND_PLAYER_H__ 3632 #endif // __EFFEKSEER_SOUND_PLAYER_H__ 3634 #ifndef __EFFEKSEER_SOUNDLOADER_H__ 3635 #define __EFFEKSEER_SOUNDLOADER_H__ 3707 #endif // __EFFEKSEER_SOUNDLOADER_H__ 3709 #ifndef __EFFEKSEER_LOADER_H__ 3710 #define __EFFEKSEER_LOADER_H__ 3724 class EffectFactory;
3745 std::vector<EffectFactory*> effectFactories;
3883 #endif // __EFFEKSEER_LOADER_H__ 3885 #ifndef __EFFEKSEER_SERVER_H__ 3886 #define __EFFEKSEER_SERVER_H__ 3888 #if !( defined(_PSVITA) || defined(_XBOXONE) ) 3932 virtual void Stop() = 0;
4001 #endif // #if !( defined(_PSVITA) || defined(_XBOXONE) ) 4003 #endif // __EFFEKSEER_SERVER_H__ 4005 #ifndef __EFFEKSEER_CLIENT_H__ 4006 #define __EFFEKSEER_CLIENT_H__ 4008 #if !( defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE) ) 4030 virtual void Stop()= 0;
4045 #endif // #if !( defined(_PSVITA) || defined(_PS4) || defined(_SWITCH) || defined(_XBOXONE) ) 4047 #endif // __EFFEKSEER_CLIENT_H__ virtual int Release()
参照カウンタを減算する。0になった時、インスタンスを削除する。
TextureFormatType TextureFormat
A class to edit an instance of EffectParameter for supporting original format when a binary is loaded...
virtual int AddRef()
参照カウンタを加算する。
virtual void SetRemovingCallback(Handle handle, EffectInstanceRemovingCallback callback)=0
エフェクトのインスタンスに廃棄時のコールバックを設定する。
virtual bool GetPaused(Handle handle)=0
Get status that a particle of effect specified is paused. Particle's handle.
virtual EffectNode * GetRoot() const =0
Rootを取得する。
virtual int GetChildrenCount() const =0
子のノードの数を取得する。
virtual const EFK_CHAR * GetWavePath(int n) const =0
Get a wave's path.
GLenum GLuint GLint GLenum face
virtual void OnLoadingResource(Effect *effect, const void *data, int32_t size, const EFK_CHAR *materialPath)
this method is called when load resources
virtual void * GetModel(int n) const =0
格納されているモデルのポインタを取得する。
virtual void SetFreeFunc(FreeFunc func)=0
TextureLoader * GetTextureLoader()
テクスチャローダーを取得する。
virtual Setting * GetSetting()=0
設定クラスを取得する。
Matrix44 & PerspectiveFovLH_OpenGL(float ovY, float aspect, float zn, float zf)
OpenGL用射影行列化(左手系)
virtual int GetDrawTime() const =0
Draw処理時間を取得。
DefaultFileReader(FILE *filePtr)
int32_t LastInstanceEndMin
Minimum end time that the last instance may exist.
virtual void CreateCullingWorld(float xsize, float ysize, float zsize, int32_t layerCount)=0
エフェクトをカリングし描画負荷を減らすための空間を生成する。
Vector2D Position() const
static float Length(const Vector3D &in)
長さ
RendererMaterialType MaterialType
virtual ReferenceObject * GetLoadingParameter() const =0
Get loading parameter supecfied by EffectFactory. This parameter is not used unless EffectFactory is ...
bool IsRefractionRequired
Textures used by material.
Vector3D operator *(const float &o) const
void RotationZ(float angle)
反時計周り方向のZ軸回転行列化を行う。
void SetMallocFunc(MallocFunc func)
virtual void ReloadResources(const void *data=nullptr, int32_t size=0, const EFK_CHAR *materialPath=nullptr)=0
画像等リソースの再読み込みを行う。
virtual const EFK_CHAR * GetMaterialPath(int n) const =0
Get a material's path.
virtual void * Load(const void *data, int32_t size)
a function called when sound is loaded data pointer the size of data a pointer of loaded texture
CoordinateSystem GetCoordinateSystem() const
座標系を取得する。
void RotationZ(float angle)
Z軸回転行列(右手)
virtual void SetModelRenderer(ModelRenderer *renderer)=0
モデル描画機能を設定する。
virtual TrackRenderer * GetTrackRenderer()=0
軌跡描画機能を取得する。
#define ES_SAFE_DELETE_ARRAY(val)
virtual EffectInstanceTerm CalculateInstanceTerm(EffectInstanceTerm &parentTerm) const =0
Calculate a term of instances where instances exists.
Model parameter It may change greatly.
Terms where an effect exists.
int32_t Type
0 - color, 1 - value
static Vector3D & Cross(Vector3D &o, const Vector3D &in1, const Vector3D &in2)
外積
virtual int32_t GetColorImageCount() const =0
格納されている画像のポインタの個数を取得する。
int32_t ConvertUtf8ToUtf16(int16_t *dst, int32_t dst_size, const int8_t *src)
文字コードを変換する。(UTF8 -> UTF16)
Parameters for Manager::Draw and Manager::DrawHandle.
ModelLoader * GetModelLoader()
モデルローダーを取得する。
GLdouble GLdouble GLdouble r
virtual int32_t GetDistortionImageCount() const =0
格納されている歪み画像のポインタの個数を取得する。
virtual void SetRotation(Handle handle, float x, float y, float z)=0
エフェクトのインスタンスの回転角度を指定する。(ラジアン)
int32_t GetFaceCount(int32_t index=0)
void SetLoadingParameter(Effect *effect, ReferenceObject *obj)
set loading data
void SetFreeFunc(FreeFunc func)
void deallocate(T *p, std::size_t n)
GLint GLint GLsizei width
virtual void SetAutoDrawing(Handle handle, bool autoDraw)=0
エフェクトがDrawで描画されるか設定する。 autoDrawがfalseの場合、DrawHandleで描画する必要がある。
int32_t ColorTextureIndex
virtual int GetRef()
参照カウンタを取得する。
virtual MallocFunc GetMallocFunc() const =0
get an allocator
void RotationXYZ(float rx, float ry, float rz)
反時計周り方向のXYZ軸回転行列化を行う。
Model(void *data, int32_t size)
Constructor.
EffectLoader * GetEffectLoader()
エフェクトローダーを取得する。
virtual void SetTrackRenderer(TrackRenderer *renderer)=0
軌跡描画機能を設定する。
virtual EffectBasicRenderParameter GetBasicRenderParameter()=0
共通描画パラメーターを取得する。
T Clamp(T t, U max_, V min_)
範囲内値取得
virtual int GetGeneration() const =0
Get a generation in the node tree. The generation increases by 1 as it moves a child node.
static Effect * Create(Manager *manager, void *data, int32_t size, float magnification=1.0f, const EFK_CHAR *materialPath=NULL)
エフェクトを生成する。
virtual void SetBasicRenderParameter(EffectBasicRenderParameter param)=0
共通描画パラメーターを設定する。
Matrix44 & OrthographicLH(float width, float height, float zn, float zf)
正射影行列化(左手系)
virtual bool OnCheckIsBinarySupported(const void *data, int32_t size)
this method is called to check whether loaded binary are supported.
virtual size_t Read(void *buffer, size_t size)=0
virtual EffectModelParameter GetEffectModelParameter()=0
Get a model parameter.
static void Add(Vector3D *pOut, const Vector3D *pIn1, const Vector3D *pIn2)
加算
virtual void RessignCulling()=0
現在存在するエフェクトのハンドルからカリングの空間を配置しなおす。
virtual int32_t GetRestInstancesCount() const =0
Gets the number of remaining allocated instances.
virtual void Destroy()=0
マネージャーを破棄する。
This object generates random values.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Vector3D operator -(const Vector3D &o) const
virtual bool Reload(void *data, int32_t size, const EFK_CHAR *materialPath=nullptr, ReloadingThreadType reloadingThreadType=ReloadingThreadType::Main)=0
Reload this effect An effect's data An effect's size A path where reaources are loaded A thread where...
void RotationY(float angle)
Y軸回転行列(右手)
size_t Read(void *buffer, size_t size)
void SetModelLoader(ModelLoader *loader)
モデルローダーを設定する。
virtual RandFunc GetRandFunc() const =0
ランダム関数を取得する。
void GetRotation(Matrix43 &r) const
行列から回転行列を取得する。
virtual float GetSpeed(Handle handle) const =0
Get a playing speed of particle of effect. Particle's handle Speed.
AlphaBlendType AlphaBlend
Matrix44 & PerspectiveFovRH_OpenGL(float ovY, float aspect, float zn, float zf)
OpenGL用射影行列化(右手系)
virtual void Stop(SoundHandle handle, SoundTag tag)=0
virtual void SetMatrix(Handle handle, const Matrix43 &mat)=0
エフェクトのインスタンスに変換行列を設定する。
virtual void SetEffectLoader(EffectLoader *effectLoader)=0
エフェクト読込クラスを設定する。
virtual int GetLayer(Handle handle)=0
Get a layer index For example, if effect's layer is 1 and CameraCullingMask's first bit is 1,...
virtual bool IsConnected()=0
virtual void SetRandMax(int max_)=0
ランダム関数を設定する。
virtual bool CheckPlaying(SoundHandle handle, SoundTag tag)=0
ShadingModelType ShadingModel
static Vector3D & TransformWithW(Vector3D &o, const Vector3D &in, const Matrix44 &mat)
virtual const char * GetName() const
virtual bool GetShown(Handle handle)=0
Get status that a particle of effect specified is shown. Particle's handle.
virtual void SetSoundLoader(SoundLoader *soundLoader)=0
サウンド読込クラスを設定する。
Matrix44 & LookAtRH(const Vector3D &eye, const Vector3D &at, const Vector3D &up)
カメラ行列化(右手系)
int32_t FirstInstanceEndMax
Maximum end time that the first instance may exist.
Handle bool isRemovingManager
virtual ~TextureLoader()
デストラクタ
virtual ModelLoader * GetModelLoader()=0
モデル読込クラスを取得する。
TextureWrapType TextureWrap2
GLuint const GLchar * name
virtual void Stop()=0
stop a server
void ToMatrix44(Matrix44 &dst)
convert into matrix44
int32_t MaterialIndex
material index in MaterialType::File
Vector3D & operator/=(const float &o)
static Server * Create()
create a server instance
virtual int GetRandMax() const =0
ランダム最大値を取得する。
virtual MaterialData * GetMaterial(int n) const =0
Get a material's pointer.
Vector3D & operator -=(const Vector3D &o)
T * allocate(std::size_t n)
virtual MaterialLoader * GetMaterialLoader()=0
get a material loader loader
virtual Matrix43 GetMatrix(Handle handle)=0
エフェクトのインスタンスに設定されている行列を取得する。
virtual EffectNode * GetChild(int index) const =0
子のノードを取得する。
Vector3D & operator+=(const Vector3D &o)
GLfloat GLfloat GLfloat v2
const int32_t TextureSlotMax
the maximum number of texture slot including textures system specified
TextureFilterType FilterType
AlphaBlendType AlphaBlend
static Vector3D & Transform(Vector3D &o, const Vector3D &in, const Matrix43 &mat)
MaterialLoader * GetMaterialLoader()
get a material loader loader
virtual void SetTargetLocation(Handle handle, float x, float y, float z)=0
エフェクトのインスタンスのターゲット位置を指定する。
virtual size_t GetLength()=0
Matrix44 & Indentity()
単位行列化
Emitter GetEmitterFromVertex(IRandObject *g, int32_t time, CoordinateSystem coordinate, float magnification)
virtual FreeFunc GetFreeFunc() const =0
get a deallocator
static Matrix44 & Mul(Matrix44 &o, const Matrix44 &in1, const Matrix44 &in2)
乗算
static Vector3D & Sub(Vector3D &o, const Vector3D &in1, const Vector3D &in2)
減算
virtual bool Exists(Handle handle)=0
エフェクトのインスタンスが存在しているか取得する。
Matrix44 & LookAtLH(const Vector3D &eye, const Vector3D &at, const Vector3D &up)
カメラ行列化(左手系)
virtual void PauseTag(SoundTag tag, bool pause)=0
bool operator!=(const CustomAllocator< T > &, const CustomAllocator< U > &)
virtual TextureData * Load(const void *data, int32_t size, TextureType textureType)
a function called when texture is loaded data pointer the size of data a kind of texture a pointer of...
virtual void SetRandFunc(RandFunc func)=0
ランダム関数を設定する。
static float Dot(const Vector3D &in1, const Vector3D &in2)
内積
bool operator==(const Vector3D &o)
virtual int GetRef()=0
参照カウンタを取得する。
virtual void SetRingRenderer(RingRenderer *renderer)=0
リング描画機能を設定する。
float DistortionIntensity
TextureWrapType TextureWrap1
virtual void SetSpriteRenderer(SpriteRenderer *renderer)=0
スプライト描画機能を設定する。
Emitter GetEmitterFromFace(IRandObject *g, int32_t time, CoordinateSystem coordinate, float magnification)
virtual void Seek(int position)=0
virtual SpriteRenderer * GetSpriteRenderer()=0
スプライト描画機能を取得する。
Vertex * GetVertexes(int32_t index=0) const
int(EFK_STDCALL * RandFunc)(void)
Random Function.
void RotationAxis(const Vector3D &axis, float angle)
任意軸に対する反時計周り方向回転行列化を行う。
virtual const EFK_CHAR * GetColorImagePath(int n) const =0
Get a color image's path.
std::vector< T, CustomAlignedAllocator< T > > CustomAlignedVector
void RotationX(float angle)
反時計周り方向のX軸回転行列化を行う。
virtual void AddLocation(Handle handle, const Vector3D &location)=0
エフェクトのインスタンスの位置に加算する。
virtual Handle Play(Effect *effect, float x, float y, float z)=0
再生する。
virtual EffectTerm CalculateTerm() const =0
void operator()(T *ptr) const
virtual Matrix43 GetBaseMatrix(Handle handle)=0
エフェクトのベース行列を取得する。
void SetAlignedFreeFunc(AlignedFreeFunc func)
virtual FileReader * OpenRead(const EFK_CHAR *path)=0
virtual size_t GetLength()=0
virtual void SetModelLoader(ModelLoader *modelLoader)=0
モデル読込クラスを設定する。
virtual ~EffectLoader()
デストラクタ
virtual void SetMaterialLoader(MaterialLoader *loader)=0
specfiy a material loader loader
virtual const char16_t * GetName() const =0
Get this effect's name. If this effect is loaded from file, default name is file name without extenti...
static Manager * Create(int instance_max, bool autoFlip=true)
マネージャーを生成する。
bool IsDepthOffsetScaledWithCamera
virtual EffectLoader * GetEffectLoader()=0
エフェクト読込クラスを取得する。
Terms where instances exists.
virtual SoundHandle Play(SoundTag tag, const InstanceParameter ¶meter)=0
virtual int GetPosition()=0
static Color Mul(Color in1, Color in2)
乗算
virtual void SetShown(Handle handle, bool shown)=0
エフェクトのインスタンスをDraw時に描画するか設定する。
size_t Write(const void *buffer, size_t size)
virtual void SetBaseMatrix(Handle handle, const Matrix43 &mat)=0
エフェクトのベース行列を設定する。
virtual int AddRef()=0
参照カウンタを加算する。
void SetEffectLoader(EffectLoader *loader)
エフェクトローダーを設定する。
virtual void Pause(SoundHandle handle, SoundTag tag, bool pause)=0
void SetSoundLoader(SoundLoader *loader)
サウンドローダーを設定する。
virtual bool OnLoading(Effect *effect, const void *data, int32_t size, float magnification, const EFK_CHAR *materialPath)
this method is called when load a effect from binary
int32_t TermMax
Maximum end time that the effect may exist.
typedef void(EFK_STDCALL *EffectInstanceRemovingCallback)(Manager *manager
エフェクトのインスタンス破棄時のコールバックイベント
bool IsValid() const
check whether all values are not valid number(not nan, not inf)
virtual void Update(float deltaFrame=1.0f)=0
Update all effects. passed time (1 is 1/60 seconds)
Vector3D & operator *=(const float &o)
GLsizei const GLfloat * value
virtual void SetMaterialPath(const EFK_CHAR *materialPath)=0
Specify root path to load materials.
virtual TextureLoader * GetTextureLoader()=0
テクスチャ読込クラスを取得する。
virtual void CalcCulling(const Matrix44 &cameraProjMat, bool isOpenGL)=0
カリングを行い、カリングされたオブジェクトのみを描画するようにする。
void(EFK_STDCALL * FreeFunc)(void *p, unsigned int size)
Memory Free function.
GLenum GLuint GLint GLint layer
bool operator==(const CustomAllocator< T > &, const CustomAllocator< U > &)
virtual int GetUpdateTime() const =0
Update処理時間を取得。
virtual void Unload(TextureData *data)
テクスチャを破棄する。
virtual float GetDynamicInput(Handle handle, int32_t index)=0
get a dynamic parameter, which changes effect parameters dynamically while playing
std::vector< std::array< float, 4 > > MaterialUniforms
used uniforms in MaterialType::File
virtual void DrawHandleBack(Handle handle, const Manager::DrawParameter &drawParameter=Manager::DrawParameter())=0
Draw particles in the back of priority 0.
CustomAlignedAllocator(const CustomAlignedAllocator< U > &)
virtual void SetCoordinateSystem(CoordinateSystem coordinateSystem)=0
座標系を設定する。
virtual bool OnCheckIsReloadSupported()
this method is called to check whether reloading are supported.
virtual void * Load(const EFK_CHAR *path)
サウンドを読み込む。
virtual const EFK_CHAR * GetDistortionImagePath(int n) const =0
Get a distortion image's path.
std::unique_ptr< T, ReferenceDeleter< T > > CreateUniqueReference(T *ptr, bool addRef=false)
virtual void * Load(const void *data, int32_t size)
a function called when model is loaded data pointer the size of data a pointer of loaded texture
virtual void SetRibbonRenderer(RibbonRenderer *renderer)=0
ストライプ描画機能を設定する。
int32_t FirstInstanceStartMin
Minimum start time that the first instance may exist.
void RotationX(float angle)
X軸回転行列(右手)
virtual void Unregister(Effect *effect)=0
unregister an effect an effect registered
bool HasMipmap
for OpenGL, it is ignored in other apis
MaterialLoader()=default
Constructor.
virtual void SetSoundPlayer(SoundPlayer *soundPlayer)=0
サウンド再生機能を設定する。
virtual ~Model()
Destructor.
Material parameter for shaders.
virtual void EndUpdate()=0
Stop to update effects. It is not required if Update is called.
GLsizei GLsizei GLchar * source
Matrix44 & PerspectiveFovLH(float ovY, float aspect, float zn, float zf)
射影行列化(左手系)
virtual bool Load(const EFK_CHAR *path, void *&data, int32_t &size)=0
エフェクトファイルを読み込む。
virtual void DrawHandle(Handle handle, const Manager::DrawParameter &drawParameter=Manager::DrawParameter())=0
Draw particles with a handle.
void Quaternion(float x, float y, float z, float w)
クオータニオンから行列に変換
Matrix44 & Transpose()
転置行列化
GLint GLint GLint GLint GLint GLint y
const T & min_(const T &a, const T &b)
returns minimum of two values. Own implementation to get rid of the STL (VS6 problems)
virtual ~SoundLoader()
デストラクタ
std::vector< T, CustomAllocator< T > > CustomVector
virtual void SetPausedToAllEffects(bool paused)=0
Pause or resume all particle of effects. Pause or resume.
AlignedFreeFunc GetAlignedFreeFunc()
get a deallocator
SoundLoader * GetSoundLoader()
サウンドローダーを取得する。
void SetMaterial(Effect *effect, int32_t index, MaterialData *data)
set material data into specified index
virtual void Unload(void *source)
サウンドを破棄する。
int32_t GetEffectFactoryCount() const
Get the number of effect factory.
void RotationY(float angle)
反時計周り方向のY軸回転行列化を行う。
FreeFunc GetFreeFunc()
get a deallocator
virtual SoundLoader * GetSoundLoader()=0
サウンド読込クラスを取得する
virtual void SetLocation(Handle handle, float x, float y, float z)=0
エフェクトのインスタンスの位置を指定する。
void Translation(float x, float y, float z)
移動行列化を行う。
virtual void SetDynamicInput(Handle handle, int32_t index, float value)=0
specfiy a dynamic parameter, which changes effect parameters dynamically while playing
virtual int32_t GetMaterialCount() const =0
Get the number of stored material pointer.
virtual ~IRandObject()=default
const T & max_(const T &a, const T &b)
returns maximum of two values. Own implementation to get rid of the STL (VS6 problems)
void SetSound(Effect *effect, int32_t index, void *data)
set sound data into specified index
void SetTexture(Effect *effect, int32_t index, TextureType type, TextureData *data)
set texture data into specified index
virtual int GetVersion() const =0
エフェクトデータのバージョン取得
virtual void SetLayer(Handle handle, int32_t layer)=0
Set a layer index.
virtual ~FileInterface()=default
T * allocate(std::size_t n)
static float LengthSq(const Vector3D &in)
長さの二乗
virtual int32_t GetModelCount() const =0
格納されているモデルのポインタの個数を取得する。
virtual MaterialData * Load(const void *data, int32_t size, MaterialFileType fileType)
a function called when a material is loaded data pointer the size of data file type a pointer of load...
virtual void Register(const EFK_CHAR *key, Effect *effect)=0
register an effect as a target to edit. a key to search an effect an effect to be edit
static Matrix44 & Inverse(Matrix44 &o, const Matrix44 &in)
逆行列
void SetTextureLoader(TextureLoader *loader)
テクスチャローダーを設定する。
virtual void * Load(const EFK_CHAR *path)
モデルを読み込む。
void GetSRT(Vector3D &s, Matrix43 &r, Vector3D &t) const
行列を、拡大、回転、移動の行列とベクトルに分解する。
AlignedMallocFunc GetAlignedMallocFunc()
get an allocator
static void Normal(Vector3D &o, const Vector3D &in)
単位ベクトル
void GetTranslation(Vector3D &t) const
行列から移動ベクトルを取得する。
virtual void Unload(MaterialData *data)
dispose a material a pointer of loaded a material
virtual Vector3D GetLocation(Handle handle)=0
エフェクトのインスタンスの位置を取得する。
std::set< T, std::less< T >, CustomAllocator< T > > CustomSet
virtual int32_t GetWaveCount() const =0
格納されている音波形のポインタの個数を取得する。
virtual float GetMaginification() const =0
Get the magnification multiplied by the magnification at the time of loaded and exported.
int32_t GetVertexCount(int32_t index=0)
int32_t LastInstanceStartMax
Maximum start time that the last instance may exist.
A server to edit effect from client such an editor.
virtual void Unload(void *data, int32_t size)=0
エフェクトファイルを破棄する。
virtual void StopRoot(Handle handle)=0
エフェクトのルートだけを停止する。
virtual FileReader * TryOpenRead(const EFK_CHAR *path)
try to open a reader. It need not to succeeds in opening it.
static Color Lerp(const Color in1, const Color in2, float t)
線形補間
void RotationZXY(float rz, float rx, float ry)
反時計周り方向のZXY軸回転行列化を行う。
virtual int GetPosition()=0
virtual TextureData * GetDistortionImage(int n) const =0
格納されている歪み画像のポインタを取得する。
Emitter GetEmitterFromVertex(int32_t index, int32_t time, CoordinateSystem coordinate, float magnification)
std::vector< MaterialTextureParameter > MaterialTextures
used textures in MaterialType::File
Vector3D operator+(const Vector3D &o) const
virtual FileWriter * OpenWrite(const EFK_CHAR *path)=0
virtual void StopAllEffects()=0
全てのエフェクトを停止する。
int32_t ConvertUtf16ToUtf8(int8_t *dst, int32_t dst_size, const int16_t *src)
文字コードを変換する。(UTF16 -> UTF8)
virtual void Reload(const EFK_CHAR *key, void *data, int32_t size)=0
virtual void StopEffect(Handle handle)=0
エフェクトを停止する。
int32_t FirstInstanceStartMax
Maximum start time that the first instance may exist.
Emitter GetEmitter(IRandObject *g, int32_t time, CoordinateSystem coordinate, float magnification)
virtual void SetAllColor(Handle handle, Color color)=0
Specify the color of overall effect.
virtual int GetCameraCullingMaskToShowAllEffects()=0
Get a camera's culling mask to show all effects.
void SetAlignedMallocFunc(AlignedMallocFunc func)
GLboolean GLboolean GLboolean b
virtual float GetRand()=0
virtual ~ModelLoader()
デストラクタ
static void Multiple(Matrix43 &out, const Matrix43 &in1, const Matrix43 &in2)
行列同士の乗算を行う。
virtual void DrawHandleFront(Handle handle, const Manager::DrawParameter &drawParameter=Manager::DrawParameter())=0
Draw particles in the front of priority 0.
Vector2D & operator+=(const Vector2D &value)
virtual void SetSetting(Setting *setting)=0
設定クラスを設定する。
virtual ModelRenderer * GetModelRenderer()=0
モデル描画機能を取得する。
void *(EFK_STDCALL * AlignedMallocFunc)(unsigned int size, unsigned int alignment)
AlignedMemory Allocation function.
GLint GLint GLint GLint GLint x
virtual ~MaterialData()=default
virtual int32_t GetTotalInstanceCount() const =0
Get the number of instances which is used in playing effects The number of instancesThe number of Roo...
void SetSRT(const Vector3D &s, const Matrix43 &r, const Vector3D &t)
行列の拡大、回転、移動を設定する。
virtual void BeginUpdate()=0
Start to update effects. It is not required if Update is called.
virtual SoundPlayer * GetSoundPlayer()=0
サウンド再生機能を取得する。
TextureFilterType TextureFilter2
virtual void StopTag(SoundTag tag)=0
virtual int32_t GetNormalImageCount() const =0
格納されている法線画像のポインタの個数を取得する。
const int32_t LocalFieldSlotMax
DefaultFileWriter(FILE *filePtr)
virtual void Regist(const EFK_CHAR *key, Effect *effect)=0
deprecated
TextureFilterType TextureFilter1
virtual MaterialData * Load(const EFK_CHAR *path)
load a material a file path a pointer of loaded a material
float SuppressionOfScalingByDepth
Vector3D operator/(const float &o) const
virtual void UpdateHandle(Handle handle, float deltaFrame=1.0f)=0
Update an effect by a handle. a handle. passed time (1 is 1/60 seconds)You need to call BeginUpdate b...
void SetCoordinateSystem(CoordinateSystem coordinateSystem)
座標系を設定する。
void Translation(float x, float y, float z)
移動行列
virtual CoordinateSystem GetCoordinateSystem() const =0
座標系を取得する。
virtual void DrawFront(const Manager::DrawParameter &drawParameter=Manager::DrawParameter())=0
Draw particles in the front of priority 0.
virtual void UnloadResources()=0
画像等リソースの破棄を行う。
virtual bool CheckPlayingTag(SoundTag tag)=0
int32_t FirstInstanceEndMin
Minimum end time that the first instance may exist.
float DistortionIntensity
virtual void SetScale(Handle handle, float x, float y, float z)=0
エフェクトのインスタンスの拡大率を指定する。
virtual int32_t GetInstanceCount(Handle handle)=0
エフェクトに使用されているインスタンス数を取得する。
virtual TextureData * GetNormalImage(int n) const =0
格納されている法線画像のポインタを取得する。
void Scaling(float x, float y, float z)
拡大行列化を行う。
::Effekseer::EffectLoader * CreateEffectLoader(::Effekseer::FileInterface *fileInterface=NULL)
標準のエフェクト読込インスタンスを生成する。
Matrix44 & OrthographicRH(float width, float height, float zn, float zf)
正射影行列化(右手系)
virtual void SetName(const char16_t *name)=0
GLuint GLuint GLsizei GLenum type
EffectFactory * GetEffectFactory(int32_t ind) const
Get effect factory.
int32_t LastInstanceEndMax
Maximum end time that the last instance may exist.
Face * GetFaces(int32_t index=0) const
static Setting * Create()
設定インスタンスを生成する。
virtual void SetSpeed(Handle handle, float speed)=0
エフェクトのインスタンスを再生スピードを設定する。
int32_t LastInstanceStartMin
Minimum start time that the last instance may exist.
int32_t GetVertexSize() const
void SetModel(Effect *effect, int32_t index, void *data)
set model data into specified index
Common parameters which is passed into a renderer.
void GetScale(Vector3D &s) const
行列から拡大ベクトルを取得する。
GLsizei const GLchar *const * path
GLboolean GLboolean GLboolean GLboolean a
virtual bool Start(char *host, uint16_t port)=0
virtual Setting * GetSetting() const =0
設定を取得する。
virtual RibbonRenderer * GetRibbonRenderer()=0
ストライプ描画機能を取得する。
GLubyte GLubyte GLubyte GLubyte w
void deallocate(T *p, std::size_t n)
void SetMaterialLoader(MaterialLoader *loader)
specfiy a material loader loader
void RotationAxis(const Vector3D &axis, float angle)
任意軸反時計回転行列
virtual void Seek(int position)=0
RendererMaterialType
material type
std::array< TextureWrapType, UserTextureSlotMax > TextureWrapTypes
Parameters about a depth which is passed into a renderer.
virtual Effect * GetEffect() const =0
ノードが所属しているエフェクトを取得する。
void * RefractionModelUserPtr
virtual ~ReferenceObject()
virtual bool GetIsResourcesLoadedAutomatically() const
virtual void SetMallocFunc(MallocFunc func)=0
void Indentity()
単位行列化を行う。
virtual void DrawBack(const Manager::DrawParameter &drawParameter=Manager::DrawParameter())=0
Draw particles in the back of priority 0.
virtual void OnUnloadingResource(Effect *effect)
this method is called when unload resources
std::map< T, U, std::less< T >, CustomAllocator< std::pair< const T, U > >> CustomMap
virtual void Update(Manager **managers=nullptr, int32_t managerCount=0, ReloadingThreadType reloadingThreadType=ReloadingThreadType::Main)=0
update a server and reload effects all managers which is playing effects. the number of manager
virtual TextureData * Load(const EFK_CHAR *path, TextureType textureType)
テクスチャを読み込む。
virtual int Release()=0
参照カウンタを減算する。0になった時、インスタンスを削除する。
void(EFK_STDCALL * AlignedFreeFunc)(void *p, unsigned int size)
AlignedMemory Free function.
int32_t TermMin
Minimum end time that the effect may exist.
virtual void SetPaused(Handle handle, bool paused)=0
Pause or resume a particle of effect specified.
ReloadingThreadType
A thread where reload function is called.
void ClearEffectFactory()
clear effect factories
virtual void SetTextureLoader(TextureLoader *textureLoader)=0
テクスチャ読込クラスを設定する。
Emitter GetEmitterFromFace(int32_t index, int32_t time, CoordinateSystem coordinate, float magnification)
virtual const EFK_CHAR * GetNormalImagePath(int n) const =0
Get a normal image's path.
const int32_t UserTextureSlotMax
the maximum number of texture slot which can be specified by an user
FileReader * OpenRead(const EFK_CHAR *path)
bool IsDepthOffsetScaledWithParticleScale
virtual void Draw(const Manager::DrawParameter &drawParameter=Manager::DrawParameter())=0
Draw particles.
CustomAllocator(const CustomAllocator< U > &)
int32_t CameraCullingMask
A bitmask to show effects For example, if effect's layer is 1 and CameraCullingMask's first bit is 1,...
void Scaling(float x, float y, float z)
拡大行列化
std::list< T, CustomAllocator< T > > CustomList
void *(EFK_STDCALL * MallocFunc)(unsigned int size)
Memory Allocation function.
int32_t GetFrameCount() const
virtual void * GetWave(int n) const =0
格納されている音波形のポインタを取得する。
virtual const EFK_CHAR * GetModelPath(int n) const =0
Get a model's path.
virtual size_t Write(const void *buffer, size_t size)=0
GLint GLint GLsizei GLsizei height
virtual RingRenderer * GetRingRenderer()=0
リング描画機能を取得する。
virtual bool Start(uint16_t port)=0
start a server
virtual void Unload(void *data)
モデルを破棄する。
FileWriter * OpenWrite(const EFK_CHAR *path)
MaterialParameter * MaterialParameterPtr
MallocFunc GetMallocFunc()
get an allocator
void AddEffectFactory(EffectFactory *effectFactory)
Add effect factory.
virtual void Unregist(Effect *effect)=0
deprecated
virtual TextureData * GetColorImage(int n) const =0
格納されている色画像のポインタを取得する。
virtual void Flip()=0
今までのPlay等の処理をUpdate実行時に適用するようにする。
virtual ~MaterialLoader()=default
Destructor.
bool LoadBody(Effect *effect, const void *data, int32_t size, float magnification, const EFK_CHAR *materialPath)
load body data(parameters of effect) from a binary
static const int32_t Version
Matrix44 & PerspectiveFovRH(float ovY, float aspect, float zn, float zf)
射影行列化(右手系)