Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TFX_ATTRIBUTES_INCLUDED
Toshihiro Shimizu 890ddd
#define TFX_ATTRIBUTES_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tgeometry.h"
Toshihiro Shimizu 890ddd
#include <qstack></qstack>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TFX_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI TFxAttributes
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	int m_id;
Toshihiro Shimizu 890ddd
	TPointD m_dagNodePos;
Toshihiro Shimizu 890ddd
	bool m_enabled;
Toshihiro Shimizu 890ddd
	bool m_speedAware;
Toshihiro Shimizu 890ddd
	bool m_isOpened;
Toshihiro Shimizu 890ddd
	TPointD m_speed;
Toshihiro Shimizu 890ddd
	//A stack is used to manage subgroups.
Toshihiro Shimizu 890ddd
	QStack<int> m_groupId;</int>
Shinya Kitaoka 3bfa54
	QStack<std::wstring> m_groupName;</std::wstring>
Toshihiro Shimizu 890ddd
	int m_passiveCacheDataIdx;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_groupSelector;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*-- MotionBlurなどのFxのために、オブジェクトの軌跡のデータを取得する --*/
Toshihiro Shimizu 890ddd
	QList<tpointd> m_motionPoints;</tpointd>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TFxAttributes();
Toshihiro Shimizu 890ddd
	~TFxAttributes();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setId(int id) { m_id = id; }
Toshihiro Shimizu 890ddd
	int getId() { return m_id; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setDagNodePos(const TPointD &pos);
Toshihiro Shimizu 890ddd
	TPointD getDagNodePos() const { return m_dagNodePos; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool isEnabled() const { return m_enabled; }
Toshihiro Shimizu 890ddd
	void enable(bool on) { m_enabled = on; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setIsSpeedAware(bool yes) { m_speedAware = yes; }
Toshihiro Shimizu 890ddd
	bool isSpeedAware() const { return m_speedAware; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setSpeed(TPointD &speed) { m_speed = speed; }
Toshihiro Shimizu 890ddd
	TPointD getSpeed() const { return m_speed; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setIsOpened(bool value) { m_isOpened = value; }
Toshihiro Shimizu 890ddd
	bool isOpened() { return m_isOpened; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int &passiveCacheDataIdx() { return m_passiveCacheDataIdx; }
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void setMotionPoints(QList<tpointd> motionPoints)</tpointd>
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		m_motionPoints = motionPoints;
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
	QList<tpointd> getMotionPoints() { return m_motionPoints; }</tpointd>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//Group management
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int setGroupId(int value);
Toshihiro Shimizu 890ddd
	void setGroupId(int value, int position);
Toshihiro Shimizu 890ddd
	int getGroupId();
Toshihiro Shimizu 890ddd
	QStack<int> getGroupIdStack();</int>
Toshihiro Shimizu 890ddd
	void removeGroupId(int position);
Toshihiro Shimizu 890ddd
	int removeGroupId();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void removeFromAllGroup();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool isGrouped();
Toshihiro Shimizu 890ddd
	bool isContainedInGroup(int groupId);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 3bfa54
	void setGroupName(const std::wstring &name, int position = -1);
Shinya Kitaoka 3bfa54
	std::wstring getGroupName(bool fromEditor);
Shinya Kitaoka 3bfa54
	QStack<std::wstring> getGroupNameStack();</std::wstring>
Toshihiro Shimizu 890ddd
	int removeGroupName(bool fromEditor);
Toshihiro Shimizu 890ddd
	void removeGroupName(int position = -1);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool editGroup();
Toshihiro Shimizu 890ddd
	bool isGroupEditing();
Toshihiro Shimizu 890ddd
	void closeEditingGroup(int groupId);
Toshihiro Shimizu 890ddd
	int getEditingGroupId();
Shinya Kitaoka 3bfa54
	std::wstring getEditingGroupName();
Toshihiro Shimizu 890ddd
	void closeAllGroups();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif