|
// rex |
|
| 1 |
using System; |
using System; |
| 2 |
using System.Collections.Generic; |
using System.Collections.Generic; |
| 3 |
using System.Text; |
using System.Text; |
| 11 |
using OpenSim.Region.ScriptEngine.Shared.Api; |
using OpenSim.Region.ScriptEngine.Shared.Api; |
| 12 |
using log4net; |
using log4net; |
| 13 |
using ModularRex.RexFramework; |
using ModularRex.RexFramework; |
| 14 |
|
using OpenSim.Region.Physics.Manager; |
| 15 |
|
|
| 16 |
namespace ModularRex.RexParts |
namespace ModularRex.RexParts |
| 17 |
{ |
{ |
| 409 |
|
|
| 410 |
public string rexRaycast(LSL_Types.Vector3 vPos, LSL_Types.Vector3 vDir, float vLength, string vIgnoreId) |
public string rexRaycast(LSL_Types.Vector3 vPos, LSL_Types.Vector3 vDir, float vLength, string vIgnoreId) |
| 411 |
{ |
{ |
| 412 |
throw new NotImplementedException("RexRaycast not implemented"); |
uint tempignoreid = 0; |
| 413 |
//uint tempignoreid = 0; |
uint collid = 0; |
| 414 |
|
|
| 415 |
//if (vIgnoreId.Length > 0) |
if (vIgnoreId.Length > 0) |
| 416 |
// tempignoreid = System.Convert.ToUInt32(vIgnoreId, 10); |
tempignoreid = System.Convert.ToUInt32(vIgnoreId, 10); |
| 417 |
|
|
| 418 |
//return World.RexRaycast(new Vector3((float)vPos.x, (float)vPos.y, (float)vPos.z), new Vector3((float)vDir.x, (float)vDir.y, (float)vDir.z), vLength, tempignoreid); |
if(World.PhysicsScene is IRexPhysicsScene) |
| 419 |
|
collid = ((IRexPhysicsScene)World.PhysicsScene).Raycast(new PhysicsVector((float)vPos.x, (float)vPos.y, (float)vPos.z), new PhysicsVector((float)vDir.x, (float)vDir.y, (float)vDir.z), vLength, tempignoreid); |
| 420 |
|
|
| 421 |
|
return collid.ToString(); |
| 422 |
} |
} |
| 423 |
|
|
| 424 |
public void rexSetAmbientLight(string avatar, LSL_Types.Vector3 lightDirection, LSL_Types.Vector3 lightColour, LSL_Types.Vector3 ambientColour) |
public void rexSetAmbientLight(string avatar, LSL_Types.Vector3 lightDirection, LSL_Types.Vector3 lightColour, LSL_Types.Vector3 ambientColour) |