VoxelEngine/Objects/Objects.py

20 lines
551 B
Python
Raw Normal View History

2017-08-27 12:51:26 +02:00
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,))
2017-08-27 12:51:26 +02:00
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