2008-09-04 21:09:44 +00:00
|
|
|
using System;
|
|
|
|
|
using OpenMetaverse;
|
|
|
|
|
|
|
|
|
|
namespace Simian
|
|
|
|
|
{
|
2008-09-14 08:12:11 +00:00
|
|
|
public delegate void ObjectAddCallback(object sender, Agent creator, SimulationObject obj, PrimFlags creatorFlags);
|
2008-09-08 18:23:16 +00:00
|
|
|
public delegate void ObjectRemoveCallback(object sender, SimulationObject obj);
|
|
|
|
|
public delegate void ObjectTransformCallback(object sender, SimulationObject obj,
|
|
|
|
|
Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration,
|
|
|
|
|
Vector3 angularVelocity, Vector3 scale);
|
|
|
|
|
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);
|
2008-09-08 18:23:16 +00:00
|
|
|
public delegate void ObjectModifyCallback(object sender, SimulationObject obj,
|
|
|
|
|
Primitive.ConstructionData data);
|
2008-10-08 22:10:14 +00:00
|
|
|
public delegate void AvatarAppearanceCallback(object sender, Agent agent,
|
|
|
|
|
Primitive.TextureEntry textures, byte[] visualParams);
|
2008-09-08 18:23:16 +00:00
|
|
|
// TODO: Convert terrain to a patch-based system
|
2008-09-06 18:02:38 +00:00
|
|
|
public delegate void TerrainUpdatedCallback(object sender);
|
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;
|
2008-10-08 22:10:14 +00:00
|
|
|
event AvatarAppearanceCallback OnAvatarAppearance;
|
2008-09-06 18:02:38 +00:00
|
|
|
event TerrainUpdatedCallback OnTerrainUpdated;
|
2008-09-04 21:09:44 +00:00
|
|
|
|
2008-09-08 18:23:16 +00:00
|
|
|
// TODO: Convert to a patch-based system, and expose terrain editing
|
|
|
|
|
// through functions instead of a property
|
2008-09-06 18:02:38 +00:00
|
|
|
float[] Heightmap { get; set; }
|
2008-09-22 16:33:42 +00:00
|
|
|
float WaterHeight { get; }
|
2008-09-06 18:02:38 +00:00
|
|
|
|
2008-09-14 08:12:11 +00:00
|
|
|
bool ObjectAdd(object sender, Agent creator, SimulationObject obj, PrimFlags creatorFlags);
|
2008-09-08 18:23:16 +00:00
|
|
|
bool ObjectRemove(object sender, SimulationObject obj);
|
|
|
|
|
void ObjectTransform(object sender, SimulationObject obj, Vector3 position,
|
|
|
|
|
Quaternion rotation, Vector3 velocity, Vector3 acceleration,
|
|
|
|
|
Vector3 angularVelocity, Vector3 scale);
|
|
|
|
|
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-09-08 18:23:16 +00:00
|
|
|
void ObjectModify(object sender, SimulationObject obj, Primitive.ConstructionData data);
|
2008-10-08 22:10:14 +00:00
|
|
|
|
|
|
|
|
void AvatarAppearance(object sender, Agent agent, Primitive.TextureEntry textures, byte[] visualParams);
|
|
|
|
|
|
2008-09-04 21:09:44 +00:00
|
|
|
bool TryGetObject(uint localID, out SimulationObject obj);
|
|
|
|
|
bool TryGetObject(UUID id, out SimulationObject obj);
|
|
|
|
|
}
|
|
|
|
|
}
|