class Fox::FXVec3f
Public Class Methods
Source
SWIGINTERN VALUE _wrap_new_FXVec3f(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[3];
int ii;
argc = nargs;
if (argc > 3) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if (argc == 0) {
return _wrap_new_FXVec3f__SWIG_0(nargs, args, self);
}
if (argc == 1) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_FXVec3f__SWIG_1(nargs, args, self);
}
}
if (argc == 1) {
int _v = 0;
{
_v = (TYPE(argv[0]) == T_FIXNUM || TYPE(argv[0]) == T_BIGNUM) ? 1 : 0;
}
if (_v) {
return _wrap_new_FXVec3f__SWIG_3(nargs, args, self);
}
}
if ((argc >= 2) && (argc <= 3)) {
int _v = 0;
{
int res = SWIG_AsVal_float(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
if (argc <= 2) {
return _wrap_new_FXVec3f__SWIG_2(nargs, args, self);
}
{
int res = SWIG_AsVal_float(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_FXVec3f__SWIG_2(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "FXVec3f.new",
" FXVec3f.new()\n"
" FXVec3f.new(FXVec3f const &v)\n"
" FXVec3f.new(FXfloat xx, FXfloat yy, FXfloat zz)\n"
" FXVec3f.new(FXColor color)\n");
return Qnil;
}
Source
# File rdoc-sources/FXVec3f.rb, line 11 def initialize; end
Return an FXVec3f instance with x, y and z initialized to zeroes.
Source
SWIGINTERN VALUE _wrap_FXVec3f_normal(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[4];
int ii;
argc = nargs;
if (argc > 4) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if (argc == 3) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec3f_normal__SWIG_0(nargs, args, self);
}
}
}
}
if (argc == 4) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec3f_normal__SWIG_1(nargs, args, self);
}
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 4, "normal",
" FXVec3f normal(FXVec3f const &a, FXVec3f const &b, FXVec3f const &c)\n"
" FXVec3f normal(FXVec3f const &a, FXVec3f const &b, FXVec3f const &c, FXVec3f const &d)\n");
return Qnil;
}
Public Instance Methods
Source
SWIGINTERN VALUE _wrap_FXVec3f___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 = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec3f, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec3f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec3f___mul____SWIG_1(nargs, args, self);
}
}
}
if (argc == 2) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec3f, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_FXVec3f___mul____SWIG_0(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "__mul__",
" FXVec3f __mul__(FXfloat n)\n"
" FXfloat __mul__(FXVec3f const &other)\n");
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f___add__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = FXVec3f_operator_Sa_((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Add operator.
Source
SWIGINTERN VALUE
_wrap_FXVec3f___sub__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = FXVec3f_operator_Ss_((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Subtraction operator.
Source
SWIGINTERN VALUE
_wrap_FXVec3f___neg__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = FXVec3f_operator_Ss_((FXVec3f const *)arg1);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
return vresult;
fail:
return Qnil;
}
Subtraction operator.
Source
SWIGINTERN VALUE
_wrap_FXVec3f___div__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXfloat arg2 ;
FXVec3f tmp1 ;
float val2 ;
int ecode2 = 0 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","operator /", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
result = FXVec3f_operator_Sd_((FXVec3f const *)arg1,arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f___eq__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
bool result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = (bool)FXVec3f_operator_Se__Se_((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
vresult = SWIG_From_bool(static_cast< bool >(result));
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Equality comparison operator.
Source
SWIGINTERN VALUE
_wrap_FXVec3f___getitem__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXint arg2 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
arg2 = NUM2INT(argv[0]);
result = (FXfloat)FXVec3f___getitem__((FXVec3f const *)arg1,arg2);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Element accessor/slicing.
Source
SWIGINTERN VALUE
_wrap_FXVec3f___setitem__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXint arg2 ;
FXfloat arg3 ;
FXVec3f tmp1 ;
float val3 ;
int ecode3 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
arg2 = NUM2INT(argv[0]);
ecode3 = SWIG_AsVal_float(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXfloat","__setitem__", 3, argv[1] ));
}
arg3 = static_cast< FXfloat >(val3);
result = (FXfloat)FXVec3f___setitem__(arg1,arg2,arg3);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Element setter/slicing.
Source
SWIGINTERN VALUE
_wrap_FXVec3f___xor__(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = FXVec3f_operator_Sx_((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
XOR operator.
Source
SWIGINTERN VALUE
_wrap_FXVec3f_clamp(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXfloat arg2 ;
FXfloat arg3 ;
FXVec3f tmp1 ;
float val2 ;
int ecode2 = 0 ;
float val3 ;
int ecode3 = 0 ;
FXVec3f *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","clamp", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
ecode3 = SWIG_AsVal_float(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXfloat","clamp", 3, argv[1] ));
}
arg3 = static_cast< FXfloat >(val3);
result = (FXVec3f *) &(arg1)->clamp(arg2,arg3);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXVec3f, 0 | 0 );
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_cross(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = FXVec3f_cross((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_dot(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = (FXfloat)FXVec3f_dot((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
vresult = SWIG_From_float(static_cast< float >(result));
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_hi(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = FXVec3f_hi((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_length(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = (FXfloat)((FXVec3f const *)arg1)->length();
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: len
Source
SWIGINTERN VALUE
_wrap_FXVec3f_length2(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = (FXfloat)((FXVec3f const *)arg1)->length2();
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: len2
Source
SWIGINTERN VALUE
_wrap_FXVec3f_lo(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[0], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg2 = new FXVec3f(*p);
}
}
result = FXVec3f_lo((FXVec3f const *)arg1,(FXVec3f const &)*arg2);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_normalize(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
SwigValueWrapper< FXVec3f > result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = FXVec3f_normalize((FXVec3f const *)arg1);
{
FXVec3f* resultptr = new FXVec3f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec3f *");
}
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_x_get(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = (FXfloat) ((arg1)->x);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_x_set(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXfloat arg2 ;
FXVec3f tmp1 ;
float val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","x", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
if (arg1) (arg1)->x = arg2;
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_y_get(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = (FXfloat) ((arg1)->y);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_y_set(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXfloat arg2 ;
FXVec3f tmp1 ;
float val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","y", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
if (arg1) (arg1)->y = arg2;
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_z_get(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXVec3f tmp1 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
result = (FXfloat) ((arg1)->z);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec3f_z_set(int argc, VALUE *argv, VALUE self) {
FXVec3f *arg1 = (FXVec3f *) 0 ;
FXfloat arg2 ;
FXVec3f tmp1 ;
float val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
{
if (TYPE(self) == T_ARRAY) {
tmp1 = FXVec3f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec3f, 1);
}
}
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","z", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
if (arg1) (arg1)->z = arg2;
return Qnil;
fail:
return Qnil;
}