added one cube in first room
This commit is contained in:
parent
e91bf4b35f
commit
f972b840a6
@ -89,6 +89,26 @@ void GameObjectManager::initialize() {
|
||||
ao1.activeObjectScreenMeshMutable.AssignFrom(ao1.activeObjectScreenMesh);
|
||||
ao1.activeObjectScreenMeshMutable.RefreshVBO();
|
||||
|
||||
|
||||
|
||||
|
||||
ActiveObject cubeForFirstRoom;
|
||||
cubeForFirstRoom.name = "cube";
|
||||
cubeForFirstRoom.activeObjectMesh = ZL::LoadFromTextFile("./cube001.txt");
|
||||
cubeForFirstRoom.activeObjectMesh.RotateByMatrix(QuatToMatrix(QuatFromRotateAroundX(M_PI * 0.5)));
|
||||
cubeForFirstRoom.activeObjectMesh.Scale(30);
|
||||
cubeForFirstRoom.activeObjectMeshMutable.AssignFrom(cubeForFirstRoom.activeObjectMesh);
|
||||
cubeForFirstRoom.activeObjectMeshMutable.RefreshVBO();
|
||||
cubeForFirstRoom.objectPos = Vector3f{ 0,50 , 0 };
|
||||
cubeForFirstRoom.activeObjectTexturePtr = std::make_shared<Texture>(CreateTextureDataFromBmp24("./Material_Base_color_1001-_2_.bmp"));
|
||||
cubeForFirstRoom.activeObjectScreenTexturePtr = std::make_shared<Texture>(CreateTextureDataFromBmp24("./aoscreen01.bmp"));
|
||||
cubeForFirstRoom.activeObjectScreenMesh = CreateRect2D({ 0.f, 0.f }, { 64.f, 64.f }, 0.5);
|
||||
cubeForFirstRoom.activeObjectScreenMeshMutable.AssignFrom(cubeForFirstRoom.activeObjectScreenMesh);
|
||||
cubeForFirstRoom.activeObjectScreenMeshMutable.RefreshVBO();
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
ActiveObject ao2;
|
||||
ao2.name = "superchair001";
|
||||
@ -111,6 +131,7 @@ void GameObjectManager::initialize() {
|
||||
Room room_1;
|
||||
room_1.roomTexture = std::make_shared<Texture>(CreateTextureDataFromBmp24("./Material_Base_color_1001.bmp"));
|
||||
room_1.objects.push_back(ao1);
|
||||
room_1.objects.push_back(cubeForFirstRoom);
|
||||
room_1.sound_name = "Symphony No.6 (1st movement).ogg";
|
||||
room_1.roomLogic = createRoom1Logic();
|
||||
room_1.textMesh = preloadedRoomMeshArr[0];
|
||||
|
||||
BIN
Material_Base_color_1001-_2_.bmp
Normal file
BIN
Material_Base_color_1001-_2_.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
93
cube001.txt
Normal file
93
cube001.txt
Normal file
@ -0,0 +1,93 @@
|
||||
===Vertices: 8
|
||||
Vertex 0: <Vector (1.0000, 1.0000, 1.0000)>
|
||||
Vertex 1: <Vector (1.0000, 1.0000, -1.0000)>
|
||||
Vertex 2: <Vector (1.0000, -1.0000, 1.0000)>
|
||||
Vertex 3: <Vector (1.0000, -1.0000, -1.0000)>
|
||||
Vertex 4: <Vector (-1.0000, 1.0000, 1.0000)>
|
||||
Vertex 5: <Vector (-1.0000, 1.0000, -1.0000)>
|
||||
Vertex 6: <Vector (-1.0000, -1.0000, 1.0000)>
|
||||
Vertex 7: <Vector (-1.0000, -1.0000, -1.0000)>
|
||||
===UV Coordinates:
|
||||
Face count: 12
|
||||
Face 0
|
||||
UV Count: 3
|
||||
UV <Vector (0.8750, 0.5000)>
|
||||
UV <Vector (0.6250, 0.7500)>
|
||||
UV <Vector (0.6250, 0.5000)>
|
||||
Face 1
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.7500)>
|
||||
UV <Vector (0.3750, 1.0000)>
|
||||
UV <Vector (0.3750, 0.7500)>
|
||||
Face 2
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.0000)>
|
||||
UV <Vector (0.3750, 0.2500)>
|
||||
UV <Vector (0.3750, 0.0000)>
|
||||
Face 3
|
||||
UV Count: 3
|
||||
UV <Vector (0.3750, 0.5000)>
|
||||
UV <Vector (0.1250, 0.7500)>
|
||||
UV <Vector (0.1250, 0.5000)>
|
||||
Face 4
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.5000)>
|
||||
UV <Vector (0.3750, 0.7500)>
|
||||
UV <Vector (0.3750, 0.5000)>
|
||||
Face 5
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.2500)>
|
||||
UV <Vector (0.3750, 0.5000)>
|
||||
UV <Vector (0.3750, 0.2500)>
|
||||
Face 6
|
||||
UV Count: 3
|
||||
UV <Vector (0.8750, 0.5000)>
|
||||
UV <Vector (0.8750, 0.7500)>
|
||||
UV <Vector (0.6250, 0.7500)>
|
||||
Face 7
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.7500)>
|
||||
UV <Vector (0.6250, 1.0000)>
|
||||
UV <Vector (0.3750, 1.0000)>
|
||||
Face 8
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.0000)>
|
||||
UV <Vector (0.6250, 0.2500)>
|
||||
UV <Vector (0.3750, 0.2500)>
|
||||
Face 9
|
||||
UV Count: 3
|
||||
UV <Vector (0.3750, 0.5000)>
|
||||
UV <Vector (0.3750, 0.7500)>
|
||||
UV <Vector (0.1250, 0.7500)>
|
||||
Face 10
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.5000)>
|
||||
UV <Vector (0.6250, 0.7500)>
|
||||
UV <Vector (0.3750, 0.7500)>
|
||||
Face 11
|
||||
UV Count: 3
|
||||
UV <Vector (0.6250, 0.2500)>
|
||||
UV <Vector (0.6250, 0.5000)>
|
||||
UV <Vector (0.3750, 0.5000)>
|
||||
===Normals:
|
||||
Vertex 0: Normal <Vector (0.5774, 0.5773, 0.5773)>
|
||||
Vertex 1: Normal <Vector (0.5773, 0.5774, -0.5774)>
|
||||
Vertex 2: Normal <Vector (0.5773, -0.5774, 0.5774)>
|
||||
Vertex 3: Normal <Vector (0.5774, -0.5773, -0.5773)>
|
||||
Vertex 4: Normal <Vector (-0.5773, 0.5774, 0.5774)>
|
||||
Vertex 5: Normal <Vector (-0.5774, 0.5773, -0.5773)>
|
||||
Vertex 6: Normal <Vector (-0.5774, -0.5773, 0.5773)>
|
||||
Vertex 7: Normal <Vector (-0.5773, -0.5774, -0.5774)>
|
||||
===Triangles: 12
|
||||
Triangle: [4, 2, 0]
|
||||
Triangle: [2, 7, 3]
|
||||
Triangle: [6, 5, 7]
|
||||
Triangle: [1, 7, 5]
|
||||
Triangle: [0, 3, 1]
|
||||
Triangle: [4, 1, 5]
|
||||
Triangle: [4, 6, 2]
|
||||
Triangle: [2, 6, 7]
|
||||
Triangle: [6, 4, 5]
|
||||
Triangle: [1, 3, 7]
|
||||
Triangle: [0, 2, 3]
|
||||
Triangle: [4, 0, 1]
|
||||
BIN
cubic_icon2.bmp32
Normal file
BIN
cubic_icon2.bmp32
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 449 KiB |
Loading…
Reference in New Issue
Block a user