Not even with long texts and small scales
This commit is contained in:
@@ -11,7 +11,6 @@ CameraActor::CameraActor()
|
||||
|
||||
cameraComponent = new CameraComponent();
|
||||
cameraComponent->fieldOfView = 70.0f;
|
||||
cameraComponent->aspectRatio = 1.777778f;
|
||||
cameraComponent->setParent(sceneComponent);
|
||||
cameraComponent->setOwner(this);
|
||||
sceneComponent->addChildComponent(cameraComponent);
|
||||
|
||||
@@ -53,6 +53,14 @@ void CameraComponent::moveY(float amount)
|
||||
bNeedsViewBuild = true;
|
||||
}
|
||||
|
||||
void CameraComponent::setViewport(Gfx::PViewport newViewport)
|
||||
{
|
||||
viewport = newViewport;
|
||||
aspectRatio = viewport->getSizeX() / (float)viewport->getSizeY();
|
||||
|
||||
bNeedsProjectionBuild = true;
|
||||
}
|
||||
|
||||
void CameraComponent::buildViewMatrix()
|
||||
{
|
||||
Vector eyePos = getAbsoluteTransform().getPosition();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
#include "Math/Matrix.h"
|
||||
#include "Graphics/GraphicsResources.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
@@ -30,6 +31,7 @@ public:
|
||||
{
|
||||
return getTransform().getPosition();
|
||||
}
|
||||
void setViewport(Gfx::PViewport viewport);
|
||||
void mouseMove(float deltaX, float deltaY);
|
||||
void mouseScroll(float x);
|
||||
void moveX(float amount);
|
||||
@@ -42,6 +44,8 @@ private:
|
||||
void buildViewMatrix();
|
||||
void buildProjectionMatrix();
|
||||
|
||||
Gfx::PViewport viewport;
|
||||
|
||||
//Transforms relative to actor
|
||||
Matrix4 viewMatrix;
|
||||
Matrix4 projectionMatrix;
|
||||
|
||||
@@ -27,20 +27,11 @@ public:
|
||||
void addChildComponent(PComponent component);
|
||||
virtual void notifySceneAttach(PScene scene);
|
||||
|
||||
//void setAbsoluteLocation(Vector location);
|
||||
//void setAbsoluteRotation(Vector rotation);
|
||||
//void setAbsoluteRotation(Quaternion rotation);
|
||||
//void setWorldScale(Vector scale);
|
||||
|
||||
void setRelativeLocation(Vector location);
|
||||
void setRelativeRotation(Vector rotation);
|
||||
void setRelativeRotation(Quaternion rotation);
|
||||
void setRelativeScale(Vector scale);
|
||||
|
||||
//void addAbsoluteTranslation(Vector translation);
|
||||
//void addAbsoluteRotation(Vector rotation);
|
||||
//void addAbsoluteRotation(Quaternion rotation);
|
||||
|
||||
void addRelativeLocation(Vector translation);
|
||||
void addRelativeRotation(Vector rotation);
|
||||
void addRelativeRotation(Quaternion rotation);
|
||||
|
||||
Reference in New Issue
Block a user