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


C# FastList类代码示例

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


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

示例1: DynamicEffectCompiler

        /// <summary>
        /// Initializes a new instance of the <see cref="DynamicEffectCompiler" /> class.
        /// </summary>
        /// <param name="services">The services.</param>
        /// <param name="effectName">Name of the effect.</param>
        /// <param name="asyncDynamicEffectCompiler">if set to <c>true</c> it can compile effect asynchronously.</param>
        /// <exception cref="System.ArgumentNullException">services
        /// or
        /// effectName</exception>
        public DynamicEffectCompiler(IServiceRegistry services, string effectName, int taskPriority = 0)
        {
            if (services == null) throw new ArgumentNullException("services");
            if (effectName == null) throw new ArgumentNullException("effectName");

            Services = services;
            this.effectName = effectName;
            this.taskPriority = taskPriority;
            EffectSystem = Services.GetSafeServiceAs<EffectSystem>();
            GraphicsDevice = Services.GetSafeServiceAs<IGraphicsDeviceService>().GraphicsDevice;
            parameterCollections = new FastList<ParameterCollection>();

            // Default behavior for fallback effect: load effect with same name but empty compiler parameters
            ComputeFallbackEffect = (dynamicEffectCompiler, type, name, parameters) =>
            {
                ParameterCollection usedParameters;
                var compilerParameters = new CompilerParameters();

                // We want high priority
                compilerParameters.TaskPriority = -1;

                var effect = dynamicEffectCompiler.EffectSystem.LoadEffect(effectName, compilerParameters, out usedParameters).WaitForResult();
                return new ComputeFallbackEffectResult(effect, usedParameters);
            };
        }
开发者ID:Powerino73,项目名称:paradox,代码行数:34,代码来源:DynamicEffectCompiler.cs

示例2: DebugInfo

 internal DebugInfo()
 {
     Scopes = new FastList<ScopeSym>();
     Lines = new FastList<LineSym>();
     Vars = new FastList<VarSym>();
     Functions = new FastList<FunSym>();
 }
开发者ID:rizwan3d,项目名称:elalang,代码行数:7,代码来源:DebugInfo.cs

示例3: EffectBarRenderer

 public EffectBarRenderer(Bar bar, IEffectBarRendererInfo info)
     : base(bar)
 {
     _info = info;
     _uniqueEffectGlyphs = new FastList<FastList<EffectGlyph>>();
     _effectGlyphs = new FastList<FastDictionary<int, EffectGlyph>>();
 }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:7,代码来源:EffectBarRenderer.cs

示例4: GroupedBarRenderer

 public GroupedBarRenderer(Bar bar)
     : base(bar)
 {
     _preBeatGlyphs = new FastList<Glyph>();
     _voiceContainers = new FastDictionary<int, VoiceContainerGlyph>();
     _postBeatGlyphs = new FastList<Glyph>();
 }
开发者ID:eriser,项目名称:alphaTab,代码行数:7,代码来源:GroupedBarRenderer.cs

示例5: EffectReflection

 /// <summary>
 /// Initializes a new instance of the <see cref="EffectReflection"/> class.
 /// </summary>
 public EffectReflection()
 {
     SamplerStates = new List<EffectSamplerStateBinding>();
     ResourceBindings = new FastList<EffectResourceBindingDescription>();
     ConstantBuffers = new List<EffectConstantBufferDescription>();
     ShaderStreamOutputDeclarations = new List<ShaderStreamOutputDeclarationEntry>();
 }
开发者ID:Kryptos-FR,项目名称:xenko-reloaded,代码行数:10,代码来源:EffectReflection.cs

示例6: OptionPopUp

        public OptionPopUp(string message)
            : this(message, true)
        {
            //load saved values here
            options = new FastList<OptionFunc>();
            options.Add(ChangeMusicVol);
            options.Add(ChangeFxVol);
            options.Add(ChangeGore);
            options.Add(ChangeMoreGore);
            options.Add(ChangeStrum);

            if (!Stage.Editor)
            {
                strumMode = Stage.SaveGame.getStrumMode();
                Stage.SaveGame.getGores(out gore, out moreGore);
                Stage.SaveGame.getVolumes(out musicVol, out fxVol);
            }

            origFXVol = fxVol;
            origGore = gore;
            origMoreGore = moreGore;
            origMusicVol = musicVol;
            PlayerAgent.isStrumMode = strumMode;
            origStrumMode = strumMode;
            Stage.ActiveStage.PauseGame();
        }
开发者ID:scotttorgeson,项目名称:HeroesOfRock,代码行数:26,代码来源:OptionPopUp.cs

示例7: ScoreNoteChordGlyph

 public ScoreNoteChordGlyph()
     : base(0, 0)
 {
     _infos = new FastList<ScoreNoteGlyphInfo>();
     BeatEffects = new FastDictionary<string, Glyph>();
     _noteLookup = new FastDictionary<int, Glyph>();
 }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:7,代码来源:ScoreNoteChordGlyph.cs

