
// hodograph.hpp - interface for drawing hodograph of curve for "hairline" stroking algorithm testbed

#ifndef __hodograph_hpp__
#define __hodograph_hpp__

#include <Cg/vector/xyzw.hpp>
#include <Cg/double.hpp>
#include <Cg/vector.hpp>
#include <Cg/matrix.hpp>

#include "gl_framebuffer.hpp"

extern void initHodographViewMatrices();
extern void toggleHodographWindow();
extern void postHodographWindowRedisplay();
extern bool isHodoFramebuffer(const GLFramebuffer *);

extern bool isHodographFramebuffer(const GLFramebuffer *fb);

extern float ref_t;
extern bool draw_ref_t;
extern bool show_hodograph_inflection_points;

using Cg::float3;
using Cg::double3;
using Cg::float2;

extern float3 evalRationalBezierCubic(const float3 cp[4], float t);
extern double3 evalRationalBezierCubic(const float3 cp[4], double t);
extern float3 evalRationalBezierCubicGradient(const float3 cp[4], double t);

extern float3 evalRationalBezierQuadratic(const float3 cp[3], float t);
extern double3 evalRationalBezierQuadratic(const float3 cp[3], double t);
extern float3 evalRationalBezierQuadraticGradient(const float3 cp[3], double t);

#endif // __hodograph_hpp__
