20 lines
No EOL
551 B
Python
20 lines
No EOL
551 B
Python
import numpy as np
|
|
import typing
|
|
class Object:
|
|
GeometryShaderId = -1
|
|
def draw(self)->bool:
|
|
return False
|
|
def initializeShader(self)->bool:
|
|
return True
|
|
def __init__(self):
|
|
self.pos = np.zeros((3))
|
|
self.color = np.zeros((3,))
|
|
self.programmId = -1
|
|
def translate(self,M):
|
|
self.pos = np.array((np.concatenate((self.pos, [1])) * M)[0,0:3])[0]
|
|
return self
|
|
def setColor(self,R,G,B):
|
|
self.color[0] = R
|
|
self.color[1] = G
|
|
self.color[2] = B
|
|
return self |