示例8: ProcessPacket

        public static void ProcessPacket(FastList<byte> packet)
        {
            if (packet == null || packet.Count < 4) {
                throw new System.Exception("Packet is null or not valid length");
            }
            int frameCount = BitConverter.ToInt32 (packet.innerArray, 0);
            int index = 4;

            if (FrameManager.HasFrame (frameCount) == false) {
                Frame frame = new Frame ();

                if (packet.Count > 4) {
                    RecordedBytes.AddRange (BitConverter.GetBytes ((ushort)packet.Count));
                    RecordedBytes.AddRange (packet);
                    while (index < packet.Count) {
                        Command com = new Command ();
                        index += com.Reconstruct (packet.innerArray, index);
                        frame.AddCommand (com);
                    }
                    if (frameCount > LastCommandedFrameCount) {
                        LastCommandedFrameCount = frameCount;
                    }
                }
                FrameManager.AddFrame (frameCount, frame);

            } else {

            }
        }
开发者ID:simutronics,项目名称:Lockstep-Framework,代码行数:29,代码来源:CommandManager.cs

示例9: FrustumCulling

        // TODO: Find a way to replug this

        /// <summary>
        /// Adds a default frustum culling for rendering only meshes that are only inside the frustum/
        /// </summary>
        /// <param name="modelRenderer">The model renderer.</param>
        /// <returns>ModelRenderer.</returns>
        //public static ModelComponentRenderer AddDefaultFrustumCulling(this ModelComponentRenderer modelRenderer)
        //{
        //    modelRenderer.UpdateMeshes = FrustumCulling;
        //    return modelRenderer;
        //}

        private static void FrustumCulling(RenderContext context, FastList<RenderMesh> meshes)
        {
            Matrix viewProjection, mat1, mat2;

            // Compute view * projection
            context.Parameters.Get(TransformationKeys.View, out mat1);
            context.Parameters.Get(TransformationKeys.Projection, out mat2);
            Matrix.Multiply(ref mat1, ref mat2, out viewProjection);

            var frustum = new BoundingFrustum(ref viewProjection);

            for (var i = 0; i < meshes.Count; ++i)
            {
                var renderMesh = meshes[i];

                // Fast AABB transform: http://zeuxcg.org/2010/10/17/aabb-from-obb-with-component-wise-abs/
                // Get world matrix
                renderMesh.Mesh.Parameters.Get(TransformationKeys.World, out mat1);

                // Compute transformed AABB (by world)
                var boundingBoxExt = new BoundingBoxExt(renderMesh.Mesh.BoundingBox);
                boundingBoxExt.Transform(mat1);

                // Perform frustum culling
                if (!frustum.Contains(ref boundingBoxExt))
                {
                    meshes.SwapRemoveAt(i--);
                }
            }
        }
开发者ID:Powerino73,项目名称:paradox,代码行数:43,代码来源:ModelRendererExtensions.cs

示例10: RModel

        public RModel(ParameterSet parm)
        {
            ModelInfo m;
            m.modelName = parm.GetString("ModelName");
            Name = m.modelName;

            ShadowDrawLists = new FastList<RModelInstance>[Sun.NUM_CASCADES];
            for (int i = 0; i < ShadowDrawLists.Length; i++)
                ShadowDrawLists[i] = new FastList<RModelInstance>();

            if (parm.HasParm("BumpMap"))
                IsBumpMapped = true;
            if (parm.HasParm("Shininess"))
                Shininess = parm.GetFloat("Shininess");
            if (parm.HasParm("SpecularPower"))
                SpecularPower = parm.GetFloat("SpecularPower");
            if (parm.HasParm("SpecularMap"))
                IsSpecularMapped = true;
            if (parm.HasParm("CastsShadows"))
                CastsShadows = parm.GetBool("CastsShadows");
            if (parm.HasParm("ReceivesShadows"))
                ReceivesShadows = parm.GetBool("ReceivesShadows");
            if (parm.HasParm("AlphaBlend"))
                AlphaBlend = parm.GetBool("AlphaBlend");

            m.textureName = "";
            if (parm.HasParm("Texture"))
                m.textureName = parm.GetString("Texture");

            modelDictionary.Add(m, this);
            Renderer.Instance.AddRModel(this);
        }
开发者ID:scotttorgeson,项目名称:HeroesOfRock,代码行数:32,代码来源:RModel.cs

示例11: CallPoint

 internal CallPoint(int modHandle, EvalStack stack, ElaValue[] locals, FastList<ElaValue[]> captures)
 {
     ModuleHandle = modHandle;
     Locals = locals;
     Captures = captures;
     Stack = stack;
 }
开发者ID:rizwan3d,项目名称:elalang,代码行数:7,代码来源:CallPoint.cs

