src/raytracermodule.cc
branchpyrit
changeset 93 96d65f841791
parent 91 9d66d323c354
child 96 9eb71e76c7fd
equal deleted inserted replaced
92:9af5c039b678 93:96d65f841791
   108 {
   108 {
   109 	LightObject *v;
   109 	LightObject *v;
   110 	static char *kwdlist[] = {"position", "colour", NULL};
   110 	static char *kwdlist[] = {"position", "colour", NULL};
   111 	PyObject *TPos, *TCol = NULL;
   111 	PyObject *TPos, *TCol = NULL;
   112 	Float px, py, pz;
   112 	Float px, py, pz;
   113 	Float cr = 0.9, cg = 0.9, cb = 0.9;
   113 	Float cr = 0.9f, cg = 0.9f, cb = 0.9f;
   114 
   114 
   115 	if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!|O!", kwdlist,
   115 	if (!PyArg_ParseTupleAndKeywords(args, kwd, "O!|O!", kwdlist,
   116 		&PyTuple_Type, &TPos, &PyTuple_Type, &TCol))
   116 		&PyTuple_Type, &TPos, &PyTuple_Type, &TCol))
   117 		return NULL;
   117 		return NULL;
   118 
   118 
   372 	return Py_None;
   372 	return Py_None;
   373 }
   373 }
   374 
   374 
   375 static PyObject *Material_setTransmissivity(PyObject* self, PyObject* args)
   375 static PyObject *Material_setTransmissivity(PyObject* self, PyObject* args)
   376 {
   376 {
   377 	Float trans, rindex = 1.3;
   377 	Float trans, rindex = 1.3f;
   378 
   378 
   379 	if (!PyArg_ParseTuple(args, "f|f", &trans, &rindex))
   379 	if (!PyArg_ParseTuple(args, "f|f", &trans, &rindex))
   380 		return NULL;
   380 		return NULL;
   381 
   381 
   382 	((MaterialObject *)self)->material->setTransmissivity(trans, rindex);
   382 	((MaterialObject *)self)->material->setTransmissivity(trans, rindex);