Completed
Push — master ( be0bb5...16e7a2 )
by Matthew
01:20
created

ed2d.physics.CollisionData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 17
Duplicated Lines 0 %
Metric Value
dl 0
loc 17
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A CollisionData.__init__() 0 4 1
A CollisionData.getDirection() 0 2 1
A CollisionData.getState() 0 2 1
A CollisionData.getDepthPenetration() 0 2 1
A CollisionData.getDistance() 0 2 1
1
class CollisionData(object):
2
	def __init__(self, state, direction, depthPenetration = None):
3
		self.mState = state
4
		self.mDirection = direction
5
		self.mDepthPenetration = depthPenetration
6
7
	def getState(self):
8
		return self.mState
9
10
	def getDistance(self):
11
		return self.mDirection.magnitude()
12
13
	def getDirection(self):
14
		return self.mDirection.normalize()
15
16
	def getDepthPenetration(self):
17
		return self.mDepthPenetration