class Fox::FXMaterial

Public Class Methods

new(*args) click to toggle source
SWIGINTERN VALUE
_wrap_new_FXMaterial(int argc, VALUE *argv, VALUE self) {
  FXMaterial *result = 0 ;
  
  if ((argc < 0) || (argc > 0)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
  }
  result = (FXMaterial *)new FXMaterial();
  DATA_PTR(self) = result;
  return self;
fail:
  return Qnil;
}

Public Instance Methods

ambient(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_ambient_get(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXVec4f *result = 0 ;
  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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","ambient", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  result = (FXVec4f *) & ((arg1)->ambient);
  {
    FXVec4f* resultptr = new FXVec4f(*result);
    vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
  }
  return vresult;
fail:
  return Qnil;
}
ambient=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_ambient_set(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  FXVec4f *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","ambient", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  {
    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);
    }
  }
  if (arg1) (arg1)->ambient = *arg2;
  delete arg2;
  return Qnil;
fail:
  delete arg2;
  return Qnil;
}
diffuse(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_diffuse_get(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXVec4f *result = 0 ;
  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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","diffuse", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  result = (FXVec4f *) & ((arg1)->diffuse);
  {
    FXVec4f* resultptr = new FXVec4f(*result);
    vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
  }
  return vresult;
fail:
  return Qnil;
}
diffuse=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_diffuse_set(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  FXVec4f *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","diffuse", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  {
    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);
    }
  }
  if (arg1) (arg1)->diffuse = *arg2;
  delete arg2;
  return Qnil;
fail:
  delete arg2;
  return Qnil;
}
emission(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_emission_get(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXVec4f *result = 0 ;
  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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","emission", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  result = (FXVec4f *) & ((arg1)->emission);
  {
    FXVec4f* resultptr = new FXVec4f(*result);
    vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
  }
  return vresult;
fail:
  return Qnil;
}
emission=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_emission_set(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  FXVec4f *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","emission", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  {
    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);
    }
  }
  if (arg1) (arg1)->emission = *arg2;
  delete arg2;
  return Qnil;
fail:
  delete arg2;
  return Qnil;
}
shininess(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_shininess_get(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXfloat 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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","shininess", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  result = (FXfloat) ((arg1)->shininess);
  vresult = SWIG_From_float(static_cast< float >(result));
  return vresult;
fail:
  return Qnil;
}
shininess=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_shininess_set(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  FXfloat arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float 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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","shininess", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  ecode2 = SWIG_AsVal_float(argv[0], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","shininess", 2, argv[0] ));
  } 
  arg2 = static_cast< FXfloat >(val2);
  if (arg1) (arg1)->shininess = arg2;
  return Qnil;
fail:
  return Qnil;
}
specular(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_specular_get(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  FXVec4f *result = 0 ;
  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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","specular", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  result = (FXVec4f *) & ((arg1)->specular);
  {
    FXVec4f* resultptr = new FXVec4f(*result);
    vresult = FXRbGetRubyObj(resultptr, "FXVec4f *");
  }
  return vresult;
fail:
  return Qnil;
}
specular=(*args) click to toggle source
SWIGINTERN VALUE
_wrap_FXMaterial_specular_set(int argc, VALUE *argv, VALUE self) {
  FXMaterial *arg1 = (FXMaterial *) 0 ;
  FXVec4f *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 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_FXMaterial, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMaterial *","specular", 1, self )); 
  }
  arg1 = reinterpret_cast< FXMaterial * >(argp1);
  {
    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);
    }
  }
  if (arg1) (arg1)->specular = *arg2;
  delete arg2;
  return Qnil;
fail:
  delete arg2;
  return Qnil;
}