2008-08-19 11:01:28 -04:00
|
|
|
/************************************************************
|
|
|
|
|
|
|
|
cvtwopoints.h -
|
|
|
|
|
|
|
|
$Author: lsxi $
|
|
|
|
|
|
|
|
Copyright (C) 2005-2006 Masakazu Yonekura
|
|
|
|
|
|
|
|
************************************************************/
|
|
|
|
#ifndef RUBY_OPENCV_CVTWOPOINTS_H
|
|
|
|
#define RUBY_OPENCV_CVTWOPOINTS_H
|
|
|
|
|
|
|
|
#include "opencv.h"
|
|
|
|
|
2011-07-23 06:51:58 -04:00
|
|
|
#define __NAMESPACE_BEGIN_CVTWOPOINTS namespace cCvTwoPoints {
|
2008-08-19 11:01:28 -04:00
|
|
|
#define __NAMESPACE_END_CVTWOPOINTS }
|
|
|
|
|
|
|
|
__NAMESPACE_BEGIN_OPENCV
|
|
|
|
|
2011-07-23 06:51:58 -04:00
|
|
|
typedef struct CvTwoPoints {
|
2008-08-19 11:01:28 -04:00
|
|
|
CvPoint p1;
|
|
|
|
CvPoint p2;
|
|
|
|
} CvTwoPoints;
|
|
|
|
|
|
|
|
__NAMESPACE_BEGIN_CVTWOPOINTS
|
|
|
|
|
|
|
|
VALUE rb_class();
|
|
|
|
|
|
|
|
void define_ruby_class();
|
|
|
|
|
|
|
|
VALUE rb_allocate(VALUE klass);
|
|
|
|
|
|
|
|
VALUE rb_point1(VALUE self);
|
|
|
|
VALUE rb_point2(VALUE self);
|
2011-03-19 07:55:04 -04:00
|
|
|
VALUE rb_aref(VALUE self, VALUE index);
|
2008-08-19 11:01:28 -04:00
|
|
|
VALUE rb_to_ary(VALUE self);
|
|
|
|
|
|
|
|
VALUE new_object(CvTwoPoints twopoints);
|
|
|
|
|
|
|
|
__NAMESPACE_END_CVTWOPOINTS
|
|
|
|
|
|
|
|
inline CvTwoPoints*
|
2011-07-23 06:51:58 -04:00
|
|
|
CVTWOPOINTS(VALUE object) {
|
2008-08-19 11:01:28 -04:00
|
|
|
CvTwoPoints *ptr;
|
|
|
|
Data_Get_Struct(object, CvTwoPoints, ptr);
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
__NAMESPACE_END_OPENCV
|
|
|
|
|
|
|
|
#endif // RUBY_OPENCV_CVTWOPOINTS_H
|