Rotational camera added. World Space movement adde
This commit is contained in:
@@ -153,4 +153,44 @@ namespace dae {
|
||||
AddPlane({ 0.f, 0.f, 125.f }, { 0.f, 0.f,-1.f }, matId_Solid_Magenta);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
void Scene_W2::Initialize()
|
||||
{
|
||||
m_Camera.origin = { 0.f,3.f,-9.f };
|
||||
m_Camera.fovAngle = 45.f;
|
||||
|
||||
//default: Material id0 >> SolidColorMaterial (RED)
|
||||
constexpr unsigned char matId_Solid_Red = 0;
|
||||
const unsigned char matId_Solid_Blue = AddMaterial(new Material_SolidColor{ colors::Blue });
|
||||
|
||||
const unsigned char matId_Solid_Yellow = AddMaterial(new Material_SolidColor{ colors::Yellow });
|
||||
const unsigned char matId_Solid_Green = AddMaterial(new Material_SolidColor{ colors::Green });
|
||||
const unsigned char matId_Solid_Magenta = AddMaterial(new Material_SolidColor{ colors::Magenta });
|
||||
const unsigned char matId_Solid_Porple = AddMaterial(new Material_SolidColor{ ColorRGB(207, 159, 255)});
|
||||
|
||||
//Plane
|
||||
AddPlane({ -5.f,0.f,0.f }, { 1.f,0.f,0.f }, matId_Solid_Green);
|
||||
AddPlane({ 5.f,0.f,0.f }, { -1.f,0.f,0.f }, matId_Solid_Green);
|
||||
AddPlane({ 0.f,0.f,0.f }, { 0.f,1.f,0.f }, matId_Solid_Yellow);
|
||||
AddPlane({ 0.f,10.f,0.f }, { 0.f,-1.f,0.f }, matId_Solid_Yellow);
|
||||
AddPlane({ 0.f,0.f,10.f }, { 0.f,0.f,-1.f }, matId_Solid_Magenta);
|
||||
|
||||
//Spheres
|
||||
AddSphere({-1.75f,1.f,0.f}, .75f, matId_Solid_Red);
|
||||
AddSphere({0.f,1.f,0.f}, .75f, matId_Solid_Blue);
|
||||
AddSphere({ 1.75f,1.f,0.f }, .75f, matId_Solid_Red);
|
||||
AddSphere({ -1.75f,3.f,0.f }, .75f, matId_Solid_Blue);
|
||||
AddSphere({ 0.f,3.f,0.f }, .75f, matId_Solid_Red);
|
||||
AddSphere({ 1.75f,3.f,0.f }, .75f, matId_Solid_Blue);
|
||||
|
||||
|
||||
|
||||
AddSphere({ 0.f,5.f,0.f }, .75f, matId_Solid_Porple);
|
||||
|
||||
//Light
|
||||
AddPointLight({ 0.f,5.f,-5.f }, 70.f, colors::White);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user