Toshihiro Shimizu 890ddd
#ifndef MOTIONAWAREBASEFX_H
Toshihiro Shimizu 890ddd
#define MOTIONAWAREBASEFX_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tfxparam.h"
Toshihiro Shimizu 890ddd
#include "stdfx.h"
Toshihiro Shimizu 890ddd
#include "tfxattributes.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
enum MotionObjectType {
Toshihiro Shimizu 890ddd
	OBJTYPE_OWN = 0, /*-- 自分自身の動きでぼかす --*/
Toshihiro Shimizu 890ddd
	OBJTYPE_COLUMN,
Toshihiro Shimizu 890ddd
	OBJTYPE_PEGBAR,
Toshihiro Shimizu 890ddd
	OBJTYPE_TABLE,
Toshihiro Shimizu 890ddd
	OBJTYPE_CAMERA
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class MotionAwareBaseFx : public TStandardRasterFx
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TDoubleParamP m_shutterStart; /*-- 現時点より前のシャッター解放時間 (単位Frame) --*/
Toshihiro Shimizu 890ddd
	TDoubleParamP m_shutterEnd;   /*-- 現時点より後のシャッター解放時間 (単位Frame) --*/
Toshihiro Shimizu 890ddd
	TIntParamP m_traceResolution;
Toshihiro Shimizu 890ddd
	/*-- 他のカラム/Pegの動きを参照できるように --*/
Toshihiro Shimizu 890ddd
	TIntEnumParamP m_motionObjectType;
Toshihiro Shimizu 890ddd
	TIntParamP m_motionObjectIndex;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	MotionAwareBaseFx()
Toshihiro Shimizu 890ddd
		: m_shutterStart(0.05), m_shutterEnd(0.05), m_traceResolution(4), m_motionObjectType(new TIntEnumParam(OBJTYPE_OWN, "Own Motion")), m_motionObjectIndex(0)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_shutterStart->setValueRange(0.0, 1.0);
Toshihiro Shimizu 890ddd
		m_shutterEnd->setValueRange(0.0, 1.0);
Toshihiro Shimizu 890ddd
		m_traceResolution->setValueRange(1, 20);
Toshihiro Shimizu 890ddd
		m_motionObjectType->addItem(OBJTYPE_COLUMN, "Column");
Toshihiro Shimizu 890ddd
		m_motionObjectType->addItem(OBJTYPE_PEGBAR, "Pegbar");
Toshihiro Shimizu 890ddd
		m_motionObjectType->addItem(OBJTYPE_TABLE, "Table");
Toshihiro Shimizu 890ddd
		m_motionObjectType->addItem(OBJTYPE_CAMERA, "Camera");
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
		getAttributes()->setIsSpeedAware(true);
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*-- 軌跡情報を得るのに必要なパラメータを取得させる --*/
Toshihiro Shimizu 890ddd
	TDoubleParamP getShutterStart() { return m_shutterStart; }
Toshihiro Shimizu 890ddd
	TDoubleParamP getShutterEnd() { return m_shutterEnd; }
Toshihiro Shimizu 890ddd
	TIntParamP getTraceResolution() { return m_traceResolution; }
Toshihiro Shimizu 890ddd
	MotionObjectType getMotionObjectType() { return (MotionObjectType)m_motionObjectType->getValue(); }
Toshihiro Shimizu 890ddd
	TIntParamP getMotionObjectIndex() { return m_motionObjectIndex; }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif