当前位置: 首页>>代码示例>>C#>>正文


C# OpenMetaverse.Primitive类代码示例

本文整理汇总了C#中OpenMetaverse.Primitive的典型用法代码示例。如果您正苦于以下问题:C# Primitive类的具体用法?C# Primitive怎么用?C# Primitive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Primitive类属于OpenMetaverse命名空间,在下文中一共展示了Primitive类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Objects_OnObjectProperties11

 public void Objects_OnObjectProperties11(Simulator simulator, Primitive prim, Primitive.ObjectProperties props)
 {
     //Primitive prim = GetPrimitive(props.ObjectID, simulator);
     if (prim == null)
     {
         prim = GetPrimitive(props.ObjectID, simulator);
     }
     DeclareProperties(prim, props, simulator);
     if (prim != null)
     {
         prim.RegionHandle = simulator.Handle;
         SimObject updateMe = GetSimObject(prim, simulator);
         if (updateMe == null)
         {
             return;
         }
         if (prim.ParentID == 0 && !SimRegion.OutOfRegion(prim.Position))
         {
             updateMe.ResetPrim(prim, client, simulator);
         }
         if (MaintainObjectProperties)
         {
             //updateMe.Properties = null;
             updateMe.Properties = (props);
         }
         //Debug("UpdateProperties: {0}", updateMe.DebugInfo());
         describePrimToAI(prim, simulator);
     }
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:29,代码来源:WorldObjectData.cs

示例2: Objects_OnObjectProperties

        void Objects_OnObjectProperties(Simulator simulator, Primitive.ObjectProperties properties)
        {
            lock (PrimsWaiting) {
                Primitive prim;
                if (PrimsWaiting.TryGetValue(properties.ObjectID, out prim)) {
                    prim.Properties = properties;
                }
                PrimsWaiting.Remove(properties.ObjectID);

                if (PrimsWaiting.Count == 0)
                    AllPropertiesReceived.Set();
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:13,代码来源:FindObjectsCommand.cs

示例3: Objects_OnNewPrim

        void Objects_OnNewPrim(Simulator simulator, Primitive prim, ulong regionHandle, ushort timeDilation)
        {
            if (enabled)
            {
                // Search this prim for textures
                for (int i = 0; i < prim.Textures.FaceTextures.Length; i++)
                {
                    Primitive.TextureEntryFace face = prim.Textures.FaceTextures[i];

                    if (face != null)
                    {
                        if (!alreadyRequested.ContainsKey(face.TextureID))
                        {
                            alreadyRequested[face.TextureID] = face.TextureID;
                            Client.Assets.RequestImage(face.TextureID, ImageType.Normal);
                        }
                    }
                }
            }
        }
开发者ID:RavenB,项目名称:gridsearch,代码行数:20,代码来源:TexturesCommand.cs

示例4: Notecard

        public Notecard(RadegastInstance instance, InventoryNotecard notecard, Primitive prim)
        {
            InitializeComponent();
            Disposed += new EventHandler(Notecard_Disposed);

            this.instance = instance;
            this.notecard = notecard;
            this.prim = prim;

            Text = notecard.Name;

            rtbContent.DetectUrls = false;

            if (notecard.AssetUUID == UUID.Zero)
            {
                UpdateStatus("Blank");
            }
            else
            {
                rtbContent.Text = " ";
                UpdateStatus("Loading...");

                if (prim == null)
                {
                    client.Assets.RequestInventoryAsset(notecard, true, Assets_OnAssetReceived);
                }
                else
                {
                    client.Assets.RequestInventoryAsset(notecard.AssetUUID, notecard.UUID, prim.ID, prim.OwnerID, notecard.AssetType, true, Assets_OnAssetReceived);
                }
            }
        }
开发者ID:TooheyPaneer,项目名称:radegast,代码行数:32,代码来源:Notecard.cs

示例5: PrimitiveBaseShape

        public PrimitiveBaseShape(Primitive prim)
        {
            ExtraParams = new byte[1];

            _pathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
            _pathCurve = (byte)prim.PrimData.PathCurve;
            _pathEnd = Primitive.PackEndCut(prim.PrimData.PathEnd);
            _pathRadiusOffset = Primitive.PackPathTwist(prim.PrimData.PathRadiusOffset);
            _pathRevolutions = Primitive.PackPathRevolutions(prim.PrimData.PathRevolutions);
            _pathScaleX = Primitive.PackPathScale(prim.PrimData.PathScaleX);
            _pathScaleY = Primitive.PackPathScale(prim.PrimData.PathScaleY);
            _pathShearX = (byte)Primitive.PackPathShear(prim.PrimData.PathShearX);
            _pathShearY = (byte)Primitive.PackPathShear(prim.PrimData.PathShearY);
            _pathSkew = Primitive.PackPathTwist(prim.PrimData.PathSkew);
            _pathTaperX = Primitive.PackPathTaper(prim.PrimData.PathTaperX);
            _pathTaperY = Primitive.PackPathTaper(prim.PrimData.PathTaperY);
            _pathTwist = Primitive.PackPathTwist(prim.PrimData.PathTwist);
            _pathTwistBegin = Primitive.PackPathTwist(prim.PrimData.PathTwistBegin);
            _pCode = (byte)prim.PrimData.PCode;
            _profileBegin = Primitive.PackBeginCut(prim.PrimData.ProfileBegin);
            _profileEnd = Primitive.PackEndCut(prim.PrimData.ProfileEnd);
            _profileHollow = Primitive.PackProfileHollow(prim.PrimData.ProfileHollow);
            _scale = prim.Scale;
            _state = prim.PrimData.State;
        }
开发者ID:yooyke,项目名称:work,代码行数:25,代码来源:PrimitiveBaseShape.cs

示例6: SimMesh

 public SimMesh(MeshableObject simObject, Primitive prim, SimPathStore PS)
     : base(new Box3Fill(true), new List<Box3Fill>(), PS)
 {
     RootObject = simObject;
     Prim = prim;
     Update(RootObject);
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:SimMesh.cs

示例7: AvatarAppearance

        public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry,
                                byte[] visualParams)
        {
            //            MainConsole.Instance.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);

            m_serial = 1;
            m_owner = avatarID;

            if (wearables != null)
                m_wearables = wearables;
            else
                SetDefaultWearables();

            if (textureEntry != null)
                m_texture = textureEntry;
            else
                SetDefaultTexture();

            if (visualParams != null)
                m_visualparams = visualParams;
            else
                SetDefaultParams();

            SetHeight();

            m_attachments = new Dictionary<int, List<AvatarAttachment>>();
        }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:27,代码来源:AvatarAppearance.cs

示例8: CheckForBannedViewer

 /// <summary>
 /// Check to see if the client has baked textures that belong to banned clients
 /// </summary>
 /// <param name="client"></param>
 /// <param name="textureEntry"></param>
 public void CheckForBannedViewer(IClientAPI client, Primitive.TextureEntry textureEntry)
 {
     try
     {
         //Read the website once!
         if (m_map == null)
             m_map = (OSDMap)OSDParser.Deserialize(Utilities.ReadExternalWebsite("http://auroraserver.ath.cx:8080/client_tags.xml"));
         
         //This is the givaway texture!
         for (int i = 0; i < textureEntry.FaceTextures.Length; i++)
         {
             if (textureEntry.FaceTextures[i] != null)
             {
                 if (m_map.ContainsKey(textureEntry.FaceTextures[i].TextureID.ToString()))
                 {
                     OSDMap viewerMap = (OSDMap)m_map[textureEntry.FaceTextures[i].TextureID.ToString()];
                     //Check the names
                     if (BannedViewers.Contains(viewerMap["name"].ToString()))
                     {
                         client.Kick("You cannot use " + viewerMap["name"] + " in this sim.");
                         ((Scene)client.Scene).IncomingCloseAgent(client.AgentId);
                     }
                     else if (m_banEvilViewersByDefault && viewerMap.ContainsKey("evil") && (viewerMap["evil"].AsBoolean() == true))
                     {
                         client.Kick("You cannot use " + viewerMap["name"] + " in this sim.");
                         ((Scene)client.Scene).IncomingCloseAgent(client.AgentId);
                     }
                 }
             }
         }
     }
     catch { }
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:38,代码来源:BannedViewersModule.cs

示例9: Appearance_OnAppearanceUpdated

 //private object AsType(Object te, Type type, MemberInfo info)
 //{
 //    if (type.IsInstanceOfType(te)) return te;
 //    return new NullType(type);
 //}
 public override void Appearance_OnAppearanceUpdated(Primitive.TextureEntry te)
 {
     if (te!=null)
     {
         client.SendNetworkEvent("On-Appearance-Updated", te);                
     }
     //client.SendNetworkEvent("On-Appearance-Updated", AsType(te, typeof(Primitive.TextureEntry)));
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:13,代码来源:WorldEffects.cs

示例10: SimulationObject

 public SimulationObject(SimulationObject obj)
 {
     Prim = new Primitive(obj.Prim);
     Server = obj.Server;
     LinkNumber = obj.LinkNumber;
     Frozen = obj.Frozen;
     // Skip everything else because it can be lazily reconstructed
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:8,代码来源:SimulationObject.cs

示例11: AttachmentsListItem

        public AttachmentsListItem(Primitive prim, GridClient client, ListBox listBox)
        {
            this.prim = prim;
            this.client = client;
            this.listBox = listBox;

            client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_OnObjectProperties);
        }
开发者ID:NullProjects,项目名称:METAbolt,代码行数:8,代码来源:AttachmentsListItem.cs

示例12: ExportCollada

 public ExportCollada(RadegastInstance instance, Primitive prim)
     : base(instance)
 {
     InitializeComponent();
     Exporter = new DAEExport(instance, prim);
     Exporter.Progress += new EventHandler<DAEStatutsEventArgs>(Exporter_Progress);
     UpdateInfo();
     cbImageType.Text = "TGA";
 }
开发者ID:pcerioli,项目名称:radegast,代码行数:9,代码来源:ExportCollada.cs

示例13: DAEExport

 public DAEExport(RadegastInstance instance, Primitive requestedPrim)
 {
     Instance = instance;
     ImageFormat = "PNG";
     ConsolidateMaterials = true;
     SkipTransparentFaces = true;
     Mesher = new MeshmerizerR();
     Init(Client.Network.CurrentSim, requestedPrim);
 }
开发者ID:Booser,项目名称:radegast,代码行数:9,代码来源:DAEExport.cs

示例14: BuildFullUpdate

        public static ObjectUpdatePacket BuildFullUpdate(Primitive obj, ulong regionHandle, PrimFlags flags)
        {
            ObjectUpdatePacket update = new ObjectUpdatePacket();
            update.RegionData.RegionHandle = regionHandle;
            update.RegionData.TimeDilation = UInt16.MaxValue;
            update.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
            update.ObjectData[0] = BuildUpdateBlock(obj, regionHandle, flags);

            return update;
        }
开发者ID:3di,项目名称:3di-viewer-rei-libs,代码行数:10,代码来源:SimulationObject.cs

示例15: PayWindow

 public PayWindow(Primitive prim,int amount)
     : base(Gtk.WindowType.Toplevel)
 {
     this.Build();
     is_object=true;
     amountpay=amount;
     resident_key=prim.Properties.OwnerID;
     object_key=prim.Properties.ObjectID;
     object_name=prim.Properties.Name;
 }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:10,代码来源:PayWindow.cs


注:本文中的OpenMetaverse.Primitive类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。