示例12: Reconstruct

        public int Reconstruct(AgentController agentController, byte[] source, int startIndex)
        {
            curIndex = startIndex;
            Header = BitConverter.ToUInt64 (source, curIndex);
            curIndex += 8;

            if (selectedAgentLocalIDs == null)
                selectedAgentLocalIDs = new FastList<int> (64);
            else
                selectedAgentLocalIDs.FastClear ();

            for (i = 0; i < 64; i++) {
                castedBigIndex = (ulong)1 << i;
                if ((Header & castedBigIndex) == castedBigIndex) {
                    CullGroup = source [curIndex++];
                    for (j = 0; j < 8; j++) {
                        castedSmallIndex = (byte)(1 << j);
                        if ((CullGroup & (castedSmallIndex)) == castedSmallIndex)
                        {
                            selectedAgentLocalIDs.Add (i * 8 + j);
                        }
                    }
                }
            }
            return curIndex - startIndex;
        }
开发者ID:NotYours180,项目名称:Lockstep-Framework,代码行数:26,代码来源:Selection.cs

示例13: Blueprint

        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        /// <param name="group">Market Group the Blueprint will be a member of.</param>
        /// <param name="src">Source serializable blueprint.</param>
        internal Blueprint(BlueprintMarketGroup group, SerializableBlueprint src)
            : base(group, src)
        {

            m_maxProductionLimit = src.MaxProductionLimit;
            m_produceItemID = src.ProduceItemID;
            m_productionTime= src.ProductionTime;
            m_productivityModifier = src.ProductivityModifier;
            m_researchCopyTime = src.ResearchCopyTime;
            m_researchMaterialTime = src.ResearchMaterialTime;
            m_researchProductivityTime = src.ResearchProductivityTime;
            m_researchTechTime = src.ResearchTechTime;
            m_techLevel = src.TechLevel;
            m_wasteFactor = src.WasteFactor;

            // Invented blueprint
            m_inventBlueprint = new FastList<int>(src.InventionTypeID != null ? src.InventionTypeID.Length : 0);
            if (src.InventionTypeID != null)
            {
                foreach (var blueprintID in src.InventionTypeID)
                {
                    m_inventBlueprint.Add(blueprintID);
                }
            }

            // Materials prerequisites
            m_materialRequirements = new FastList<StaticRequiredMaterial>(src.ReqMaterial != null ? src.ReqMaterial.Length : 0);
            if (src.ReqMaterial == null)
                return;
            
            foreach (var prereq in src.ReqMaterial)
            {
                m_materialRequirements.Add(new StaticRequiredMaterial(prereq));
            }
        }
开发者ID:wow4all,项目名称:evemu_server,代码行数:40,代码来源:Blueprint.cs

示例14: Note

        public Note()
        {
            BendPoints = new FastList<BendPoint>();
            Dynamic = DynamicValue.F;

            Accentuated = AccentuationType.None;
            Fret = int.MinValue;
            HarmonicType = HarmonicType.None;
            SlideType = SlideType.None;
            Vibrato = VibratoType.None;

            LeftHandFinger = Fingers.Unknown;
            RightHandFinger = Fingers.Unknown;

            TrillValue = -1;
            TrillSpeed = Duration.ThirtySecond;
            DurationPercent = 1;

            Octave = -1;
            Tone = -1;

            Fret = -1;
            String = -1;

            Element = -1;
            Variation = -1;
        }
开发者ID:CoderLine,项目名称:alphaTab,代码行数:27,代码来源:Note.cs

示例15: ScanAll

        public void ScanAll(int deltaCount, FastList<LSAgent> outputAgents,
		                      bool CheckAllegiance = false,
		                      AllegianceType allegianceType = AllegianceType.Neutral)
        {
            for (i = 0; i < deltaCount; i++) {
                tempNode = GridManager.GetNode (
                    LocatedNode.gridX + DeltaCache.CacheX[i],
                    LocatedNode.gridY + DeltaCache.CacheY[i]);

                if (tempNode != null && tempNode.LocatedAgents != null) {
                    tempBucket = tempNode.LocatedAgents;
                    for (j = 0; j < tempBucket.PeakCount; j++) {
                        if (LSUtility.GetBitTrue (tempBucket.arrayAllocation, j)) {
                            tempAgent = tempBucket.innerArray [j].Agent;
                            if (System.Object.ReferenceEquals (tempAgent, Agent) == false) {
                                if (CheckAllegiance)
                                {
                                    if (Agent.MyAgentController.DiplomacyFlags
                                        [tempAgent.MyAgentController.ControllerID] != allegianceType) continue;
                                }
                                outputAgents.Add (tempAgent);
                            }
                        }
                    }
                }
            }
        }
开发者ID:NotYours180,项目名称:Lockstep-Framework,代码行数:27,代码来源:LSInfluencer.cs


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