Beispiel #1
0
 private void SetInputValues()
 {
     if (inputsCache.ContainsKey(sensationBlock_))
     {
         Inputs = inputsCache[sensationBlock_];
     }
     else
     {
         Inputs = SensationBlockInputs.DefaultInputsForBlock(blockHandle_, inputSourceHandle_);
     }
 }
Beispiel #2
0
        public static SensationBlockInputs DefaultInputsForBlock(uhsclHandle blockHandle, uhsclHandle inputSourceHandle)
        {
            SensationBlockInputs inputs = new SensationBlockInputs(SensationCore.Instance.BlockSupportsTransformField(blockHandle));

            int inputSize = SensationCore.Instance.InputCount(blockHandle);

            for (int i = 0; i < inputSize; i++)
            {
                var handle                = SensationCore.Instance.GetInputAtIndex(blockHandle, i);
                var defaultValue          = SensationCore.Instance.GetInputAsVector3ByIndex(inputSourceHandle, i);
                SensationBlockInput input = new SensationBlockInput {
                    Handle = handle, Value = defaultValue
                };
                inputs.AddInput(input);
            }
            return(inputs);
        }