summaryrefslogtreecommitdiff
path: root/src/prenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/prenderer.cpp')
-rw-r--r--src/prenderer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/prenderer.cpp b/src/prenderer.cpp
index 1d8f512..37fb113 100644
--- a/src/prenderer.cpp
+++ b/src/prenderer.cpp
@@ -67,6 +67,16 @@ Transform_ApplyInteractive(interact_transform Interact, real32 *OutputX, real32
{
v2 BoxLength = Interact.Max - Interact.Min;
v2 Center = Interact.Max - (BoxLength/2);
+ if (Interact.RadianOffset != 0.0f && Interact.Radians != 0.0f) {
+ v2 LocalCenter = Interact.NewCenter;
+ real32 Rad = Interact.RadianOffset;
+ real32 Point0X = Center.x - Interact.OGCenter.x;
+ real32 Point0Y = Center.y - Interact.OGCenter.y;
+ v2 XAxis = (Point0X * Interact.Scale)*V2(cos(Rad), sin(Rad));
+ v2 YAxis = (Point0Y * Interact.Scale)*V2(sin(Rad), -cos(Rad));
+ Center = Interact.OGCenter + XAxis + YAxis;
+ }
+
real32 Point0X = Center.x - *OutputX;
real32 Point0Y = Center.y - *OutputY;