Пример #1
0
 public LineAction(string key, LineState leftSensor, LineState rightSensor, LogicOp operation)
 {
     this.key         = key;
     this.leftSensor  = leftSensor;
     this.rightSensor = rightSensor;
     this.operation   = operation;
 }
Пример #2
0
        public LogicOp          Operation; // Seems to be logic operators such as clear, and, copy, equiv, inv, invand, etc.

        public BlendMode(Enums.BlendMode type, BlendModeControl src, BlendModeControl dest, LogicOp operation)
        {
            Type            = type;
            SourceFact      = src;
            DestinationFact = dest;
            Operation       = operation;
        }
Пример #3
0
 public BlendMode(EndianBinaryReader reader)
 {
     Type            = (Enums.BlendMode)reader.ReadByte();
     SourceFact      = (BlendModeControl)reader.ReadByte();
     DestinationFact = (BlendModeControl)reader.ReadByte();
     Operation       = (LogicOp)reader.ReadByte();
 }
Пример #4
0
        public LineAction(string key, XmlElement properties)
        {
            this.key = key;
            if (properties.Name != "properties")
            {
                throw new ActionException("Can't create the action");
            }
            foreach (XmlElement property in properties.ChildNodes)
            {
                switch (property.Name)
                {
                case "version":
                    break;

                case "leftSensor":
                    this.leftSensor = (LineState)Enum.Parse(typeof(LineState), property.InnerText);
                    break;

                case "rightSensor":
                    this.rightSensor = (LineState)Enum.Parse(typeof(LineState), property.InnerText);
                    break;

                case "operation":
                    this.operation = (LogicOp)Enum.Parse(typeof(LogicOp), property.InnerText);
                    break;

                default:
                    throw new ProjectException("Error el crear la acción");
                }
            }
        }
 public PipelineColorBlendStateCreateInfo(Bool32 LogicOpEnable, LogicOp LogicOp, PipelineColorBlendAttachmentState[] Attachments, Unmanaged.PipelineColorBlendStateCreateInfo.BlendConstantsInfo BlendConstants) : this()
 {
     this.LogicOpEnable  = LogicOpEnable;
     this.LogicOp        = LogicOp;
     this.Attachments    = Attachments;
     this.BlendConstants = BlendConstants;
 }
Пример #6
0
        private static void EmitLop(
            EmitterContext context,
            LogicOp logicOp,
            PredicateOp predOp,
            Operand srcA,
            Operand srcB,
            int rd,
            int destPred,
            bool invertA,
            bool invertB,
            bool extended,
            bool writeCC)
        {
            srcA = context.BitwiseNot(srcA, invertA);
            srcB = context.BitwiseNot(srcB, invertB);

            Operand res = logicOp switch
            {
                LogicOp.And => res = context.BitwiseAnd(srcA, srcB),
                LogicOp.Or => res  = context.BitwiseOr(srcA, srcB),
                LogicOp.Xor => res = context.BitwiseExclusiveOr(srcA, srcB),
                _ => srcB
            };

            EmitLopPredWrite(context, res, predOp, destPred);

            context.Copy(GetDest(rd), res);

            SetZnFlags(context, res, writeCC, extended);
        }
 public void UpdateSettings(ObstacleState upperLeftSensor, ObstacleState leftSensor, ObstacleState upperRightSensor, ObstacleState rightSensor, LogicOp operation)
 {
     this.upperLeftSensor  = upperLeftSensor;
     this.leftSensor       = leftSensor;
     this.upperRightSensor = upperRightSensor;
     this.rightSensor      = rightSensor;
     this.operation        = operation;
 }
 public ObstacleAction(string key, ObstacleState upperLeftSensor, ObstacleState leftSensor, ObstacleState upperRightSensor, ObstacleState rightSensor, LogicOp operation)
 {
     this.key              = key;
     this.upperLeftSensor  = upperLeftSensor;
     this.leftSensor       = leftSensor;
     this.upperRightSensor = upperRightSensor;
     this.rightSensor      = rightSensor;
     this.operation        = operation;
 }
