Files
libremetaverse/Programs/Simian/Interfaces/ISceneProvider.cs
John Hurliman 9e243fd131 * Added a copy constructor for Primitive
* Changed Simian ISceneProvider model to run all scene modifications through function calls, and give callbacks access to previous and new data
* Added copy constructor for Simian's SimulationObject

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2202 52acb1d6-8a22-11de-b505-999d5b087335
2008-09-08 18:23:16 +00:00

41 lines
2.0 KiB
C#

using System;
using OpenMetaverse;
namespace Simian
{
public delegate void ObjectAddCallback(object sender, Agent creator, SimulationObject obj);
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);
public delegate void ObjectModifyCallback(object sender, SimulationObject obj,
Primitive.ConstructionData data);
// TODO: Convert terrain to a patch-based system
public delegate void TerrainUpdatedCallback(object sender);
public interface ISceneProvider
{
event ObjectAddCallback OnObjectAdd;
event ObjectRemoveCallback OnObjectRemove;
event ObjectTransformCallback OnObjectTransform;
event ObjectFlagsCallback OnObjectFlags;
event ObjectModifyCallback OnObjectModify;
event TerrainUpdatedCallback OnTerrainUpdated;
// TODO: Convert to a patch-based system, and expose terrain editing
// through functions instead of a property
float[] Heightmap { get; set; }
bool ObjectAdd(object sender, Agent creator, SimulationObject obj);
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);
void ObjectModify(object sender, SimulationObject obj, Primitive.ConstructionData data);
bool TryGetObject(uint localID, out SimulationObject obj);
bool TryGetObject(UUID id, out SimulationObject obj);
}
}