本文整理汇总了C#中OpenMetaverse类的典型用法代码示例。如果您正苦于以下问题:C# OpenMetaverse类的具体用法?C# OpenMetaverse怎么用?C# OpenMetaverse使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OpenMetaverse类属于命名空间,在下文中一共展示了OpenMetaverse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FromOSD
public override void FromOSD(OpenMetaverse.StructuredData.OSDMap map)
{
PrincipalID = map["PrincipalID"];
Friend = map["Friend"];
MyFlags = map["MyFlags"];
TheirFlags = map["TheirFlags"];
}
示例2: ToAppearance
internal AvatarAppearance ToAppearance(OpenMetaverse.UUID owner)
{
AvatarAppearance app =
new AvatarAppearance
{
Owner = owner,
Serial = this.Serial,
VisualParams = this.VisualParams
};
List<AvatarWearable> wearables = new List<AvatarWearable>();
for (int i = 0; i < AvatarWearable.MAX_WEARABLES && i < this.Wearables.Length; i++)
{
OpenMetaverse.UUID itemID = new OpenMetaverse.UUID(this.Wearables[i].ItemId);
OpenMetaverse.UUID assetID = new OpenMetaverse.UUID(this.Wearables[i].AssetId);
wearables.Add(new AvatarWearable(i, itemID, assetID));
}
app.SetWearables(wearables);
var te = new OpenMetaverse.Primitive.TextureEntry(this.TextureEntry, 0, this.TextureEntry.Length);
app.SetTextureEntries(te);
app.SetHeight();
return app;
}
示例3: AddForceCmd
public AddForceCmd(PhysicsActor actor, OpenMetaverse.Vector3 force, OpenMetaverse.Vector3 forceOffset, ForceType type)
{
Actor = actor;
Force = force;
Type = type;
ForceOffset = forceOffset;
}
示例4: PrimVisualCylinder
public PrimVisualCylinder(OpenMetaverse.Primitive prim)
: base(prim)
{
NumberFaces = 1;
FirstOuterFace = 0;
LastOuterFace = 0;
OuterFaces = new CrossSection[1];
OuterFaces[0] = new CrossSection();
if (prim.PrimData.ProfileHollow != 0)
{
hollow = true;
InnerFaces = new CrossSection[1];
InnerFaces[0] = new CrossSection();
//for (int i = 0; i < 4; i++)
//{
// InnerFaces[i] = new CrossSection();
//}
}
if (prim.PrimData.ProfileBegin != 0 || prim.PrimData.ProfileEnd != 1)
{
cut = true;
CutFaces = new CrossSection[2];
for (int i = 0; i < 2; i++)
{
CutFaces[i] = new CrossSection();
}
}
BuildFaces();
}
示例5: StartTrace
public void StartTrace(TraceSession parent, OpenMetaverse.AgentManager avatarManager)
{
mGridClient = parent.Client;
mAgentManager = avatarManager;
mLastUpdate = DateTime.Now;
}
示例6: AddAvatar
public override PhysicsActor AddAvatar(string avName, OpenMetaverse.Vector3 position, OpenMetaverse.Vector3 size, bool isFlying)
{
BasicActor act = new BasicActor();
act.Position = position;
act.Flying = isFlying;
_actors.Add(act);
return act;
}
示例7: PositionToMatrix
public static PhysX.Math.Matrix PositionToMatrix(OpenMetaverse.Vector3 position, OpenMetaverse.Quaternion rotation)
{
MakeFinite(ref position);
MakeFinite(ref rotation);
return PhysX.Math.Matrix.RotationQuaternion(new PhysX.Math.Quaternion(rotation.X, rotation.Y, rotation.Z, rotation.W)) *
PhysX.Math.Matrix.Translation(position.X, position.Y, position.Z);
}
示例8: FromOSD
public override void FromOSD(OpenMetaverse.StructuredData.OSDMap map)
{
GlobalPosX = map["GlobalPosX"];
GlobalPosY = map["GlobalPosY"];
LandData = new LandData();
LandData.FromOSD((OSDMap) map["LandData"]);
RegionName = map["RegionName"];
RegionType = map["RegionType"];
}
示例9: RotationalPrimVisual
public RotationalPrimVisual(OpenMetaverse.Primitive prim)
: base(prim)
{
// TODO: This is temporary, for debugging and entertainment purposes
Random rand = new Random((int)prim.LocalID + Environment.TickCount);
byte r = (byte)rand.Next(256);
byte g = (byte)rand.Next(256);
byte b = (byte)rand.Next(256);
color = new Color(r, g, b);
}
示例10: CreateCharacterCmd
public CreateCharacterCmd(float height, float radius, OpenMetaverse.Vector3 pos,
OpenMetaverse.Quaternion rot, bool flying, OpenMetaverse.Vector3 initialVelocity)
{
_height = height;
_radius = radius;
_position = pos;
_rotation = rot;
_flying = flying;
_initialVelocity = initialVelocity;
}
示例11: FromOSD
public override void FromOSD(OpenMetaverse.StructuredData.OSDMap map)
{
TotalTierDebit = map["TotalTierDebit"];
TotalTierCredits = map["TotalTierCredits"];
ParcelDirectoryFee = map["ParcelDirectoryFee"];
LandFee = map["LandFee"];
ObjectFee = map["ObjectFee"];
GroupFee = map["GroupFee"];
StartingDate = map["StartingDate"];
}
示例12: Self_ChatFromSimulator
public static void Self_ChatFromSimulator(object sender, OpenMetaverse.ChatEventArgs e)
{
posCamarero = e.Position;
dialogo = new ControlDialogo(e, calcularDistancia());
if (bot.cliente.Self.AgentID != e.OwnerID)
{
dialogo.responder();
}
}
示例13: CreateScaleMatrix
public static float[] CreateScaleMatrix(OpenMetaverse.Vector3 v)
{
float[] mat = new float[16];
mat[0] = v.X;
mat[5] = v.Y;
mat[10] = v.Z;
mat[15] = 1;
return mat;
}
示例14: ComputeAndSetLocalInertia
public override void ComputeAndSetLocalInertia(OMV.Vector3 inertiaFactor, float linksetMass)
{
OMV.Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(LinksetRoot.PhysShape.physShapeInfo, linksetMass);
LinksetRoot.Inertia = inertia * inertiaFactor;
m_physicsScene.PE.SetMassProps(LinksetRoot.PhysBody, linksetMass, LinksetRoot.Inertia);
m_physicsScene.PE.UpdateInertiaTensor(LinksetRoot.PhysBody);
}
示例15: BSPrim
public BSPrim(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size,
OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical)
: base(parent_scene, localID, primName, "BSPrim")
{
// m_log.DebugFormat("{0}: BSPrim creation of {1}, id={2}", LogHeader, primName, localID);
_physicsActorType = (int)ActorTypes.Prim;
RawPosition = pos;
_size = size;
Scale = size; // prims are the size the user wants them to be (different for BSCharactes).
RawOrientation = rotation;
_buoyancy = 0f;
RawVelocity = OMV.Vector3.Zero;
_rotationalVelocity = OMV.Vector3.Zero;
BaseShape = pbs;
_isPhysical = pisPhysical;
_isVolumeDetect = false;
_mass = CalculateMass();
DetailLog("{0},BSPrim.constructor,pbs={1}", LocalID, BSScene.PrimitiveBaseShapeToString(pbs));
// DetailLog("{0},BSPrim.constructor,call", LocalID);
// do the actual object creation at taint time
PhysScene.TaintedObject(LocalID, "BSPrim.create", delegate()
{
// Make sure the object is being created with some sanity.
ExtremeSanityCheck(true /* inTaintTime */);
CreateGeomAndObject(true);
CurrentCollisionFlags = PhysScene.PE.GetCollisionFlags(PhysBody);
IsInitialized = true;
});
}