From: Guy K. K. <g....@ma...> - 2009-05-10 20:16:48
|
On Mon, 11 May 2009 03:25:28 Bruce Sherwood wrote: > Here is an improved version of a program that effectively rotates the > scene rather than the camera. It makes sure that local lights rotate > with the scene; only distant lights are "fixed". Thanks for that. It does work nicely. However it puts one in the position to need that extra loop (in a thread) to handle these things, so it doesn't have that "ease" of simply using Visual for simple rendering. But it's a good start if one needs that feature. > if obj.__class__ is distant_light: Shouldn't that be rather if isinstance(obj, distant_light): to make it more Pythonic? On that same topic of "Pythonicness" of the Visual API. I've noticed, that the classes don't really follow the common PEP-8 guide lines. They rather use the notation of attributes than classes (lower case and joined with underscores, rather than CamelCase). That confuses often when conditioned to Python naming schemes to infer types of labels in code. Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Room 2.63, Quad Block A Building Massey University, Auckland, Albany Private Bag 102 904, North Shore Mail Centre voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 eMail: G....@ma... http://iims.massey.ac.nz |