mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -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):
|
def putArg(self, arg, subatomicType, divisor=1):
|
||||||
# Import the type numbers
|
# Import the type numbers
|
||||||
from DCSubatomicType import *
|
from DCSubatomicType import *
|
||||||
if subatomicType == STInt8:
|
if subatomicType == STInt8:
|
||||||
self.addInt8(int(arg*divisor))
|
self.addInt8(int(arg*divisor))
|
||||||
elif subatomicType == STInt16:
|
elif subatomicType == STInt16:
|
||||||
self.addInt16(int(arg*divisor))
|
self.addInt16(int(arg*divisor))
|
||||||
elif subatomicType == STInt32:
|
elif subatomicType == STInt32:
|
||||||
self.addInt32(int(arg*divisor))
|
self.addInt32(int(arg*divisor))
|
||||||
elif subatomicType == STInt64:
|
elif subatomicType == STInt64:
|
||||||
self.addInt64(int(arg*divisor))
|
self.addInt64(int(arg*divisor))
|
||||||
elif subatomicType == STUint8:
|
elif subatomicType == STUint8:
|
||||||
self.addUint8(int(arg*divisor))
|
self.addUint8(int(arg*divisor))
|
||||||
elif subatomicType == STUint16:
|
elif subatomicType == STUint16:
|
||||||
self.addUint16(int(arg*divisor))
|
self.addUint16(int(arg*divisor))
|
||||||
elif subatomicType == STUint32:
|
elif subatomicType == STUint32:
|
||||||
self.addUint32(int(arg*divisor))
|
self.addUint32(int(arg*divisor))
|
||||||
elif subatomicType == STUint64:
|
elif subatomicType == STUint64:
|
||||||
self.addUint64(int(arg*divisor))
|
self.addUint64(int(arg*divisor))
|
||||||
elif subatomicType == STFloat64:
|
elif subatomicType == STFloat64:
|
||||||
self.addFloat64(arg)
|
self.addFloat64(arg)
|
||||||
elif subatomicType == STString:
|
elif subatomicType == STString:
|
||||||
self.addString(arg)
|
self.addString(arg)
|
||||||
else:
|
else:
|
||||||
raise Exception("Error: No such type as: " + subatomicType)
|
raise Exception("Error: No such type as: " + subatomicType)
|
||||||
return None
|
return None
|
||||||
|
@ -1,58 +1,58 @@
|
|||||||
|
|
||||||
def getArg(self, subatomicType, divisor=1):
|
def getArg(self, subatomicType, divisor=1):
|
||||||
# Import the type numbers
|
# Import the type numbers
|
||||||
from DCSubatomicType import *
|
from DCSubatomicType import *
|
||||||
if divisor == 1:
|
if divisor == 1:
|
||||||
# No division necessary
|
# No division necessary
|
||||||
if subatomicType == STInt8:
|
if subatomicType == STInt8:
|
||||||
retVal = self.getInt8()
|
retVal = self.getInt8()
|
||||||
elif subatomicType == STInt16:
|
elif subatomicType == STInt16:
|
||||||
retVal = self.getInt16()
|
retVal = self.getInt16()
|
||||||
elif subatomicType == STInt32:
|
elif subatomicType == STInt32:
|
||||||
retVal = self.getInt32()
|
retVal = self.getInt32()
|
||||||
elif subatomicType == STInt64:
|
elif subatomicType == STInt64:
|
||||||
retVal = self.getInt64()
|
retVal = self.getInt64()
|
||||||
elif subatomicType == STUint8:
|
elif subatomicType == STUint8:
|
||||||
retVal = self.getUint8()
|
retVal = self.getUint8()
|
||||||
elif subatomicType == STUint16:
|
elif subatomicType == STUint16:
|
||||||
retVal = self.getUint16()
|
retVal = self.getUint16()
|
||||||
elif subatomicType == STUint32:
|
elif subatomicType == STUint32:
|
||||||
retVal = self.getUint32()
|
retVal = self.getUint32()
|
||||||
elif subatomicType == STUint64:
|
elif subatomicType == STUint64:
|
||||||
retVal = self.getUint64()
|
retVal = self.getUint64()
|
||||||
elif subatomicType == STFloat64:
|
elif subatomicType == STFloat64:
|
||||||
retVal = self.getFloat64()
|
retVal = self.getFloat64()
|
||||||
elif subatomicType == STString:
|
elif subatomicType == STString:
|
||||||
retVal = self.getString()
|
retVal = self.getString()
|
||||||
else:
|
else:
|
||||||
raise Exception("Error: No such type as: " + str(subAtomicType))
|
raise Exception("Error: No such type as: " + str(subAtomicType))
|
||||||
else:
|
else:
|
||||||
# This needs to be divided
|
# This needs to be divided
|
||||||
if subatomicType == STInt8:
|
if subatomicType == STInt8:
|
||||||
retVal = (self.getInt8()/float(divisor))
|
retVal = (self.getInt8()/float(divisor))
|
||||||
elif subatomicType == STInt16:
|
elif subatomicType == STInt16:
|
||||||
retVal = (self.getInt16()/float(divisor))
|
retVal = (self.getInt16()/float(divisor))
|
||||||
elif subatomicType == STInt32:
|
elif subatomicType == STInt32:
|
||||||
retVal = (self.getInt32()/float(divisor))
|
retVal = (self.getInt32()/float(divisor))
|
||||||
elif subatomicType == STInt64:
|
elif subatomicType == STInt64:
|
||||||
retVal = (self.getInt64()/float(divisor))
|
retVal = (self.getInt64()/float(divisor))
|
||||||
elif subatomicType == STUint8:
|
elif subatomicType == STUint8:
|
||||||
retVal = (self.getUint8()/float(divisor))
|
retVal = (self.getUint8()/float(divisor))
|
||||||
elif subatomicType == STUint16:
|
elif subatomicType == STUint16:
|
||||||
retVal = (self.getUint16()/float(divisor))
|
retVal = (self.getUint16()/float(divisor))
|
||||||
elif subatomicType == STUint32:
|
elif subatomicType == STUint32:
|
||||||
retVal = (self.getUint32()/float(divisor))
|
retVal = (self.getUint32()/float(divisor))
|
||||||
elif subatomicType == STUint64:
|
elif subatomicType == STUint64:
|
||||||
retVal = (self.getUint64()/float(divisor))
|
retVal = (self.getUint64()/float(divisor))
|
||||||
elif subatomicType == STFloat64:
|
elif subatomicType == STFloat64:
|
||||||
retVal = self.getFloat64()
|
retVal = self.getFloat64()
|
||||||
elif subatomicType == STString:
|
elif subatomicType == STString:
|
||||||
retVal = self.getString()
|
retVal = self.getString()
|
||||||
else:
|
else:
|
||||||
raise Exception("Error: No such type as: " + str(subAtomicType))
|
raise Exception("Error: No such type as: " + str(subAtomicType))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user