Inheritance ambiguities
Hi,
I've derived from the "FlyNavigate" class to implement my own camera class. I'm basically trying to split the "FlyNavigate::sensitivity" function up so that I can set move and turn speeds seperately. So far i've got: Code:
############# MyFlyNavigation Camera ########### Using "vizcam.FlyNavigate.sensitivity(self, 1.0, turnScale)" works until "vizcam.FlyNavigate.sensitivity(self, moveScale, 1.0)" is invoked, and vice versa. I know this will be a simple mistake i'm doing for something so simple but can't seem to spot it... Thanks, DB |
Sorry we have not had a chance to answer this yet. We'll get back to you early next week.
|
That's ok, I gathered you guys are rather busy. Thanks for informing me.
|
self.__moveScale and self.__turnScale are private to the FlyNavigate class and when you try to set those in your MyFlyNavigation class your are creating new instances of them and so the viewpoint is not affected.
When you call the sensitivity method it works Code:
vizcam.FlyNavigate.sensitivity(self, 1.0, turnScale) keep track of both moveScale and turnScale in your class and then pass them both to FlyNavigate.sensitivity Code:
def __init__(self): Code:
def setMoveSensitivity(self, moveScale): |
Thanks! :)
|
All times are GMT -7. The time now is 02:12 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC