Commits

German Larrain committed 784a0da

utils.matrix: added method stubs to Vector; added Vector3 and Vector4.

Comments (0)

Files changed (1)

ars/utils/matrix.py

 import numpy as np
 import math
 
-class Vector:
-	pass
+
+class Vector(object):
+
+	def __init__(self, *args):
+		"""
+		Vector(a,b,c,...)
+		Vector((a,b,c,...))
+		Vector([a,b,c,...])
+
+		"""
+		raise NotImplementedError()
+
+	def unitize(self):
+		# see utils.math.unitize
+		raise NotImplementedError()
+
+	@classmethod
+	def is_vector(cls, vector_):
+		# See RTB's 'isvec.m'.
+		raise NotImplementedError()
+
+
+class Vector3(Vector):
+
+	@property
+	def x(self):
+		raise NotImplementedError()
+
+	@property
+	def y(self):
+		raise NotImplementedError()
+
+	@property
+	def z(self):
+		raise NotImplementedError()
+
+	@classmethod
+	def is_vector3(cls, vector_):
+		# See RTB's 'isvec.m'.
+		raise NotImplementedError()
+
+
+class Vector4(Vector):
+
+	@classmethod
+	def is_vector4(cls, vector_):
+		# See RTB's 'isvec.m'.
+		raise NotImplementedError()
 
 
 class Matrix: