adding some reports

This commit is contained in:
Josh Wilson 2008-10-24 22:56:13 +00:00
parent f35ddbae39
commit 1e4e5ad37e

View File

@ -262,22 +262,30 @@ class DistributedSmoothNode(DistributedNode.DistributedNode,
### These are the component functions that are invoked ### These are the component functions that are invoked
### remotely by the above composite functions. ### remotely by the above composite functions.
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentX(self, x): def setComponentX(self, x):
self.smoother.setX(x) self.smoother.setX(x)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentY(self, y): def setComponentY(self, y):
self.smoother.setY(y) self.smoother.setY(y)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentZ(self, z): def setComponentZ(self, z):
self.smoother.setZ(z) self.smoother.setZ(z)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentH(self, h): def setComponentH(self, h):
self.smoother.setH(h) self.smoother.setH(h)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentP(self, p): def setComponentP(self, p):
self.smoother.setP(p) self.smoother.setP(p)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentR(self, r): def setComponentR(self, r):
self.smoother.setR(r) self.smoother.setR(r)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentL(self, l): def setComponentL(self, l):
if (l != self.zoneId): if (l != self.zoneId):
# only perform set location if location is different # only perform set location if location is different
self.setLocation(self.parentId,l) self.setLocation(self.parentId,l)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentT(self, timestamp): def setComponentT(self, timestamp):
# This is a little bit hacky. If *this* function is called, # This is a little bit hacky. If *this* function is called,
# it must have been called directly by the server, for # it must have been called directly by the server, for
@ -301,6 +309,7 @@ class DistributedSmoothNode(DistributedNode.DistributedNode,
# just reapplies the poition to the node # just reapplies the poition to the node
#self.forceToTruePosition() #self.forceToTruePosition()
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def setComponentTLive(self, timestamp): def setComponentTLive(self, timestamp):
# This is the variant of setComponentT() that will be called # This is the variant of setComponentT() that will be called
# whenever we receive a live update directly from the other # whenever we receive a live update directly from the other
@ -351,6 +360,7 @@ class DistributedSmoothNode(DistributedNode.DistributedNode,
self.smoother.getLatestPosition(): self.smoother.getLatestPosition():
self.smoother.applySmoothMat(self) self.smoother.applySmoothMat(self)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def clearSmoothing(self, bogus = None): def clearSmoothing(self, bogus = None):
# Call this to invalidate all the old position reports # Call this to invalidate all the old position reports
# (e.g. just before popping to a new position). # (e.g. just before popping to a new position).
@ -358,6 +368,7 @@ class DistributedSmoothNode(DistributedNode.DistributedNode,
self.smoother.clearPositions(1) self.smoother.clearPositions(1)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def wrtReparentTo(self, parent): def wrtReparentTo(self, parent):
# We override this NodePath method to force it to # We override this NodePath method to force it to
# automatically reset the smoothing position when we call it. # automatically reset the smoothing position when we call it.
@ -373,6 +384,7 @@ class DistributedSmoothNode(DistributedNode.DistributedNode,
else: else:
NodePath.wrtReparentTo(self, parent) NodePath.wrtReparentTo(self, parent)
@report(types = ['args'], dConfigParam = 'want-smoothnode-report')
def d_setParent(self, parentToken): def d_setParent(self, parentToken):
# We override this DistributedNode method to force a full position # We override this DistributedNode method to force a full position
# update immediately after the distributed setParent is sent. # update immediately after the distributed setParent is sent.