From f70ec1fa75ef526266ad359d2db0e25f2635c182 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 18 Jul 2007 09:36:47 +0000 Subject: * Added a FileSystemObject to SimpleApp * Added Some ShapeTypes (shapes doesn't work though!) * Fixed some \0 issues --- .../Region/Examples/SimpleApp/FileSystemObject.cs | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs (limited to 'OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs') diff --git a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs new file mode 100644 index 0000000..2e43fe6 --- /dev/null +++ b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Region.Environment.Scenes; +using libsecondlife; +using OpenSim.Framework.Types; +using System.Timers; +using System.Diagnostics; +using System.IO; +using Primitive=OpenSim.Region.Environment.Scenes.Primitive; + +namespace SimpleApp +{ + public class FileSystemObject : SceneObject + { + public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos) + : base( world, world.EventManager, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default ) + { + + + float size = (float)Math.Pow((double)fileInfo.Length, (double) 1 / 3) / 5; + rootPrimitive.ResizeGoup(new LLVector3(size, size, size)); + rootPrimitive.Text = fileInfo.Name; + } + + public override void Update() + { + base.Update(); + } + } +} -- cgit v1.1