diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/VectorRender')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index a3b53be..fc4ccfe 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -511,8 +511,25 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
511 | 511 | ||
512 | // m_log.DebugFormat("[VECTOR RENDER MODULE]: Processing line '{0}'", nextLine); | 512 | // m_log.DebugFormat("[VECTOR RENDER MODULE]: Processing line '{0}'", nextLine); |
513 | 513 | ||
514 | if (nextLine.StartsWith("ResetTransf")) | ||
515 | { | ||
516 | graph.ResetTransform(); | ||
517 | } | ||
518 | else if (nextLine.StartsWith("TransTransf")) | ||
519 | { | ||
520 | float x = 0; | ||
521 | float y = 0; | ||
522 | GetParams(partsDelimiter, ref nextLine, 11, ref x, ref y); | ||
523 | graph.TranslateTransform(x, y); | ||
524 | } | ||
525 | else if (nextLine.StartsWith("RotTransf")) | ||
526 | { | ||
527 | float x = 0; | ||
528 | GetParams(partsDelimiter, ref nextLine, 9, ref x); | ||
529 | graph.RotateTransform(x); | ||
530 | } | ||
514 | //replace with switch, or even better, do some proper parsing | 531 | //replace with switch, or even better, do some proper parsing |
515 | if (nextLine.StartsWith("MoveTo")) | 532 | else if (nextLine.StartsWith("MoveTo")) |
516 | { | 533 | { |
517 | float x = 0; | 534 | float x = 0; |
518 | float y = 0; | 535 | float y = 0; |
@@ -793,6 +810,17 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
793 | } | 810 | } |
794 | } | 811 | } |
795 | 812 | ||
813 | private static void GetParams(char[] partsDelimiter, ref string line, int startLength, ref float x) | ||
814 | { | ||
815 | line = line.Remove(0, startLength); | ||
816 | string[] parts = line.Split(partsDelimiter); | ||
817 | if (parts.Length > 0) | ||
818 | { | ||
819 | string xVal = parts[0].Trim(); | ||
820 | x = Convert.ToSingle(xVal, CultureInfo.InvariantCulture); | ||
821 | } | ||
822 | } | ||
823 | |||
796 | private static void GetParams(char[] partsDelimiter, ref string line, int startLength, ref float x, ref float y) | 824 | private static void GetParams(char[] partsDelimiter, ref string line, int startLength, ref float x, ref float y) |
797 | { | 825 | { |
798 | line = line.Remove(0, startLength); | 826 | line = line.Remove(0, startLength); |