Blame toonz/sources/include/tcg_wrap.h
|
Toshihiro Shimizu |
890ddd |
|
|
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 |
|
|
Toshihiro Shimizu |
890ddd |
namespace tcg
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
template <>
|
|
Toshihiro Shimizu |
890ddd |
struct point_traits<tpoint> {</tpoint>
|
|
Toshihiro Shimizu |
890ddd |
typedef TPoint point_type;
|
|
Toshihiro Shimizu |
890ddd |
typedef int value_type;
|
|
Toshihiro Shimizu |
890ddd |
typedef double float_type;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
inline static value_type x(const point_type &p) { return p.x; }
|
|
Toshihiro Shimizu |
890ddd |
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>
|
|
Toshihiro Shimizu |
890ddd |
typedef TPointD point_type;
|
|
Toshihiro Shimizu |
890ddd |
typedef double value_type;
|
|
Toshihiro Shimizu |
890ddd |
typedef double float_type;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
inline static value_type x(const point_type &p) { return p.x; }
|
|
Toshihiro Shimizu |
890ddd |
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>
|
|
Toshihiro Shimizu |
890ddd |
typedef TThickPoint point_type;
|
|
Toshihiro Shimizu |
890ddd |
typedef double value_type;
|
|
Toshihiro Shimizu |
890ddd |
typedef double float_type;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
inline static value_type x(const point_type &p) { return p.x; }
|
|
Toshihiro Shimizu |
890ddd |
inline static value_type y(const point_type &p) { return p.y; }
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
} // namespace tcg
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif // TCG_WRAP_H
|