Text archives Help
- From: James Bigler <bigler@cs.utah.edu>
- Cc: manta@sci.utah.edu
- Subject: Re: [Manta] r2114 - in trunk: Interface Model/Lights Model/Primitives SwigInterface UserInterface scenes/csafe/python
- Date: Mon, 25 Feb 2008 16:16:37 -0700
There is an undocumented feature that will do dynamic casting of
Lights to PointLights automatically, but it doesn't work for our case
when the two classes are wrapped in different interfaces.
You should use the extended functions I added:
point_light = PointLight.fromLight(light)
if (point_light != None):
return self.addPointLight(where, point_light)
If you want examples of typecasting, look in pycallback.i, but in
this case it is removing the type and passing through the python object.
James
On Feb 25, 2008, at 3:18 PM, Carson Brownlee wrote:
does anyone know offhand how to typecast in python using swig? I
mean aside from creating a c function that is like type2* func
(type1* ) which is a pain.
Carson
Archive powered by MHonArc 2.6.16.