Beispiel #1
0
misc_util.CreateSkybox()

# terrain
terrain_05 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/terrain/compact_003_05.msh")
terrain_06 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/terrain/compact_003_06.msh")
terrain_09 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/terrain/compact_003_09.msh")
terrain_15 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/terrain/compact_003_10.msh")

# buildings
building_pos = math3d.Vector3(400, 5.5, 320)
building_orient = math3d.Matrix33Identity()
building_pose = math3d.Matrix34(building_pos, building_orient)
building = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/architecture/2-story_concrete_warehouse.msh",
    pose=building_pose)

misc_util.CreateEntity(
    model="models/architecture/one-story_old_concreate_building.msh",
    position=math3d.Vector3(425, 5.5, 320),
    is_static=True,
    shape="mesh")

misc_util.CreateEntity(model="models/architecture/ancient_tower.msh",
                       position=math3d.Vector3(360, 3.0, 320),
                       is_static=True,
                       shape="mesh")
Beispiel #2
0
import math3d
import gfx
import stage
import stage_util
import random

#def run():

misc_util = stage_util.CreateStageMiscUtility()

# floor
floor_pose = math3d.Matrix34(math3d.Vector3(0.0, -0.5, 0.0),
                             math3d.Matrix33Identity())
static_box = misc_util.CreateStaticBox(edge_lengths=math3d.Vector3(80, 1, 80),
                                       diffuse_color=gfx.Color(1, 1, 1, 1),
                                       pose=floor_pose)

for x in range(-1, 2):
    for z in range(-1, 2):
        if x == 0 and z == 0:
            continue

        box_pos = math3d.Vector3(x * 35.0, 2.0, z * 35.0)
        box_orient = math3d.Matrix33Identity()
        box_pose = math3d.Matrix34(box_pos, box_orient)
        misc_util.CreateBox(edge_lengths=math3d.Vector3(0.8, 0.8, 0.8),
                            diffuse_color=gfx.Color(1.0, 0.3, 0.3, 1.0),
                            pose=box_pose)

        box_pos = math3d.Vector3(x * 5.0, 2.0, z * 5.0)
        box_orient = math3d.Matrix33Identity()
Beispiel #3
0
import math3d
import gfx
import stage
import stage_util

#def run():

misc_util = stage_util.CreateStageMiscUtility()

misc_util.CreateSkybox(
    texture_path="textures/skygrad-sunny_cloudless-s1x256.jpg")

for x in range(-2, 3):
    for y in range(-2, 3):
        for z in range(-2, 3):
            box_pos = math3d.Vector3(x, 100 + y, z)
            #box_orient = math3d.Matrix33Identity()
            box_orient = math3d.Matrix33RotationZ(
                x) * math3d.Matrix33RotationX(z)
            box_pose = math3d.Matrix34(box_pos, box_orient)
            misc_util.CreateBox(edge_lengths=math3d.Vector3(0.8, 0.8, 0.8),
                                diffuse_color=gfx.Color(1.0, 0.5, 0.5, 1.0),
                                pose=box_pose)

#return 1	# done - release the script

#ScriptBase.SetCallback( run )
Beispiel #4
0
import math3d
import gfx
import stage
import stage_util


#def run():

misc_util = stage_util.CreateStageMiscUtility()

static_box = misc_util.CreateStaticBox( edge_lengths = math3d.Vector3(10,1,10), diffuse_color = gfx.Color(1,1,1,1), pose = math3d.Matrix34Identity() )

for i in range(3):
	box_pose = math3d.Matrix34( math3d.Vector3(-2,2,0) + math3d.Vector3(i*2,i,0), math3d.Matrix33Identity() );
	misc_util.CreateStaticBox( edge_lengths = math3d.Vector3(1,1,1), diffuse_color = gfx.Color(0.5,0.5,1.0,1.0), pose = box_pose )

#return 1	# done - release the script

#ScriptBase.SetCallback( run )
Beispiel #5
0
import math3d
import gfx
import stage
import stage_util

misc_util = stage_util.CreateStageMiscUtility()

floor_pose = math3d.Matrix34(math3d.Vector3(0, -0.5, 0),
                             math3d.Matrix33Identity())
static_box = misc_util.CreateStaticBox(edge_lengths=math3d.Vector3(64, 1, 64),
                                       diffuse_color=gfx.Color(1, 1, 1, 1),
                                       pose=floor_pose)
misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/Gerzi3DARTHouse.msh")

#return 1	# done - release the script

#ScriptBase.SetCallback( run )
Beispiel #6
0
import stage_util

#def run():

misc_util = stage_util.CreateStageMiscUtility()

#ground_box_pose = math3d.Matrix34( math3d.Vector3(0.0,-0.5,0.0), math3d.Matrix33Identity() )
#ground_box = misc_util.CreateStaticBox( edge_lengths = math3d.Vector3(200,1,200), diffuse_color = gfx.Color(0.7,0.7,0.7,1.0), pose=ground_box_pose )

ground_entity = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/ground.msh")
house_d00 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/fachwerk.msh")
house_a00 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/gerzi_house.msh",
    pose=math3d.Matrix34(math3d.Vector3(-10, 0, 16),
                         math3d.Matrix33Identity()))
house_0 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/kosciol.msh",
    pose=math3d.Matrix34(math3d.Vector3(10, 0, 16), math3d.Matrix33Identity()))
house_3 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/gerzi_chapel.msh",
    pose=math3d.Matrix34(math3d.Vector3(-25, 0, 20),
                         math3d.Matrix33Identity()))
house_b00 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/fw65.msh",
    pose=math3d.Matrix34(math3d.Vector3(15, 0, 35),
                         math3d.Matrix33RotationY(1.5708)))
house_b01 = misc_util.CreateStaticTriangleMeshFromMesh(
    mesh_path="models/fw65.msh",
    pose=math3d.Matrix34(math3d.Vector3(15, 0, 45),
                         math3d.Matrix33RotationY(1.5708)))