Пример #9
0
        protected override void SaveSettings()
        {
            LineState left  = (LineState)Enum.ToObject(typeof(LineState), this.cbLeft.SelectedIndex);
            LineState right = (LineState)Enum.ToObject(typeof(LineState), this.cbRight.SelectedIndex);

            LogicOp operation = LogicOp.And;

            if (this.rbOr.Checked)
            {
                operation = LogicOp.Or;
            }

            this.action.UpdateSettings(left, right, operation);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="RenderTargetBlendDescription"/> struct.
 /// </summary>
 /// <param name="blendEnable">Specifies whether to enable (or disable) blending.</param>
 /// <param name="logicOpEnable">Specifies whether to enable (or disable) a logical operation.</param>
 /// <param name="srcBlend">
 /// A <see cref="Blend"/> value that specifies the operation to perform on the RGB value that the pixel shader outputs.
 /// The <see cref="BlendOp"/> member defines how to combine the <see cref="SrcBlend"/> and <see cref="DestBlend"/> operations.
 /// </param>
 /// <param name="destBlend">
 /// A <see cref="Blend"/> value that specifies the operation to perform on the current RGB value in the render target.
 /// The <see cref="BlendOp"/> member defines how to combine the <see cref="SrcBlend"/> and <see cref="DestBlend"/> operations.
 /// </param>
 /// <param name="blendOp">
 /// A <see cref="BlendOperation"/> value that defines how to combine the <see cref="SrcBlend"/> and <see cref="DestBlend"/> operations.
 /// </param>
 /// <param name="srcBlendAlpha">
 /// A <see cref="Blend"/> value that specifies the operation to perform on the alpha value that the pixel shader outputs.
 /// Blend options that end in _COLOR are not allowed.
 /// The <see cref="BlendOpAlpha"/> member defines how to combine the <see cref="SrcBlendAlpha"/> and <see cref="DestBlendAlpha"/> operations.
 /// </param>
 /// <param name="destBlendAlpha">
 /// A <see cref="Blend"/> value that specifies the operation to perform on the current alpha value in the render target.
 /// Blend options that end in _COLOR are not allowed.
 /// The <see cref="BlendOpAlpha"/> member defines how to combine the <see cref="SrcBlendAlpha"/> and <see cref="DestBlendAlpha"/> operations.
 /// </param>
 /// <param name="blendOpAlpha">
 /// A <see cref="BlendOperation"/> value that defines how to combine the <see cref="SrcBlendAlpha"/> and <see cref="DestBlendAlpha"/> operations.
 /// </param>
 /// <param name="logicOp">A <see cref="LogicOp"/> value that specifies the logical operation to configure for the render target.</param>
 /// <param name="renderTargetWriteMask">
 /// A combination of <see cref="ColorWriteEnable"/> values that are combined by using a bitwise OR operation.
 /// The resulting value specifies a write mask.
 /// </param>
 public RenderTargetBlendDescription(
     bool blendEnable,
     bool logicOpEnable,
     Blend srcBlend, Blend destBlend, BlendOperation blendOp,
     Blend srcBlendAlpha, Blend destBlendAlpha, BlendOperation blendOpAlpha,
     LogicOp logicOp = LogicOp.Noop, ColorWriteEnable renderTargetWriteMask = ColorWriteEnable.All
     )
 {
     BlendEnable           = blendEnable;
     LogicOpEnable         = logicOpEnable;
     SrcBlend              = srcBlend;
     DestBlend             = destBlend;
     BlendOp               = blendOp;
     SrcBlendAlpha         = srcBlendAlpha;
     DestBlendAlpha        = destBlendAlpha;
     BlendOpAlpha          = blendOpAlpha;
     LogicOp               = logicOp;
     RenderTargetWriteMask = renderTargetWriteMask;
 }
Пример #11
0
 public PipelineColorBlendStateCreateInfo
 (
     StructureType sType  = StructureType.PipelineColorBlendStateCreateInfo,
     void *pNext          = default,
     uint flags           = default,
     Bool32 logicOpEnable = default,
     LogicOp logicOp      = default,
     uint attachmentCount = default,
     PipelineColorBlendAttachmentState *pAttachments = default
 )
 {
     SType           = sType;
     PNext           = pNext;
     Flags           = flags;
     LogicOpEnable   = logicOpEnable;
     LogicOp         = logicOp;
     AttachmentCount = attachmentCount;
     PAttachments    = pAttachments;
 }
Пример #12
0
 /// <summary>
 /// specify a logical pixel operation for rendering.
 /// </summary>
 /// <param name="operation"></param>
 public LogicOperationState(LogicOp operation)
     : this(operation, true)
 {
 }
Пример #13
0
 public void LogicOp(LogicOp opcode)
 {
     gl.glLogicOp((int)opcode);
     CheckException();
 }
Пример #14
0
 public LogicExpression(Expression left, LogicOp op, Expression right)
 {
     Left  = left;
     Op    = op;
     Right = right;
 }
Пример #15
0
 public DepthFunction(LogicOp logicOp)
 {
     this.LogicOp = logicOp;
 }
Пример #16
0
 /// <summary>
 /// specify a logical pixel operation for rendering.
 /// </summary>
 /// <param name="operation"></param>
 /// <param name="enableCapacity">Enable() or Disable() this capacity?</param>
 public LogicOperationSwitch(LogicOp operation, bool enableCapacity)
     : base(OpenGL.GL_COLOR_LOGIC_OP, enableCapacity)
 {
     this.Operation = operation;
 }
Пример #17
0
 public DepthFunction(LogicOp logicOp)
 {
     this.LogicOp = logicOp;
 }
 public partial void CmdSetLogicOp([Count(Count = 0)] CommandBuffer commandBuffer, [Count(Count = 0)] LogicOp logicOp);
Пример #19
0
        public static Expression <Func <T, bool> > CreatePredicate(string input)
        {
            var     words       = input.Split();
            var     expressions = new Stack <Expression <Func <T, bool> > >();
            var     ops         = new Stack <LogicOp>();
            var     res         = PredicateBuilder.New <T>();
            var     temp        = PredicateBuilder.New <T>();
            LogicOp op          = LogicOp.None;
            Type    currentType = typeof(T);

            for (int i = 0; i < words.Length; i++)
            {
                switch (words[i])
                {
                case "(":
                    expressions.Push(res);
                    res  = PredicateBuilder.New <T>();
                    temp = PredicateBuilder.New <T>();
                    ops.Push(op);
                    op = LogicOp.None;
                    break;

                case ")":
                    var prev = expressions.Pop();
                    op = ops.Pop();
                    if (op == LogicOp.None)
                    {
                        res = prev;
                    }
                    else if (op == LogicOp.And)
                    {
                        res = prev.And(res);
                    }
                    else if (op == LogicOp.Or)
                    {
                        res = prev.Or(res);
                    }
                    break;

                case "and":
                    op = LogicOp.And;
                    break;

                case "or":
                    op = LogicOp.Or;
                    break;

                default:
                    var exp = GetPredicate(words[i], words[i + 1], words[i + 2]);
                    if (op == LogicOp.And)
                    {
                        res = PredicateBuilder.And(res, exp);
                    }
                    else if (op == LogicOp.Or)
                    {
                        res = PredicateBuilder.Or(res, exp);
                    }
                    else
                    {
                        res = exp;
                    }
                    i += 2;
                    break;
                }
            }
            return(res);
        }
Пример #20
0
 public static void operation(LogicOp op)
 {
     GL.LogicOp(op);
 }
Пример #21
0
 public AlphaFunction(LogicOp logicOp, float value)
 {
     this.LogicOp = logicOp;
     this.Value   = value;
 }
Пример #22
0
		internal static extern void glLogicOp(LogicOp opcode);
Пример #23
0
 /// <summary>
 /// specify a logical pixel operation for rendering.
 /// </summary>
 /// <param name="operation"></param>
 /// <param name="enableCapacity">Enable() or Disable() this capacity?</param>
 public LogicOperationState(LogicOp operation, bool enableCapacity)
     : base(OpenGL.GL_COLOR_LOGIC_OP, enableCapacity)
 {
     this.Operation = operation;
 }
Пример #24
0
 /// <summary>
 /// specify a logical pixel operation for rendering.
 /// </summary>
 /// <param name="operation"></param>
 public LogicOperationState(LogicOp operation) : this(operation, true)
 {
 }
Пример #25
0
 public AlphaFunction(LogicOp logicOp, float value)
 {
     this.LogicOp = logicOp;
     this.Value   = value;
 }
Пример #26
0
 internal static extern void glLogicOp(LogicOp opcode);
Пример #27
0
 public void UpdateSettings(LineState leftSensor, LineState rightSensor, LogicOp operation)
 {
     this.leftSensor  = leftSensor;
     this.rightSensor = rightSensor;
     this.operation   = operation;
 }
Пример #28
0
 /// <summary>
 /// specify a logical pixel operation for rendering.
 /// </summary>
 /// <param name="operation"></param>
 public LogicOperationSwitch(LogicOp operation) : this(operation, true)
 {
 }
Пример #29
0
 public static void LogicOp(LogicOp opcode)
 {
     gl.glLogicOp((int)opcode);
 }
Пример #30
0
 public static void glLogicOp(LogicOp opcode)
 {
     i_OpenGL1_0.glLogicOp(opcode);
 }
 public static extern void LogicOp( LogicOp opcode );
Пример #32
0
		public static void LogicOp(LogicOp opcode)
		{
			Debug.Assert(Delegates.pglLogicOp != null, "pglLogicOp not implemented");
			Delegates.pglLogicOp((Int32)opcode);
			CallLog("glLogicOp({0})", opcode);
			DebugCheckErrors();
		}
Пример #33
0
		public static void LogicOp(LogicOp opcode)
		{
			glLogicOp deleg = BaseGraphicsContext.Current.Loader.Get<glLogicOp>();
			if (deleg != null)
				deleg(opcode);
		}