コード例 #1
0
 private void LogError(NdkCameraMetadataType requestedType)
 {
     ARDebug.LogErrorFormat(
         "Error getting value from CameraMetadataType due to type mismatch. " +
         "requested type = {0}, internal type = {1}\n" +
         "Are you sure you are querying the correct type?", requestedType, _type);
 }
コード例 #2
0
 /// <summary>
 /// Constructs CameraMetadataValue using long. This constructor only sets the long field
 /// in the struct, leaving the rest of the data to default value.
 /// </summary>
 /// <param name="longValue">The long value set to the struct.</param>
 public CameraMetadataValue(long longValue)
 {
     m_ByteValue     = 0;
     m_IntValue      = 0;
     m_FloatValue    = 0;
     m_DoubleValue   = 0;
     m_RationalValue = new CameraMetadataRational();
     m_Type          = NdkCameraMetadataType.Int64;
     m_LongValue     = longValue;
 }
コード例 #3
0
 /// <summary>
 /// Constructs CameraMetadataValue using sbyte. This constructor only sets the sbyte field
 /// in the struct, leaving the rest of the data to default value.
 /// </summary>
 /// <param name="byteValue">The byte value set to the struct.</param>
 public CameraMetadataValue(sbyte byteValue)
 {
     m_IntValue      = 0;
     m_LongValue     = 0;
     m_FloatValue    = 0;
     m_DoubleValue   = 0;
     m_RationalValue = new CameraMetadataRational();
     m_Type          = NdkCameraMetadataType.Byte;
     m_ByteValue     = byteValue;
 }
コード例 #4
0
 /// <summary>
 /// Constructs CameraMetadataValue using CameraMetadataRational. This constructor only sets the CameraMetadataRational field
 /// in the struct, leaving the rest of the data to default value.
 /// </summary>
 /// <param name="rationalValue">The CameraMetadataRational value set to the struct.</param>
 public CameraMetadataValue(CameraMetadataRational rationalValue)
 {
     m_ByteValue     = 0;
     m_IntValue      = 0;
     m_LongValue     = 0;
     m_FloatValue    = 0;
     m_DoubleValue   = 0;
     m_Type          = NdkCameraMetadataType.Rational;
     m_RationalValue = rationalValue;
 }
コード例 #5
0
        /// <summary>
        /// Constructs CameraMetadataValue using long. This constructor only sets the long field
        /// in the struct, leaving the rest of the data to default value.
        /// </summary>
        /// <param name="longValue">The long value set to the struct.</param>
        public CameraMetadataValue(long longValue)
        {
            _byteValue     = 0;
            _intValue      = 0;
            _floatValue    = 0;
            _doubleValue   = 0;
            _rationalValue = new CameraMetadataRational();

            _type      = NdkCameraMetadataType.Int64;
            _longValue = longValue;
        }
コード例 #6
0
        /// <summary>
        /// Constructs CameraMetadataValue using sbyte. This constructor only sets the sbyte field
        /// in the struct, leaving the rest of the data to default value.
        /// </summary>
        /// <param name="byteValue">The byte value set to the struct.</param>
        public CameraMetadataValue(sbyte byteValue)
        {
            _intValue      = 0;
            _longValue     = 0;
            _floatValue    = 0;
            _doubleValue   = 0;
            _rationalValue = new CameraMetadataRational();

            _type      = NdkCameraMetadataType.Byte;
            _byteValue = byteValue;
        }
コード例 #7
0
        /// <summary>
        /// Constructs CameraMetadataValue using CameraMetadataRational. This constructor only sets
        /// the CameraMetadataRational field in the struct, leaving the rest of the data to default
        /// value.
        /// </summary>
        /// <param name="rationalValue">The CameraMetadataRational value set to the struct.</param>
        public CameraMetadataValue(CameraMetadataRational rationalValue)
        {
            _byteValue   = 0;
            _intValue    = 0;
            _longValue   = 0;
            _floatValue  = 0;
            _doubleValue = 0;

            _type          = NdkCameraMetadataType.Rational;
            _rationalValue = rationalValue;
        }
コード例 #8
0
        /**
         * \if english
         * @brief Construct a ARCameraMetadataValue using int.
         * @param intValue The int value set to the struct.
         * \else
         * @brief 使用int构建一个ARCameraMetadataValue。
         * @param intValue 要使用的int值。
         * \endif
         */
        public ARCameraMetadataValue(int intValue)
        {
            m_ByteValue     = 0;
            m_LongValue     = 0;
            m_FloatValue    = 0;
            m_DoubleValue   = 0;
            m_RationalValue = new ARCameraMetadataRational();

            m_Type     = NdkCameraMetadataType.Int32;
            m_IntValue = intValue;
        }
コード例 #9
0
 private void LogError(NdkCameraMetadataType requestedType)
 {
     ARDebug.LogError("Error getting value from ARCameraMetadataType due to type mismatch. " +
                      "requested type = {0}, internal type = {1}\n", requestedType, m_Type);
 }