Ejemplo n.º 1
0
        internal EnumReflectionSensor(ReflectionSensorInfo reflectionSensorInfo)
            : base(reflectionSensorInfo, GetEnumObservationSize(reflectionSensorInfo.GetMemberType()))
        {
            var memberType = reflectionSensorInfo.GetMemberType();

            m_Values  = Enum.GetValues(memberType);
            m_IsFlags = memberType.IsDefined(typeof(FlagsAttribute), false);
        }
Ejemplo n.º 2
0
 public ReflectionSensorBase(ReflectionSensorInfo reflectionSensorInfo, int size)
 {
     m_Object              = reflectionSensorInfo.Object;
     m_FieldInfo           = reflectionSensorInfo.FieldInfo;
     m_PropertyInfo        = reflectionSensorInfo.PropertyInfo;
     m_ObservableAttribute = reflectionSensorInfo.ObservableAttribute;
     m_SensorName          = reflectionSensorInfo.SensorName;
     m_Shape = new[] { size };
 }
Ejemplo n.º 3
0
 public ReflectionSensorBase(ReflectionSensorInfo reflectionSensorInfo, int size)
 {
     m_Object              = reflectionSensorInfo.Object;
     m_FieldInfo           = reflectionSensorInfo.FieldInfo;
     m_PropertyInfo        = reflectionSensorInfo.PropertyInfo;
     m_ObservableAttribute = reflectionSensorInfo.ObservableAttribute;
     m_SensorName          = reflectionSensorInfo.SensorName;
     m_ObservationSpec     = ObservationSpec.Vector(size);
     m_NumFloats           = size;
 }