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