27 using std::make_unique;
29 using std::unique_ptr;
57 this->scene = unique_ptr<Scene>(
scene);
58 this->prototype = unique_ptr<Prototype>(
prototype);
59 engine = unique_ptr<Engine>(Engine::createOffScreenInstance(512, 512,
true,
true,
true));
60 engine->setSceneColor(
Color4(39.0f / 255.0f, 39.0f / 255.0f, 39.0f / 255.0f, 1.0f));
61 engine->setSkyShaderEnabled(
true);
83 Console::println(
"EnvMapEditorTabView::initialize(): An error occurred: " +
string(exception.what()));
88 auto environmentMapping =
new EnvironmentMapping(
"sky_environment_mapping", Engine::getEnvironmentMappingWidth(), Engine::getEnvironmentMappingHeight(),
BoundingBox(
Vector3(-30.0f, 0.0f, -30.0f),
Vector3(30.0f, 60.0f, -30.0f)));
89 environmentMapping->setFrustumCulling(
false);
90 environmentMapping->setTranslation(
Vector3(64.0f, -5.0f, 73.0f));
91 environmentMapping->setTimeRenderUpdateFrequency(
prototype->getEnvironmentMapTimeRenderUpdateFrequency());
92 environmentMapping->setRenderPassMask(
prototype->getEnvironmentMapRenderPassMask());
93 environmentMapping->update();
94 engine->addEntity(environmentMapping);
96 auto cam =
engine->getCamera();
99 cam->setLookFrom(
Vector3(81.296799f, 15.020234f, 101.091347f));
100 cam->setLookAt(
Vector3(57.434414f, 0.695241f, 67.012329f));
102 SceneConnector::setLights(
engine.get(),
scene.get());
103 SceneConnector::addScene(
engine.get(),
scene.get(),
false,
false,
false,
false,
false);
142 environmentMapping->update();
166 PrototypeWriter::write(pathName, fileName,
prototype.get());
Color 4 definition class.
Environment mapping entity.
const Vector3 & getTranslation() const override
void setTranslation(const Vector3 &translation) override
Set translation.
int64_t getTimeRenderUpdateFrequency()
void setRenderPassMask(int32_t renderPassMask)
Set up render pass mask.
int32_t getRenderPassMask()
void setTimeRenderUpdateFrequency(int64_t frequency)
Set up render update time frequency.
Object to be used with engine class.
Scene engine/physics connector.
Represents specular material properties.
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Mutable utf8 aware string class.
MutableString & append(char c)
Append character.
std::exception Exception
Exception base class.