示例#1
0
 def __init__(self, pos, w, h, size=0.1):
     self.pos = Vector3(pos[0], pos[1], pos[2])
     self.size = size
     self.w = w
     self.h = h
     vcpgdict = VCPGDict(
         vertices=self.get_vertices(),
         colors=self.get_colors(),
         prim_types=self.get_prim_type(),
         drawgroups=self.get_drawgroup(),
         parents=[self, self],
     )
     batch.add(vcpgdict)
示例#2
0
 def __init__(self, rung, magic=0):
     self.rung = rung
     self.magic = int(magic)
     vertices = (VFORMAT, self.get_vertices())
     colors = (CFORMAT, self.get_colors())
     prim_type = GL_QUADS
     drawgroup = GRP_BLEND_ONE_MINUS
     geometry = VCPGDict(
         vertices=[vertices],
         colors=[colors],
         prim_types=[prim_type],
         drawgroups=[drawgroup],
         parents=[self],
     )
     batch.add(geometry)
示例#3
0
 def __init__(self, char, pos=Point3(0,0,0), size=0.1, color=None):
     self.char = char
     self.pos = pos
     self.size = size
     self.colors = color
     vcpgdict = VCPGDict(
         vertices=[self.get_vertices()],
         colors=[self.get_colors()],
         prim_types=[self.get_prim_type()],
         drawgroups=[self.get_drawgroup()],
         parents=[self],
     )
     batch.add(vcpgdict)
     scale_vertex_list(self.vertex_list, size)
     translate_vertex_list(self.vertex_list, pos)
示例#4
0
 def __init__(self, rung, magic = math.pi, sign = 1):
     self.rung = rung
     self.magic = magic
     self.sign = sign
     vertices = (VFORMAT, self.get_vertices())
     colors = (CFORMAT, self.get_colors())
     prim_type = GL_TRIANGLES
     drawgroup = GRP_RUNG_END
     geometry = VCPGDict(
         vertices=[vertices],
         colors=[colors],
         prim_types=[prim_type],
         drawgroups=[drawgroup],
         parents=[self],
     )
     batch.add(geometry)
示例#5
0
 def __init__(self, rung, _type, magic=0, sign = 1):
     self.rung = rung
     self.magic = magic
     self.sign = -sign
     self._type = _type
     self.obscured = False
     self.complete = False
     vertices = (VFORMAT, self.get_vertices())
     colors = (CFORMAT, self.get_colors())
     prim_type = GL_QUADS
     drawgroup = GRP_BLEND_ONE_MINUS
     geometry = VCPGDict(
         vertices=[vertices],
         colors=[colors],
         prim_types=[prim_type],
         drawgroups=[drawgroup],
         parents=[self],
     )
     batch.add(geometry)