*Removed OSVector3 and replaced with libsecondlife.LLVector3

Sugilite
mingchen 2007-06-11 17:58:14 +00:00
parent 009bba7cdd
commit 304ebe22a2
6 changed files with 54 additions and 81 deletions

View File

@ -30,11 +30,12 @@ using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Types;
using libsecondlife;
namespace OpenSim.Framework.Interfaces
{
public interface IScriptAPI
{
OSVector3 GetEntityPosition(uint localID);
LLVector3 GetEntityPosition(uint localID);
void SetEntityPosition(uint localID, float x, float y, float z);
uint GetRandomAvatarID();
}

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenSim.Framework</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim.Framework</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -55,22 +61,23 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Db4objects.Db4o.dll" >
<Reference Include="Db4objects.Db4o.dll">
<HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
<Private>False</Private>
</Reference>
@ -216,9 +223,6 @@
<Compile Include="Types\NetworkServersInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\OSVector3.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\ParcelData.cs">
<SubType>Code</SubType>
</Compile>

View File

@ -1,45 +0,0 @@
/*
* Copyright (c) Contributors, http://www.openmetaverse.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework.Types
{
public class OSVector3
{
public float X;
public float Y;
public float Z;
public OSVector3()
{
}
}
}

View File

@ -118,9 +118,9 @@ namespace OpenSim.Region
/// </summary>
/// <param name="localID"></param>
/// <returns></returns>
public OSVector3 GetEntityPosition(uint localID)
public LLVector3 GetEntityPosition(uint localID)
{
OSVector3 res = new OSVector3();
LLVector3 res = new LLVector3();
// Console.WriteLine("script- getting entity " + localID + " position");
foreach (Entity entity in this.Entities.Values)
{

View File

@ -34,6 +34,8 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework;
using OpenSim.Framework.Types;
using libsecondlife;
namespace OpenSim.Scripting.EmbeddedJVM
{
partial class Thread
@ -101,7 +103,7 @@ namespace OpenSim.Scripting.EmbeddedJVM
{
//Console.WriteLine("get entity pos for " + ((Int)bs1).mValue);
//should get the position of the entity from the IScriptAPI
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
LLVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
Float pos = new Float();
pos.mValue = vec3.X;
// Console.WriteLine("returned x value " + vec3.X.ToString());
@ -114,7 +116,7 @@ namespace OpenSim.Scripting.EmbeddedJVM
if (bs1 is Int)
{
//should get the position of the entity from the IScriptAPI
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
LLVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
Float pos = new Float();
pos.mValue = vec3.Y;
this._mThread.currentFrame.OpStack.Push(pos);
@ -126,7 +128,7 @@ namespace OpenSim.Scripting.EmbeddedJVM
if (bs1 is Int)
{
//should get the position of the entity from the IScriptAPI
OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
LLVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
Float pos = new Float();
pos.mValue = vec3.Z;
this._mThread.currentFrame.OpStack.Push(pos);

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{97A82740-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenSim.Scripting.EmbeddedJVM</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim.Scripting.EmbeddedJVM</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -55,14 +61,19 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" >
<Reference Include="libsecondlife, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>