-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvertex.py
28 lines (27 loc) · 926 Bytes
/
vertex.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class Vertex:
"""
Represent a single vertex which is a single point in world space that has a
specific material, shader type, normal and (u, v) coordinate for the
texture.
Args:
position(numpy.array): Position in world coordinates
material(Material): The material to be rendered for this vertex
shader_type(string): The type of shader to use for this vertex
n(numpy.array): The vector normal at this vertex
u(float): Value for u texture coordinate at this vertex
v(float): Value for u texture coordinate at this vertex
"""
def __init__(
self, position,
material=None,
shader_type=None,
n=None,
u=None,
v=None
):
self.position = position
self.material = material
self.shader_type = shader_type
self.n = n
self.u = u
self.v = v