Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TCG_WRAP_H
Toshihiro Shimizu 890ddd
#define TCG_WRAP_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// tcg includes
Toshihiro Shimizu 890ddd
#include "tcg/tcg_point.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// Toonz includes
Toshihiro Shimizu 890ddd
#include "tgeometry.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//*************************************************************************************
Toshihiro Shimizu 890ddd
//    Toonz wrapper for tcg
Toshihiro Shimizu 890ddd
//*************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace tcg {
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <>
Toshihiro Shimizu 890ddd
struct point_traits<tpoint> {</tpoint>
Shinya Kitaoka 120a6e
  typedef TPoint point_type;
Shinya Kitaoka 120a6e
  typedef int value_type;
Shinya Kitaoka 120a6e
  typedef double float_type;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  inline static value_type x(const point_type &p) { return p.x; }
Shinya Kitaoka 120a6e
  inline static value_type y(const point_type &p) { return p.y; }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <>
Toshihiro Shimizu 890ddd
struct point_traits<tpointd> {</tpointd>
Shinya Kitaoka 120a6e
  typedef TPointD point_type;
Shinya Kitaoka 120a6e
  typedef double value_type;
Shinya Kitaoka 120a6e
  typedef double float_type;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  inline static value_type x(const point_type &p) { return p.x; }
Shinya Kitaoka 120a6e
  inline static value_type y(const point_type &p) { return p.y; }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <>
Toshihiro Shimizu 890ddd
struct point_traits<tthickpoint> {</tthickpoint>
Shinya Kitaoka 120a6e
  typedef TThickPoint point_type;
Shinya Kitaoka 120a6e
  typedef double value_type;
Shinya Kitaoka 120a6e
  typedef double float_type;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  inline static value_type x(const point_type &p) { return p.x; }
Shinya Kitaoka 120a6e
  inline static value_type y(const point_type &p) { return p.y; }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
}  // namespace tcg
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // TCG_WRAP_H