Commit 4b610692 authored by Ilya Prokhorov's avatar Ilya Prokhorov

FSEGTFactory refactoring

parent b544ace9
#include "Factory.h"
#include <FlameSteelCore/SharedNotNullPointer.h>
#include <FlameSteelEngineGameToolkit/Data/Components/FSEGTFactory.h>
using namespace FlameSteelEngine::GameToolkit;
......@@ -31,4 +32,34 @@ shared_ptr <FSEGTVector> Factory::makeScale(float width, float height, float dep
shared_ptr<FloatComponent> Factory::makeBrightness(float factor) {
auto brightness = FSEGTFactory::makeBrightnessComponent(factor);
return brightness;
}
\ No newline at end of file
}
NotNull<Object> Factory::makeObject(
shared_ptr<string> classIdentifier,
shared_ptr<string> instanceIdentifier,
float x,
float y,
float z,
float scaleX,
float scaleY,
float scaleZ,
float rotationX,
float rotationY,
float rotationZ
) {
auto object = FSEGTFactory::makeOnSceneObject(
classIdentifier,
instanceIdentifier,
shared_ptr<string>(),
shared_ptr<string>(),
shared_ptr<string>(),
x, y, z,
scaleX, scaleY, scaleZ,
rotationX, rotationY, rotationZ,
0);
auto notNull = toNotNull(object);
return notNull;
};
\ No newline at end of file
......@@ -3,6 +3,7 @@
#include <memory>
#include <FlameSteelCore/Object.h>
#include <FlameSteelCore/SharedNotNullPointer.h>
#include <FlameSteelCommonTraits/SerializedModel.h>
#include <FlameSteelEngineGameToolkit/Data/Components/Vector/FSEGTVector.h>
#include <FlameSteelEngineGameToolkit/Data/Components/Float/FloatComponent.h>
......@@ -10,6 +11,7 @@
using namespace std;
using namespace FlameSteelCore;
using namespace FlameSteelCore::Utils::Shortcuts;
namespace FlameSteelEngine {
namespace GameToolkit {
......@@ -23,6 +25,19 @@ public:
static shared_ptr<FSEGTVector> makeRotation(float rotationX, float rotationY, float rotationZ);
static shared_ptr <FSEGTVector> makeScale(float width, float height, float depth);
static shared_ptr<FloatComponent> makeBrightness(float factor);
static NotNull<Object> makeObject(
shared_ptr<string> classIdentifier,
shared_ptr<string> instanceIdentifier,
float x,
float y,
float z,
float scaleX,
float scaleY,
float scaleZ,
float rotationX,
float rotationY,
float rotationZ
);
};
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment