German Larrain avatar German Larrain committed 5af027d

model.physics.adapters: replaced 'get_length'/'get_radius'/'get_size' methods with 'length'/'radius'/'size' properties.

Comments (0)

Files changed (2)

ars/model/physics/adapters.py

 		self._inner_object = body
 		self.attach_geom(geom)
 
-	def get_length(self):
+	@property
+	def length(self):
 		return self._length
 
-	def get_radius(self):
+	@property
+	def radius(self):
 		return self._radius
 
 class Cylinder(OdeBody, base.Cylinder):
 		self._inner_object = body
 		self.attach_geom(geom)
 
-	def get_length(self):
+	@property
+	def length(self):
 		return self._length
 
-	def get_radius(self):
+	@property
+	def radius(self):
 		return self._radius
 
 class Box(OdeBody, base.Box):
 		self._inner_object = body
 		self.attach_geom(geom)
 
-	def get_size(self):
+	@property
+	def size(self):
 		return self._size
 
 class Sphere(OdeBody, base.Sphere):
 		self._inner_object = body
 		self.attach_geom(geom)
 
-	def get_radius(self):
+	@property
+	def radius(self):
 		return self._radius
 
 class Cone(OdeBody, base.Cone):

ars/model/simulator/__init__.py

 #		self._ragdoll.printMass()
 #
 #		for rBody in self._ragdoll.bodies:
-#			actor = gp.Capsule(rBody.get_length(), rBody.get_radius(), rBody.get_position())
+#			actor = gp.Capsule(rBody.length, rBody.radius, rBody.get_position())
 #			name = str(rBody)
 #			self.add_object(SimulatedBody(name, rBody, actor))
 #===============================================================================
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.