本文整理汇总了C#中OpenMetaverse类的典型用法代码示例。如果您正苦于以下问题:C# OpenMetaverse类的具体用法?C# OpenMetaverse怎么用?C# OpenMetaverse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpenMetaverse类属于命名空间,在下文中一共展示了OpenMetaverse类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: FromOSD
public override void FromOSD(OpenMetaverse.StructuredData.OSDMap map)
{
PrincipalID = map["PrincipalID"];
Friend = map["Friend"];
MyFlags = map["MyFlags"];
TheirFlags = map["TheirFlags"];
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:7,代码来源:IFriendsService.cs
示例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;
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:29,代码来源:PackedAppearance.cs
示例3: AddForceCmd
public AddForceCmd(PhysicsActor actor, OpenMetaverse.Vector3 force, OpenMetaverse.Vector3 forceOffset, ForceType type)
{
Actor = actor;
Force = force;
Type = type;
ForceOffset = forceOffset;
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:7,代码来源:AddForceCmd.cs
示例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();
}
开发者ID:arcazrael,项目名称:glife-cs,代码行数:34,代码来源:PrimVisualCylinder.cs
示例5: StartTrace
public void StartTrace(TraceSession parent, OpenMetaverse.AgentManager avatarManager)
{
mGridClient = parent.Client;
mAgentManager = avatarManager;
mLastUpdate = DateTime.Now;
}
开发者ID:ewencp,项目名称:sltrace,代码行数:7,代码来源:StaticRotatingController.cs
示例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;
}
开发者ID:BogusCurry,项目名称:halcyon,代码行数:8,代码来源:BasicPhysicsPlugin.cs
示例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);
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:8,代码来源:PhysUtil.cs
示例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"];
}
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:9,代码来源:AuroraLandData.cs
示例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);
}
开发者ID:arcazrael,项目名称:glife-cs,代码行数:10,代码来源:RotationalPrimVisual.cs
示例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;
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:10,代码来源:CreateCharacterCmd.cs
示例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"];
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:10,代码来源:IMoneyModule.cs
示例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();
}
}
开发者ID:raulgomezsa,项目名称:deutsch-gefe,代码行数:10,代码来源:Program.cs
示例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;
}
开发者ID:NullProjects,项目名称:METAbolt,代码行数:11,代码来源:TextRenderingHelper.cs
示例14: ChangeChildPrimOffsetCmd
public ChangeChildPrimOffsetCmd(PhysxPrim parent, PhysxPrim child, OpenMetaverse.Vector3 newOffset,
OpenMetaverse.Quaternion rotOffset)
{
Util.ThrowIfNull(parent, "parent");
Util.ThrowIfNull(child, "child");
_parent = parent;
_child = child;
_newOffset = newOffset;
_rotOffset = rotOffset;
_affectedPrims = new List<PhysxPrim> { parent, child };
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:12,代码来源:ChangeChildPrimOffsetCmd.cs
示例15: OmvVectorArrayToPhysx
public static PhysX.Math.Vector3[] OmvVectorArrayToPhysx(OpenMetaverse.Vector3[] omvArray)
{
PhysX.Math.Vector3[] physxArray = new PhysX.Math.Vector3[omvArray.Length];
for (int i = 0; i < omvArray.Length; ++i)
{
OpenMetaverse.Vector3 omvVec = omvArray[i];
physxArray[i] = new PhysX.Math.Vector3(omvVec.X, omvVec.Y, omvVec.Z);
}
return physxArray;
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:12,代码来源:PhysUtil.cs
示例16: Excecute
public override bool Excecute(SteelCityAutomaton.Automaton am, OpenMetaverse.GridClient client, bool force)
{
if (!client.Network.Connected) { result.message = "Not Connected to grid"; return true; }
UUID target;
if (UUID.TryParse(uuid, out target) && amount > 0)
{
client.Self.GiveAvatarMoney(target, amount,description);
result.success = true;
}
else result.message = "Invalid key or ammount";
return true;
}
开发者ID:WolfGangS,项目名称:SteelCityAutomaton,代码行数:12,代码来源:Money_Commands.cs
示例17: ToItemPermissionBlock
internal OpenSim.Framework.ItemPermissionBlock ToItemPermissionBlock(OpenMetaverse.UUID itemId)
{
return new OpenSim.Framework.ItemPermissionBlock
{
BasePermissions = this.BasePermissions,
CurrentPermissions = this.CurrentPermissions,
EveryOnePermissions = this.EveryonePermissions,
GroupPermissions = this.GroupPermissions,
ItemId = itemId,
NextPermissions = this.NextPermissions
};
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:12,代码来源:ItemPermissionBlockSnapshot.cs
示例18: 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);
}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:7,代码来源:BSLinksetCompound.cs
示例19: 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;
});
}
开发者ID:CassieEllen,项目名称:opensim,代码行数:34,代码来源:BSPrim.cs
示例20: 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")
{
// MainConsole.Instance.DebugFormat("{0}: BSPrim creation of {1}, id={2}", LogHeader, primName, localID);
_position = pos;
_size = size;
Scale = size; // prims are the size the user wants them to be (different for BSCharactes).
_orientation = rotation;
_buoyancy = 0f;
RawVelocity = OMV.Vector3.Zero;
_rotationalVelocity = OMV.Vector3.Zero;
BaseShape = pbs;
_isPhysical = pisPhysical;
_isVolumeDetect = false;
// We keep a handle to the vehicle actor so we can set vehicle parameters later.
VehicleActor = new BSDynamics(PhysicsScene, this, VehicleActorName);
PhysicalActors.Add(VehicleActorName, VehicleActor);
_mass = CalculateMass();
// DetailLog("{0},BSPrim.constructor,call", LocalID);
// do the actual object creation at taint time
PhysicsScene.TaintedObject("BSPrim.create", delegate()
{
// Make sure the object is being created with some sanity.
ExtremeSanityCheck(true /* inTaintTime */);
CreateGeomAndObject(true);
CurrentCollisionFlags = PhysicsScene.PE.GetCollisionFlags(PhysBody);
});
}
开发者ID:NanaYngvarrdottir,项目名称:WhiteCore-Dev,代码行数:34,代码来源:BSPrim.cs
注:本文中的OpenMetaverse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论