2008-09-04 21:09:44 +00:00
|
|
|
using System;
|
2008-12-18 21:45:38 +00:00
|
|
|
using System.Collections.Generic;
|
2009-02-04 23:00:33 +00:00
|
|
|
using HttpServer;
|
2008-09-04 21:09:44 +00:00
|
|
|
using OpenMetaverse;
|
2009-02-04 23:00:33 +00:00
|
|
|
using OpenMetaverse.StructuredData;
|
2008-09-04 21:09:44 +00:00
|
|
|
|
|
|
|
|
namespace Simian
|
|
|
|
|
{
|
2009-02-02 21:33:21 +00:00
|
|
|
public class TerrainPatch
|
|
|
|
|
{
|
|
|
|
|
public float[,] Height;
|
|
|
|
|
|
|
|
|
|
public TerrainPatch(uint width, uint height)
|
|
|
|
|
{
|
|
|
|
|
Height = new float[height, width];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-16 08:43:27 +00:00
|
|
|
public delegate void ObjectAddCallback(object sender, SimulationObject obj, PrimFlags creatorFlags);
|
2008-09-08 18:23:16 +00:00
|
|
|
public delegate void ObjectRemoveCallback(object sender, SimulationObject obj);
|
2009-01-30 19:24:38 +00:00
|
|
|
public delegate void ObjectTransformCallback(object sender, SimulationObject obj, Vector3 position,
|
|
|
|
|
Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 angularVelocity);
|
2008-09-08 18:23:16 +00:00
|
|
|
public delegate void ObjectFlagsCallback(object sender, SimulationObject obj, PrimFlags flags);
|
2008-10-03 08:11:32 +00:00
|
|
|
public delegate void ObjectImageCallback(object sender, SimulationObject obj,
|
|
|
|
|
string mediaURL, Primitive.TextureEntry textureEntry);
|
2009-01-30 19:24:38 +00:00
|
|
|
public delegate void ObjectModifyCallback(object sender, SimulationObject obj, Primitive.ConstructionData data);
|
|
|
|
|
public delegate void AgentAddCallback(object sender, Agent agent, PrimFlags creatorFlags);
|
|
|
|
|
public delegate void AgentRemoveCallback(object sender, Agent agent);
|
|
|
|
|
public delegate void AgentAppearanceCallback(object sender, Agent agent, Primitive.TextureEntry textures,
|
|
|
|
|
byte[] visualParams);
|
2009-02-02 21:33:21 +00:00
|
|
|
public delegate void TerrainUpdateCallback(object sender, uint x, uint y, float[,] patchData);
|
2008-09-04 21:09:44 +00:00
|
|
|
|
|
|
|
|
public interface ISceneProvider
|
|
|
|
|
{
|
2008-09-08 18:23:16 +00:00
|
|
|
event ObjectAddCallback OnObjectAdd;
|
|
|
|
|
event ObjectRemoveCallback OnObjectRemove;
|
|
|
|
|
event ObjectTransformCallback OnObjectTransform;
|
|
|
|
|
event ObjectFlagsCallback OnObjectFlags;
|
|
|
|
|
event ObjectModifyCallback OnObjectModify;
|
2009-01-30 19:24:38 +00:00
|
|
|
event AgentAddCallback OnAgentAdd;
|
|
|
|
|
event AgentRemoveCallback OnAgentRemove;
|
|
|
|
|
event AgentAppearanceCallback OnAgentAppearance;
|
2009-02-02 21:33:21 +00:00
|
|
|
event TerrainUpdateCallback OnTerrainUpdate;
|
|
|
|
|
|
|
|
|
|
uint RegionX { get; }
|
|
|
|
|
uint RegionY { get; }
|
|
|
|
|
ulong RegionHandle { get; }
|
|
|
|
|
UUID RegionID { get; }
|
2009-02-03 18:49:00 +00:00
|
|
|
string RegionName { get; }
|
|
|
|
|
RegionFlags RegionFlags { get; }
|
2008-09-04 21:09:44 +00:00
|
|
|
|
2008-09-22 16:33:42 +00:00
|
|
|
float WaterHeight { get; }
|
2008-09-06 18:02:38 +00:00
|
|
|
|
2009-02-02 21:33:21 +00:00
|
|
|
uint TerrainPatchWidth { get; }
|
|
|
|
|
uint TerrainPatchHeight { get; }
|
|
|
|
|
|
|
|
|
|
float[,] GetTerrainPatch(uint x, uint y);
|
|
|
|
|
void SetTerrainPatch(object sender, uint x, uint y, float[,] patchData);
|
|
|
|
|
|
2008-12-16 08:43:27 +00:00
|
|
|
bool ObjectAdd(object sender, SimulationObject obj, PrimFlags creatorFlags);
|
2008-12-17 03:49:42 +00:00
|
|
|
bool ObjectRemove(object sender, uint localID);
|
2008-12-18 21:45:38 +00:00
|
|
|
bool ObjectRemove(object sender, UUID id);
|
2008-12-17 03:49:42 +00:00
|
|
|
void ObjectTransform(object sender, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity,
|
|
|
|
|
Vector3 acceleration, Vector3 angularVelocity);
|
2008-09-08 18:23:16 +00:00
|
|
|
void ObjectFlags(object sender, SimulationObject obj, PrimFlags flags);
|
2008-10-03 08:11:32 +00:00
|
|
|
void ObjectImage(object sender, SimulationObject obj, string mediaURL, Primitive.TextureEntry textureEntry);
|
2008-12-17 03:49:42 +00:00
|
|
|
void ObjectModify(object sender, uint localID, Primitive.ConstructionData data);
|
2009-01-30 19:24:38 +00:00
|
|
|
bool ContainsObject(uint localID);
|
|
|
|
|
bool ContainsObject(UUID id);
|
2009-02-03 18:49:00 +00:00
|
|
|
int ObjectCount();
|
2008-09-04 21:09:44 +00:00
|
|
|
bool TryGetObject(uint localID, out SimulationObject obj);
|
|
|
|
|
bool TryGetObject(UUID id, out SimulationObject obj);
|
2009-01-30 19:24:38 +00:00
|
|
|
void ForEachObject(Action<SimulationObject> obj);
|
2008-12-18 21:45:38 +00:00
|
|
|
|
2009-01-30 19:24:38 +00:00
|
|
|
bool AgentAdd(object sender, Agent agent, PrimFlags creatorFlags);
|
|
|
|
|
void AgentAppearance(object sender, Agent agent, Primitive.TextureEntry textures, byte[] visualParams);
|
2009-02-03 18:49:00 +00:00
|
|
|
int AgentCount();
|
2009-01-30 19:24:38 +00:00
|
|
|
bool TryGetAgent(uint localID, out Agent agent);
|
|
|
|
|
bool TryGetAgent(UUID id, out Agent agent);
|
|
|
|
|
void ForEachAgent(Action<Agent> action);
|
2009-02-04 23:00:33 +00:00
|
|
|
|
|
|
|
|
void SendEvent(Agent agent, string name, OSDMap body);
|
2009-02-05 03:12:41 +00:00
|
|
|
bool HasRunningEventQueue(Agent agent);
|
2009-02-04 23:00:33 +00:00
|
|
|
bool SeedCapabilityHandler(IHttpClientContext context, IHttpRequest request, IHttpResponse response, object state);
|
2008-09-04 21:09:44 +00:00
|
|
|
}
|
|
|
|
|
}
|