Esempio n. 1
0
 def transform(self):
     p = math.Vector3(self.position.x, self.position.y, self.position.z)
     self.translate()
     self.rotate()
     if self.position != p:
         self.get_collisions()
     pass
Esempio n. 2
0
 def __init__(self, parent = None):
     model.Model.__init__(self, parent)
     tiles = [[]]
     self.name = "Hectare"
     self.dimensions = math.Vector3(10000, 10000, 10000)
     self.radius = self.dimensions.x / 2
     self.populate_tiles()
     pass
Esempio n. 3
0
 def __init__(self, parent=None):
     model.Model.__init__(self, parent)
     self.position = math.Vector3(0, 0, 0)
     self.dimensions = math.Vector3(100000, 100000, 100000)
     self.radius = self.dimensions.x / 2
     pass
Esempio n. 4
0
 def __init__(self, parent=None):
     model.Model.__init__(self, parent)
     self.dimensions = math.Vector3(100, 100, 100)
     self.radius = self.dimensions.x / 2
     self.mass = 100
     pass
Esempio n. 5
0
 def __init__(self):
     view.View.__init__(self)
     self.render_offset = math.Vector3(0, 0, 0)
     self.dimensions = math.Vector3(0, 0, 0)
     pass
import sys
import os
import array
import pygame.math as math

# pos_A = math.Vector3(-1,0,2)
# pos_B = math.Vector3(2,-10,-7)
# pos_C = math.Vector3(4,-8,8)
# pos_D = math.Vector3(3,5,-1)
pos_A = math.Vector3(-1,-4,0)
pos_B = math.Vector3(4,7,-1)
pos_C = math.Vector3(-14,-10,9)
pos_D = math.Vector3(1,2,17)
moon_position = []
moon_position.append(pos_A)
moon_position.append(pos_B)
moon_position.append(pos_C)
moon_position.append(pos_D)
vel_A = math.Vector3(0,0,0)
vel_B = math.Vector3(0,0,0)
vel_C = math.Vector3(0,0,0)
vel_D = math.Vector3(0,0,0)
moon_velocity = []
moon_velocity.append(vel_A)
moon_velocity.append(vel_B)
moon_velocity.append(vel_C)
moon_velocity.append(vel_D)

for count in range(1000):
    start_a = 0
    for a in range (start_a, len(moon_position)):
Esempio n. 7
0
File: model.py Progetto: rschum/game
 def __init__(self, parent=None):
     model.Model.__init__(self, parent)
     self.name = "Homestead"
     self.dimensions = math.Vector3(10000, 10000, 10000)
     self.radius = self.dimensions.x / 2
     pass
Esempio n. 8
0
 def __init__(self):
     self.position = math.Vector3(0, 0, 0)
     pass
Esempio n. 9
0
 def create_starting_cube(self):
     w1 = Wall(pgm.Vector3(0, 0, 0), pgm.Vector3(1, 0, 0),
               pgm.Vector3(1, 0, 1), pgm.Vector3(0, 0, 1))
     w2 = Wall(pgm.Vector3(0, 1, 0), pgm.Vector3(1, 1, 0),
               pgm.Vector3(1, 1, 1), pgm.Vector3(0, 1, 1))
     w3 = Wall(pgm.Vector3(0, 0, 0), pgm.Vector3(0, 1, 0),
               pgm.Vector3(0, 1, 1), pgm.Vector3(0, 0, 1))
     w4 = Wall(pgm.Vector3(1, 0, 0), pgm.Vector3(1, 1, 0),
               pgm.Vector3(1, 1, 1), pgm.Vector3(1, 0, 1))
     w5 = Wall(pgm.Vector3(0, 1, 1), pgm.Vector3(1, 1, 1),
               pgm.Vector3(1, 0, 1), pgm.Vector3(0, 0, 1))
     w6 = Wall(pgm.Vector3(0, 1, 0), pgm.Vector3(1, 1, 0),
               pgm.Vector3(1, 0, 0), pgm.Vector3(0, 0, 0))
     self.walls = [w1, w2, w3, w4, w5, w6]
     print('Moje ściany:')
     for wall in self.walls:
         print(wall)
Esempio n. 10
0
    def getRandomStarPosition(self):
        rx = 2 * (random.uniform(0, 1) - 0.5) * self.spread
        ry = 2 * (random.uniform(0, 1) - 0.5) * self.spread
        rz = (random.uniform(0, 1) + 0.00001) * self.spread

        return gmath.Vector3(rx, ry, rz)
Esempio n. 11
0
 def __init__(self, parent=None):
     model.Model.__init__(self, parent)
     hectares = [[]]
     self.dimensions = math.Vector3(100000, 100000, 0)
     self.radius = self.dimensions.x / 2
     pass
Esempio n. 12
0
File: cube.py Progetto: rschum/game
 def __init__(self):
     primitive_3d.Primitive3D.__init__(self)
     self.dimensions = math.Vector3(1, 1, 1)
     pass