mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
*** empty log message ***
This commit is contained in:
parent
b8e8a33c62
commit
74de944083
@ -1,27 +1,27 @@
|
||||
|
||||
def putArg(self, arg, subatomicType, divisor=1):
|
||||
# Import the type numbers
|
||||
from DCSubatomicType import *
|
||||
if subatomicType == STInt8:
|
||||
self.addInt8(int(arg*divisor))
|
||||
elif subatomicType == STInt16:
|
||||
self.addInt16(int(arg*divisor))
|
||||
elif subatomicType == STInt32:
|
||||
self.addInt32(int(arg*divisor))
|
||||
elif subatomicType == STInt64:
|
||||
self.addInt64(int(arg*divisor))
|
||||
elif subatomicType == STUint8:
|
||||
self.addUint8(int(arg*divisor))
|
||||
elif subatomicType == STUint16:
|
||||
self.addUint16(int(arg*divisor))
|
||||
elif subatomicType == STUint32:
|
||||
self.addUint32(int(arg*divisor))
|
||||
elif subatomicType == STUint64:
|
||||
self.addUint64(int(arg*divisor))
|
||||
elif subatomicType == STFloat64:
|
||||
self.addFloat64(arg)
|
||||
elif subatomicType == STString:
|
||||
self.addString(arg)
|
||||
else:
|
||||
raise Exception("Error: No such type as: " + subatomicType)
|
||||
return None
|
||||
|
||||
def putArg(self, arg, subatomicType, divisor=1):
|
||||
# Import the type numbers
|
||||
from DCSubatomicType import *
|
||||
if subatomicType == STInt8:
|
||||
self.addInt8(int(arg*divisor))
|
||||
elif subatomicType == STInt16:
|
||||
self.addInt16(int(arg*divisor))
|
||||
elif subatomicType == STInt32:
|
||||
self.addInt32(int(arg*divisor))
|
||||
elif subatomicType == STInt64:
|
||||
self.addInt64(int(arg*divisor))
|
||||
elif subatomicType == STUint8:
|
||||
self.addUint8(int(arg*divisor))
|
||||
elif subatomicType == STUint16:
|
||||
self.addUint16(int(arg*divisor))
|
||||
elif subatomicType == STUint32:
|
||||
self.addUint32(int(arg*divisor))
|
||||
elif subatomicType == STUint64:
|
||||
self.addUint64(int(arg*divisor))
|
||||
elif subatomicType == STFloat64:
|
||||
self.addFloat64(arg)
|
||||
elif subatomicType == STString:
|
||||
self.addString(arg)
|
||||
else:
|
||||
raise Exception("Error: No such type as: " + subatomicType)
|
||||
return None
|
||||
|
@ -1,58 +1,58 @@
|
||||
|
||||
def getArg(self, subatomicType, divisor=1):
|
||||
# Import the type numbers
|
||||
from DCSubatomicType import *
|
||||
if divisor == 1:
|
||||
# No division necessary
|
||||
if subatomicType == STInt8:
|
||||
retVal = self.getInt8()
|
||||
elif subatomicType == STInt16:
|
||||
retVal = self.getInt16()
|
||||
elif subatomicType == STInt32:
|
||||
retVal = self.getInt32()
|
||||
elif subatomicType == STInt64:
|
||||
retVal = self.getInt64()
|
||||
elif subatomicType == STUint8:
|
||||
retVal = self.getUint8()
|
||||
elif subatomicType == STUint16:
|
||||
retVal = self.getUint16()
|
||||
elif subatomicType == STUint32:
|
||||
retVal = self.getUint32()
|
||||
elif subatomicType == STUint64:
|
||||
retVal = self.getUint64()
|
||||
elif subatomicType == STFloat64:
|
||||
retVal = self.getFloat64()
|
||||
elif subatomicType == STString:
|
||||
retVal = self.getString()
|
||||
else:
|
||||
raise Exception("Error: No such type as: " + str(subAtomicType))
|
||||
else:
|
||||
# This needs to be divided
|
||||
if subatomicType == STInt8:
|
||||
retVal = (self.getInt8()/float(divisor))
|
||||
elif subatomicType == STInt16:
|
||||
retVal = (self.getInt16()/float(divisor))
|
||||
elif subatomicType == STInt32:
|
||||
retVal = (self.getInt32()/float(divisor))
|
||||
elif subatomicType == STInt64:
|
||||
retVal = (self.getInt64()/float(divisor))
|
||||
elif subatomicType == STUint8:
|
||||
retVal = (self.getUint8()/float(divisor))
|
||||
elif subatomicType == STUint16:
|
||||
retVal = (self.getUint16()/float(divisor))
|
||||
elif subatomicType == STUint32:
|
||||
retVal = (self.getUint32()/float(divisor))
|
||||
elif subatomicType == STUint64:
|
||||
retVal = (self.getUint64()/float(divisor))
|
||||
elif subatomicType == STFloat64:
|
||||
retVal = self.getFloat64()
|
||||
elif subatomicType == STString:
|
||||
retVal = self.getString()
|
||||
else:
|
||||
raise Exception("Error: No such type as: " + str(subAtomicType))
|
||||
|
||||
|
||||
|
||||
return retVal
|
||||
|
||||
|
||||
|
||||
def getArg(self, subatomicType, divisor=1):
|
||||
# Import the type numbers
|
||||
from DCSubatomicType import *
|
||||
if divisor == 1:
|
||||
# No division necessary
|
||||
if subatomicType == STInt8:
|
||||
retVal = self.getInt8()
|
||||
elif subatomicType == STInt16:
|
||||
retVal = self.getInt16()
|
||||
elif subatomicType == STInt32:
|
||||
retVal = self.getInt32()
|
||||
elif subatomicType == STInt64:
|
||||
retVal = self.getInt64()
|
||||
elif subatomicType == STUint8:
|
||||
retVal = self.getUint8()
|
||||
elif subatomicType == STUint16:
|
||||
retVal = self.getUint16()
|
||||
elif subatomicType == STUint32:
|
||||
retVal = self.getUint32()
|
||||
elif subatomicType == STUint64:
|
||||
retVal = self.getUint64()
|
||||
elif subatomicType == STFloat64:
|
||||
retVal = self.getFloat64()
|
||||
elif subatomicType == STString:
|
||||
retVal = self.getString()
|
||||
else:
|
||||
raise Exception("Error: No such type as: " + str(subAtomicType))
|
||||
else:
|
||||
# This needs to be divided
|
||||
if subatomicType == STInt8:
|
||||
retVal = (self.getInt8()/float(divisor))
|
||||
elif subatomicType == STInt16:
|
||||
retVal = (self.getInt16()/float(divisor))
|
||||
elif subatomicType == STInt32:
|
||||
retVal = (self.getInt32()/float(divisor))
|
||||
elif subatomicType == STInt64:
|
||||
retVal = (self.getInt64()/float(divisor))
|
||||
elif subatomicType == STUint8:
|
||||
retVal = (self.getUint8()/float(divisor))
|
||||
elif subatomicType == STUint16:
|
||||
retVal = (self.getUint16()/float(divisor))
|
||||
elif subatomicType == STUint32:
|
||||
retVal = (self.getUint32()/float(divisor))
|
||||
elif subatomicType == STUint64:
|
||||
retVal = (self.getUint64()/float(divisor))
|
||||
elif subatomicType == STFloat64:
|
||||
retVal = self.getFloat64()
|
||||
elif subatomicType == STString:
|
||||
retVal = self.getString()
|
||||
else:
|
||||
raise Exception("Error: No such type as: " + str(subAtomicType))
|
||||
|
||||
|
||||
|
||||
return retVal
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user