|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef PARTICLESFX_H
|
|
Toshihiro Shimizu |
890ddd |
#define PARTICLESFX_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "stdfx.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tfxparam.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tspectrumparam.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//******************************************************************
|
|
Toshihiro Shimizu |
890ddd |
// Particles Fx class
|
|
Toshihiro Shimizu |
890ddd |
//******************************************************************
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class ParticlesFx : public TStandardZeraryFx {
|
|
Shinya Kitaoka |
120a6e |
FX_PLUGIN_DECLARATION(ParticlesFx)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TFxPortDG m_source, m_control;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TIntParamP source_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP bright_thres_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP multi_source_val;
|
|
Shinya Kitaoka |
120a6e |
TPointParamP center_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP length_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP height_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP maxnum_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP lifetime_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP lifetime_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP column_lifetime_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP startpos_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP randseed_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP gravity_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP g_angle_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP gravity_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
// TIntParamP gravity_radius_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP friction_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP friction_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP windint_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP windangle_val;
|
|
Shinya Kitaoka |
120a6e |
TIntEnumParamP swingmode_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP randomx_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP randomy_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP randomx_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP randomy_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP swing_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP speed_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP speed_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP speeda_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP speeda_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP speeda_use_gradient_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP speedscale_val;
|
|
Shinya Kitaoka |
120a6e |
TIntEnumParamP toplayer_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP mass_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP scale_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP scale_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP scale_ctrl_all_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP rot_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP rot_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP trail_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP trailstep_val;
|
|
Shinya Kitaoka |
120a6e |
TIntEnumParamP rotswingmode_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP rotspeed_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP rotsca_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP rotswing_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP pathaim_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP opacity_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP opacity_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP trailopacity_val;
|
|
Shinya Kitaoka |
120a6e |
TRangeParamP scalestep_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP scalestep_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP fadein_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP fadeout_val;
|
|
Shinya Kitaoka |
120a6e |
TIntEnumParamP animation_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP step_val;
|
|
Shinya Kitaoka |
120a6e |
TSpectrumParamP gencol_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP gencol_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP gencol_spread_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP genfadecol_val;
|
|
Shinya Kitaoka |
120a6e |
TSpectrumParamP fincol_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP fincol_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP fincol_spread_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP finrangecol_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP finfadecol_val;
|
|
Shinya Kitaoka |
120a6e |
TSpectrumParamP foutcol_val;
|
|
Shinya Kitaoka |
120a6e |
TIntParamP foutcol_ctrl_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP foutcol_spread_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP foutrangecol_val;
|
|
Shinya Kitaoka |
120a6e |
TDoubleParamP foutfadecol_val;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP source_gradation_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP pick_color_for_every_frame_val;
|
|
Shinya Kitaoka |
120a6e |
TBoolParamP perspective_distribution_val;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
enum { UNIT_SMALL_INCH, UNIT_INCH };
|
|
Shinya Kitaoka |
120a6e |
enum { MATTE_REF, GRAY_REF, H_REF };
|
|
Shinya Kitaoka |
120a6e |
enum { SWING_RANDOM, SWING_SMOOTH };
|
|
Shinya Kitaoka |
120a6e |
enum {
|
|
Shinya Kitaoka |
120a6e |
ANIM_HOLD,
|
|
Shinya Kitaoka |
120a6e |
ANIM_RANDOM,
|
|
Shinya Kitaoka |
120a6e |
ANIM_CYCLE,
|
|
Shinya Kitaoka |
120a6e |
ANIM_R_CYCLE,
|
|
Shinya Kitaoka |
120a6e |
ANIM_S_CYCLE,
|
|
Shinya Kitaoka |
120a6e |
ANIM_SR_CYCLE
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Shinya Kitaoka |
120a6e |
enum { TOP_YOUNGER, TOP_OLDER, TOP_SMALLER, TOP_BIGGER, TOP_RANDOM };
|
|
Shinya Kitaoka |
120a6e |
enum { CTRL_NONE = -1, CTRL_1, CTRL_2 };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
ParticlesFx();
|
|
Shinya Kitaoka |
120a6e |
~ParticlesFx();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool isZerary() const override { return true; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
int dynamicPortGroupsCount() const override { return 2; }
|
|
Shinya Kitaoka |
473e70 |
const TFxPortDG *dynamicPortGroup(int g) const override {
|
|
Shinya Kitaoka |
120a6e |
return (g == 0) ? &m_source : (g == 1) ? &m_control : 0;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
bool canHandle(const TRenderSettings &info, double frame) override { return true; }
|
|
Shinya Kitaoka |
473e70 |
bool allowUserCacheOnPort(int port) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
std::string getAlias(double frame, const TRenderSettings &info) const override;
|
|
Shinya Kitaoka |
473e70 |
bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info) override;
|
|
Shinya Kitaoka |
473e70 |
TFxTimeRegion getTimeRegion() const override {
|
|
Shinya Kitaoka |
120a6e |
return TFxTimeRegion::createUnlimited();
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void doDryCompute(TRectD &rect, double frame, const TRenderSettings &info) override;
|
|
Shinya Kitaoka |
473e70 |
void doCompute(TTile &tile, double frame, const TRenderSettings &ri) override;
|
|
Shinya Kitaoka |
473e70 |
void compute(TFlash &flash, int frame) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void getParamUIs(TParamUIConcept *&concepts, int &length) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void compatibilityTranslatePort(int majorVersion, int minorVersion,
|
|
Shinya Kitaoka |
473e70 |
std::string &portName) override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#endif // PARTICLESFX_H
|