class Fox::FXVec4f
Public Class Methods
Source
SWIGINTERN VALUE _wrap_new_FXVec4f(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 == 0) {
return _wrap_new_FXVec4f__SWIG_0(nargs, args, self);
}
if (argc == 1) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec4f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_FXVec4f__SWIG_1(nargs, args, self);
}
}
if ((argc >= 1) && (argc <= 2)) {
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) {
if (argc <= 1) {
return _wrap_new_FXVec4f__SWIG_2(nargs, args, self);
}
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_FXVec4f__SWIG_2(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_FXVec4f__SWIG_4(nargs, args, self);
}
}
if ((argc >= 3) && (argc <= 4)) {
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) {
{
int res = SWIG_AsVal_float(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
if (argc <= 3) {
return _wrap_new_FXVec4f__SWIG_3(nargs, args, self);
}
{
int res = SWIG_AsVal_float(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_FXVec4f__SWIG_3(nargs, args, self);
}
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 4, "FXVec4f.new",
" FXVec4f.new()\n"
" FXVec4f.new(FXVec4f const &w)\n"
" FXVec4f.new(FXVec3f const &w, FXfloat ww)\n"
" FXVec4f.new(FXfloat x, FXfloat y, FXfloat z, FXfloat w)\n"
" FXVec4f.new(FXColor color)\n");
return Qnil;
}
Source
# File rdoc-sources/FXVec4f.rb, line 12 def initialize; end
Return an FXVec4f instance with x, y, z and w initialized to zeroes.
Source
SWIGINTERN VALUE _wrap_FXVec4f_plane(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 == 1) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec4f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec4f_plane__SWIG_0(nargs, args, self);
}
}
if (argc == 2) {
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) {
return _wrap_FXVec4f_plane__SWIG_2(nargs, args, self);
}
}
}
if (argc == 2) {
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) {
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_FXVec4f_plane__SWIG_1(nargs, args, self);
}
}
}
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_FXVec4f_plane__SWIG_3(nargs, args, self);
}
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "plane",
" FXVec4f plane(FXVec4f const &vec)\n"
" FXVec4f plane(FXVec3f const &vec, FXfloat dist)\n"
" FXVec4f plane(FXVec3f const &vec, FXVec3f const &p)\n"
" FXVec4f plane(FXVec3f const &a, FXVec3f const &b, FXVec3f const &c)\n");
return Qnil;
}
Public Instance Methods
Source
SWIGINTERN VALUE _wrap_FXVec4f___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_FXVec4f, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec4f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec4f___mul____SWIG_1(nargs, args, self);
}
}
}
if (argc == 2) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec4f, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_FXVec4f___mul____SWIG_0(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "__mul__",
" FXVec4f __mul__(FXfloat n)\n"
" FXfloat __mul__(FXVec4f const &a)\n");
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f___add__(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f *arg2 = 0 ;
FXVec4f tmp1 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec4f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)), NUM2DBL(rb_ary_entry(argv[0], 3)));
} else {
FXVec4f *p;
SWIG_ConvertPtr(argv[0],(void **)&p,SWIGTYPE_p_FXVec4f,1);
arg2 = new FXVec4f(*p);
}
}
result = FXVec4f_operator_Sa_((FXVec4f const *)arg1,(FXVec4f const &)*arg2);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Add operator.
Source
SWIGINTERN VALUE
_wrap_FXVec4f___sub__(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f *arg2 = 0 ;
FXVec4f tmp1 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec4f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)), NUM2DBL(rb_ary_entry(argv[0], 3)));
} else {
FXVec4f *p;
SWIG_ConvertPtr(argv[0],(void **)&p,SWIGTYPE_p_FXVec4f,1);
arg2 = new FXVec4f(*p);
}
}
result = FXVec4f_operator_Ss_((FXVec4f const *)arg1,(FXVec4f const &)*arg2);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Subtraction operator.
Source
SWIGINTERN VALUE
_wrap_FXVec4f___neg__(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f tmp1 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = FXVec4f_operator_Ss_((FXVec4f const *)arg1);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
return vresult;
fail:
return Qnil;
}
Subtraction operator.
Source
SWIGINTERN VALUE
_wrap_FXVec4f___div__(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXfloat arg2 ;
FXVec4f tmp1 ;
float val2 ;
int ecode2 = 0 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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 = FXVec4f_operator_Sd_((FXVec4f const *)arg1,arg2);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE _wrap_FXVec4f___eq__(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_FXVec4f, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec4f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec4f___eq____SWIG_0(nargs, args, self);
}
}
}
if (argc == 2) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec4f, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_FXVec4f___eq____SWIG_1(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "__eq__",
" bool __eq__(FXVec4f const &b)\n"
" bool __eq__(FXfloat n)\n");
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f___getitem__(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXint arg2 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
arg2 = NUM2INT(argv[0]);
result = (FXfloat)FXVec4f___getitem__((FXVec4f const *)arg1,arg2);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Element accessor/slicing.
Source
SWIGINTERN VALUE
_wrap_FXVec4f___setitem__(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXint arg2 ;
FXfloat arg3 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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)FXVec4f___setitem__(arg1,arg2,arg3);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Element setter/slicing.
Source
SWIGINTERN VALUE
_wrap_FXVec4f_clamp(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXfloat arg2 ;
FXfloat arg3 ;
FXVec4f tmp1 ;
float val2 ;
int ecode2 = 0 ;
float val3 ;
int ecode3 = 0 ;
FXVec4f *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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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 = (FXVec4f *) &(arg1)->clamp(arg2,arg3);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FXVec4f, 0 | 0 );
return vresult;
fail:
return Qnil;
}
Source
# File rdoc-sources/FXVec4f.rb, line 74 def cross(other); end
Return the cross product of this vector and other.
Source
SWIGINTERN VALUE
_wrap_FXVec4f_crossesq___(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec3f *arg3 = 0 ;
FXVec4f tmp1 ;
bool 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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);
}
}
{
if (TYPE(argv[1]) == T_ARRAY) {
arg3 = new FXVec3f(NUM2DBL(rb_ary_entry(argv[1], 0)), NUM2DBL(rb_ary_entry(argv[1], 1)), NUM2DBL(rb_ary_entry(argv[1], 2)));
} else {
FXVec3f *p;
SWIG_ConvertPtr(argv[1], (void **)&p, SWIGTYPE_p_FXVec3f, 1);
arg3 = new FXVec3f(*p);
}
}
result = (bool)((FXVec4f const *)arg1)->crosses((FXVec3f const &)*arg2,(FXVec3f const &)*arg3);
vresult = SWIG_From_bool(static_cast< bool >(result));
delete arg2;
delete arg3;
return vresult;
fail:
delete arg2;
delete arg3;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_distance(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec3f *arg2 = 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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)((FXVec4f const *)arg1)->distance((FXVec3f const &)*arg2);
vresult = SWIG_From_float(static_cast< float >(result));
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_dot(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f *arg2 = 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec4f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)), NUM2DBL(rb_ary_entry(argv[0], 3)));
} else {
FXVec4f *p;
SWIG_ConvertPtr(argv[0],(void **)&p,SWIGTYPE_p_FXVec4f,1);
arg2 = new FXVec4f(*p);
}
}
result = (FXfloat)FXVec4f_dot((FXVec4f const *)arg1,(FXVec4f const &)*arg2);
vresult = SWIG_From_float(static_cast< float >(result));
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_hi(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f *arg2 = 0 ;
FXVec4f tmp1 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec4f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)), NUM2DBL(rb_ary_entry(argv[0], 3)));
} else {
FXVec4f *p;
SWIG_ConvertPtr(argv[0],(void **)&p,SWIGTYPE_p_FXVec4f,1);
arg2 = new FXVec4f(*p);
}
}
result = FXVec4f_hi((FXVec4f const *)arg1,(FXVec4f const &)*arg2);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_length(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = (FXfloat)((FXVec4f const *)arg1)->length();
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: len
Source
SWIGINTERN VALUE
_wrap_FXVec4f_length2(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = (FXfloat)((FXVec4f const *)arg1)->length2();
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: len2
Source
SWIGINTERN VALUE
_wrap_FXVec4f_lo(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f *arg2 = 0 ;
FXVec4f tmp1 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
{
if (TYPE(argv[0]) == T_ARRAY) {
arg2 = new FXVec4f(NUM2DBL(rb_ary_entry(argv[0], 0)), NUM2DBL(rb_ary_entry(argv[0], 1)), NUM2DBL(rb_ary_entry(argv[0], 2)), NUM2DBL(rb_ary_entry(argv[0], 3)));
} else {
FXVec4f *p;
SWIG_ConvertPtr(argv[0],(void **)&p,SWIGTYPE_p_FXVec4f,1);
arg2 = new FXVec4f(*p);
}
}
result = FXVec4f_lo((FXVec4f const *)arg1,(FXVec4f const &)*arg2);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
delete arg2;
return vresult;
fail:
delete arg2;
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_normalize(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f tmp1 ;
SwigValueWrapper< FXVec4f > 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = FXVec4f_normalize((FXVec4f const *)arg1);
{
FXVec4f* resultptr = new FXVec4f(result);
vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
}
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_w_get(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = (FXfloat) ((arg1)->w);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_w_set(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXfloat arg2 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","w", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
if (arg1) (arg1)->w = arg2;
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_x_get(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = (FXfloat) ((arg1)->x);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_x_set(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXfloat arg2 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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_FXVec4f_y_get(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = (FXfloat) ((arg1)->y);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_y_set(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXfloat arg2 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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_FXVec4f_z_get(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 1);
}
}
result = (FXfloat) ((arg1)->z);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec4f_z_set(int argc, VALUE *argv, VALUE self) {
FXVec4f *arg1 = (FXVec4f *) 0 ;
FXfloat arg2 ;
FXVec4f 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 = FXVec4f(NUM2DBL(rb_ary_entry(self, 0)), NUM2DBL(rb_ary_entry(self, 1)), NUM2DBL(rb_ary_entry(self, 2)), NUM2DBL(rb_ary_entry(self, 3)));
arg1 = &tmp1;
} else {
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXVec4f, 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;
}