class Fox::FXVec2d
Public Class Methods
new(*args)
click to toggle source
SWIGINTERN VALUE _wrap_new_FXVec2d(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[2]; int ii; argc = nargs; if (argc > 2) SWIG_fail; for (ii = 0; (ii < argc); ++ii) { argv[ii] = args[ii]; } if ((argc >= 0) && (argc <= 2)) { int _v; if (argc <= 0) { return _wrap_new_FXVec2d__SWIG_0(nargs, args, self); } { int res = SWIG_AsVal_double(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { if (argc <= 1) { return _wrap_new_FXVec2d__SWIG_0(nargs, args, self); } { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_FXVec2d__SWIG_0(nargs, args, self); } } } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec2d, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FXVec2d__SWIG_1(nargs, args, self); } } fail: Ruby_Format_OverloadedError( argc, 2, "FXVec2d.new", " FXVec2d.new(FXdouble xx, FXdouble yy)\n" " FXVec2d.new(FXVec2d const &v)\n"); return Qnil; }
Public Instance Methods
*(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d___mul__(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[3]; int ii; argc = nargs + 1; argv[0] = self; if (argc > 3) SWIG_fail; for (ii = 1; (ii < argc); ++ii) { argv[ii] = args[ii-1]; } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec2d, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec2d, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FXVec2d___mul____SWIG_1(nargs, args, self); } } } if (argc == 2) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec2d, 0); _v = SWIG_CheckState(res); if (_v) { { int res = SWIG_AsVal_double(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_FXVec2d___mul____SWIG_0(nargs, args, self); } } } fail: Ruby_Format_OverloadedError( argc, 3, "__mul__", " FXVec2d __mul__(FXdouble n)\n" " FXdouble __mul__(FXVec2d const &other)\n"); return Qnil; }
+(other) → FXVec2d
click to toggle source
Add operator.
SWIGINTERN VALUE _wrap_FXVec2d___add__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXVec2d *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","operator +", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2d, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2d const &","operator +", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2d const &","operator +", 2, argv[0])); } arg2 = reinterpret_cast< FXVec2d * >(argp2); result = FXVec2d_operator_Sa_((FXVec2d const *)arg1,(FXVec2d const &)*arg2); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
-(other) → FXVec2d
click to toggle source
Substraction operator.
SWIGINTERN VALUE _wrap_FXVec2d___sub__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXVec2d *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","operator -", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2d, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2d const &","operator -", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2d const &","operator -", 2, argv[0])); } arg2 = reinterpret_cast< FXVec2d * >(argp2); result = FXVec2d_operator_Ss_((FXVec2d const *)arg1,(FXVec2d const &)*arg2); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
-@ → FXVec2d
click to toggle source
Substraction operator.
SWIGINTERN VALUE _wrap_FXVec2d___neg__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","operator -", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); result = FXVec2d_operator_Ss_((FXVec2d const *)arg1); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
/(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d___div__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXdouble arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","operator /", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXdouble","operator /", 2, argv[0] )); } arg2 = static_cast< FXdouble >(val2); result = FXVec2d_operator_Sd_((FXVec2d const *)arg1,arg2); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
==(other) → bool
click to toggle source
Equality comparison operator.
SWIGINTERN VALUE _wrap_FXVec2d___eq__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXVec2d *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; bool result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","operator ==", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2d, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2d const &","operator ==", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2d const &","operator ==", 2, argv[0])); } arg2 = reinterpret_cast< FXVec2d * >(argp2); result = (bool)FXVec2d_operator_Se__Se_((FXVec2d const *)arg1,(FXVec2d const &)*arg2); vresult = SWIG_From_bool(static_cast< bool >(result)); return vresult; fail: return Qnil; }
[](i) → FXdouble
click to toggle source
Element accessor/slicing.
SWIGINTERN VALUE _wrap_FXVec2d___getitem__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXint arg2 ; void *argp1 = 0 ; int res1 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","__getitem__", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); arg2 = NUM2INT(argv[0]); result = (FXdouble)FXVec2d___getitem__((FXVec2d const *)arg1,arg2); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
[]=(i, d) → FXdouble
click to toggle source
Element setter/slicing.
SWIGINTERN VALUE _wrap_FXVec2d___setitem__(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXint arg2 ; FXdouble arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val3 ; int ecode3 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d *","__setitem__", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); arg2 = NUM2INT(argv[0]); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXdouble","__setitem__", 3, argv[1] )); } arg3 = static_cast< FXdouble >(val3); result = (FXdouble)FXVec2d___setitem__(arg1,arg2,arg3); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
clamp(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_clamp(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXdouble arg2 ; FXdouble arg3 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; FXVec2d *result = 0 ; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d *","clamp", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXdouble","clamp", 2, argv[0] )); } arg2 = static_cast< FXdouble >(val2); ecode3 = SWIG_AsVal_double(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXdouble","clamp", 3, argv[1] )); } arg3 = static_cast< FXdouble >(val3); result = (FXVec2d *) &(arg1)->clamp(arg2,arg3); vresult = FXRbGetRubyObj(result, "FXVec2d *"); return vresult; fail: return Qnil; }
dot(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_dot(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXVec2d *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","dot", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2d, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2d const &","dot", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2d const &","dot", 2, argv[0])); } arg2 = reinterpret_cast< FXVec2d * >(argp2); result = (FXdouble)FXVec2d_dot((FXVec2d const *)arg1,(FXVec2d const &)*arg2); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
hi(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_hi(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXVec2d *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","hi", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2d, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2d const &","hi", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2d const &","hi", 2, argv[0])); } arg2 = reinterpret_cast< FXVec2d * >(argp2); result = FXVec2d_hi((FXVec2d const *)arg1,(FXVec2d const &)*arg2); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
inspect()
click to toggle source
# File lib/fox16/core.rb, line 241 def inspect; to_a.inspect; end
length(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_length(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","length", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); result = (FXdouble)((FXVec2d const *)arg1)->length(); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
Also aliased as: len
length2(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_length2(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","length2", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); result = (FXdouble)((FXVec2d const *)arg1)->length2(); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
Also aliased as: len2
lo(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_lo(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXVec2d *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","lo", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2d, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2d const &","lo", 2, argv[0] )); } if (!argp2) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2d const &","lo", 2, argv[0])); } arg2 = reinterpret_cast< FXVec2d * >(argp2); result = FXVec2d_lo((FXVec2d const *)arg1,(FXVec2d const &)*arg2); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
normalize(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_normalize(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXVec2d result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d const *","normalize", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); result = FXVec2d_normalize((FXVec2d const *)arg1); vresult = SWIG_NewPointerObj((new FXVec2d(static_cast< const FXVec2d& >(result))), SWIGTYPE_p_FXVec2d, SWIG_POINTER_OWN | 0 ); return vresult; fail: return Qnil; }
to_a()
click to toggle source
Convert to array
# File lib/fox16/core.rb, line 232 def to_a [x, y] end
to_s()
click to toggle source
Convert to string
# File lib/fox16/core.rb, line 237 def to_s to_a.to_s end
x(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_x_get(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d *","x", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); result = (FXdouble) ((arg1)->x); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
x=(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_x_set(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXdouble arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d *","x", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXdouble","x", 2, argv[0] )); } arg2 = static_cast< FXdouble >(val2); if (arg1) (arg1)->x = arg2; return Qnil; fail: return Qnil; }
y(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_y_get(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; void *argp1 = 0 ; int res1 = 0 ; FXdouble result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d *","y", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); result = (FXdouble) ((arg1)->y); vresult = SWIG_From_double(static_cast< double >(result)); return vresult; fail: return Qnil; }
y=(*args)
click to toggle source
SWIGINTERN VALUE _wrap_FXVec2d_y_set(int argc, VALUE *argv, VALUE self) { FXVec2d *arg1 = (FXVec2d *) 0 ; FXdouble arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; int ecode2 = 0 ; if ((argc < 1) || (argc > 1)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2d, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2d *","y", 1, self )); } arg1 = reinterpret_cast< FXVec2d * >(argp1); ecode2 = SWIG_AsVal_double(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXdouble","y", 2, argv[0] )); } arg2 = static_cast< FXdouble >(val2); if (arg1) (arg1)->y = arg2; return Qnil; fail: return Qnil; }