VoxelEngine/Objects/Objects.py
2020-07-19 10:41:08 +02:00

27 lines
568 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