How to build a vector from two floats?

Fredrik Lundin m94lufr at mtek.chalmers.se
Tue Aug 29 03:52:01 EDT 2000


Hey!

I am experiencing problems when I want to build a vector out of two floats.
I am routing two SFFloats from a WRL-file to the python script.

The function looks like this:

class TextureScale(TypedField(SFVec2f,(SFFloat,SFFloat))):
  def evaluate(self, inputs):
    return inputs[0].get(),inputs[1].get()
texturescale = TextureScale()

Shouldn't the return be of the type SFVec2f with two SFFloat in x- &  y-pos?





More information about the Python-list mailing list