22 internal System.Object objectValue {
get;
set; }
51 get {
return this.objectValue ==
null; }
67 this.objectValue =
new CesiumIntVec2(asInt2.x, asInt2.y);
70 this.objectValue =
new CesiumIntVec3(asInt3.x, asInt3.y, asInt3.z);
73 this.objectValue =
new CesiumIntVec4(asInt4.x, asInt4.y, asInt4.z, asInt4.w);
76 this.objectValue =
new CesiumUintVec2(asUint2.x, asUint2.y);
79 this.objectValue =
new CesiumUintVec3(asUint3.x, asUint3.y, asUint3.z);
82 this.objectValue =
new CesiumUintVec4(asUint4.x, asUint4.y, asUint4.z, asUint4.w);
85 this.objectValue =
new CesiumIntMat2x2(asInt2x2.c0, asInt2x2.c1);
88 this.objectValue =
new CesiumIntMat3x3(asInt3x3.c0, asInt3x3.c1, asInt3x3.c2);
91 this.objectValue =
new CesiumIntMat4x4(asInt4x4.c0, asInt4x4.c1, asInt4x4.c2, asInt4x4.c3);
93 case uint2x2 asUint2x2:
94 this.objectValue =
new CesiumUintMat2x2(asUint2x2.c0, asUint2x2.c1);
96 case uint3x3 asUint3x3:
97 this.objectValue =
new CesiumUintMat3x3(asUint3x3.c0, asUint3x3.c1, asUint3x3.c2);
99 case uint4x4 asUint4x4:
100 this.objectValue =
new CesiumUintMat4x4(asUint4x4.c0, asUint4x4.c1, asUint4x4.c2, asUint4x4.c3);
103 this.objectValue = value;
110 #region Public Methods
139 return ConvertToBoolean(
this, defaultValue);
173 return ConvertToSByte(
this, defaultValue);
207 return ConvertToByte(
this, defaultValue);
241 return ConvertToInt16(
this, defaultValue);
276 return ConvertToUInt16(
this, defaultValue);
312 return ConvertToInt32(
this, defaultValue);
346 return ConvertToUInt32(
this, defaultValue);
382 return ConvertToInt64(
this, defaultValue);
416 return ConvertToUInt64(
this, defaultValue);
451 return ConvertToFloat(
this, defaultValue);
485 return ConvertToDouble(
this, defaultValue);
520 return ConvertToInt2(
this, defaultValue);
555 return ConvertToUInt2(
this, defaultValue);
591 return ConvertToFloat2(
this, defaultValue);
623 return ConvertToDouble2(
this, defaultValue);
661 return ConvertToInt3(
this, defaultValue);
699 return ConvertToUInt3(
this, defaultValue);
738 return ConvertToFloat3(
this, defaultValue);
773 return ConvertToDouble3(
this, defaultValue);
811 return ConvertToInt4(
this, defaultValue);
849 return ConvertToUInt4(
this, defaultValue);
886 return ConvertToFloat4(
this, defaultValue);
921 return ConvertToDouble4(
this, defaultValue);
957 return ConvertToInt2x2(
this, defaultValue);
993 return ConvertToUInt2x2(
this, defaultValue);
1026 return defaultValue;
1029 return ConvertToFloat2x2(
this, defaultValue);
1059 return defaultValue;
1062 return ConvertToDouble2x2(
this, defaultValue);
1099 return defaultValue;
1102 return ConvertToInt3x3(
this, defaultValue);
1139 return defaultValue;
1142 return ConvertToUInt3x3(
this, defaultValue);
1179 return defaultValue;
1182 return ConvertToFloat3x3(
this, defaultValue);
1216 return defaultValue;
1219 return ConvertToDouble3x3(
this, defaultValue);
1253 return defaultValue;
1256 return ConvertToInt4x4(
this, defaultValue);
1288 return defaultValue;
1291 return ConvertToUInt4x4(
this, defaultValue);
1323 return defaultValue;
1326 return ConvertToFloat4x4(
this, defaultValue);
1357 return defaultValue;
1360 return ConvertToDouble4x4(
this, defaultValue);
1381 return defaultValue;
1384 return ConvertToString(
this, defaultValue);
1413 public static Dictionary<String, String>
GetValuesAsStrings(Dictionary<String, CesiumMetadataValue> values)
1415 Dictionary<String, String> result =
new Dictionary<String, String>(values.Count);
1416 foreach (KeyValuePair<String, CesiumMetadataValue> pair
in values)
1418 result.Add(pair.Key, pair.Value.GetString());
1425 #region Internal casts for Reinterop
1426 internal static bool? GetObjectAsBoolean(System.Object inObject)
1428 return inObject as
bool?;
1430 internal static SByte? GetObjectAsSByte(System.Object inObject)
1432 return inObject as SByte?;
1434 internal static Byte? GetObjectAsByte(System.Object inObject)
1436 return inObject as Byte?;
1438 internal static Int16? GetObjectAsInt16(System.Object inObject)
1440 return inObject as
Int16?;
1442 internal static UInt16? GetObjectAsUInt16(System.Object inObject)
1444 return inObject as
UInt16?;
1446 internal static Int32? GetObjectAsInt32(System.Object inObject)
1448 return inObject as
Int32?;
1450 internal static UInt32? GetObjectAsUInt32(System.Object inObject)
1452 return inObject as
UInt32?;
1454 internal static Int64? GetObjectAsInt64(System.Object inObject)
1456 return inObject as
Int64?;
1458 internal static UInt64? GetObjectAsUInt64(System.Object inObject)
1460 return inObject as
UInt64?;
1462 internal static float? GetObjectAsFloat(System.Object inObject)
1464 return inObject as
float?;
1466 internal static double? GetObjectAsDouble(System.Object inObject)
1468 return inObject as
double?;
1470 internal static CesiumIntVec2? GetObjectAsCesiumIntVec2(System.Object inObject)
1472 return inObject as CesiumIntVec2?;
1474 internal static CesiumIntVec3? GetObjectAsCesiumIntVec3(System.Object inObject)
1476 return inObject as CesiumIntVec3?;
1478 internal static CesiumIntVec4? GetObjectAsCesiumIntVec4(System.Object inObject)
1480 return inObject as CesiumIntVec4?;
1482 internal static CesiumUintVec2? GetObjectAsCesiumUintVec2(System.Object inObject)
1484 return inObject as CesiumUintVec2?;
1486 internal static CesiumUintVec3? GetObjectAsCesiumUintVec3(System.Object inObject)
1488 return inObject as CesiumUintVec3?;
1490 internal static CesiumUintVec4? GetObjectAsCesiumUintVec4(System.Object inObject)
1492 return inObject as CesiumUintVec4?;
1494 internal static float2? GetObjectAsFloat2(System.Object inObject)
1496 return inObject as float2?;
1498 internal static float3? GetObjectAsFloat3(System.Object inObject)
1500 return inObject as float3?;
1502 internal static float4? GetObjectAsFloat4(System.Object inObject)
1504 return inObject as float4?;
1506 internal static double2? GetObjectAsDouble2(System.Object inObject)
1508 return inObject as double2?;
1510 internal static double3? GetObjectAsDouble3(System.Object inObject)
1512 return inObject as double3?;
1514 internal static double4? GetObjectAsDouble4(System.Object inObject)
1516 return inObject as double4?;
1518 internal static CesiumIntMat2x2? GetObjectAsCesiumIntMat2x2(System.Object inObject)
1520 return inObject as CesiumIntMat2x2?;
1522 internal static CesiumIntMat3x3? GetObjectAsCesiumIntMat3x3(System.Object inObject)
1524 return inObject as CesiumIntMat3x3?;
1526 internal static CesiumIntMat4x4? GetObjectAsCesiumIntMat4x4(System.Object inObject)
1528 return inObject as CesiumIntMat4x4?;
1530 internal static CesiumUintMat2x2? GetObjectAsCesiumUintMat2x2(System.Object inObject)
1532 return inObject as CesiumUintMat2x2?;
1534 internal static CesiumUintMat3x3? GetObjectAsCesiumUintMat3x3(System.Object inObject)
1536 return inObject as CesiumUintMat3x3?;
1538 internal static CesiumUintMat4x4? GetObjectAsCesiumUintMat4x4(System.Object inObject)
1540 return inObject as CesiumUintMat4x4?;
1542 internal static float2x2? GetObjectAsFloat2x2(System.Object inObject)
1544 return inObject as float2x2?;
1546 internal static float3x3? GetObjectAsFloat3x3(System.Object inObject)
1548 return inObject as float3x3?;
1550 internal static float4x4? GetObjectAsFloat4x4(System.Object inObject)
1552 return inObject as float4x4?;
1554 internal static double2x2? GetObjectAsDouble2x2(System.Object inObject)
1556 return inObject as double2x2?;
1558 internal static double3x3? GetObjectAsDouble3x3(System.Object inObject)
1560 return inObject as double3x3?;
1562 internal static double4x4? GetObjectAsDouble4x4(System.Object inObject)
1564 return inObject as double4x4?;
1566 internal static String GetObjectAsString(System.Object inObject)
1568 return inObject as
String;
1573 #region Internal setters for Reinterop
1574 internal void SetObjectValue(
bool input)
1576 this.objectValue = input;
1578 internal void SetObjectValue(SByte input)
1580 this.objectValue = input;
1582 internal void SetObjectValue(Byte input)
1584 this.objectValue = input;
1586 internal void SetObjectValue(
Int16 input)
1588 this.objectValue = input;
1590 internal void SetObjectValue(
UInt16 input)
1592 this.objectValue = input;
1594 internal void SetObjectValue(
Int32 input)
1596 this.objectValue = input;
1598 internal void SetObjectValue(
UInt32 input)
1600 this.objectValue = input;
1602 internal void SetObjectValue(
Int64 input)
1604 this.objectValue = input;
1606 internal void SetObjectValue(
UInt64 input)
1608 this.objectValue = input;
1610 internal void SetObjectValue(
float input)
1612 this.objectValue = input;
1614 internal void SetObjectValue(
double input)
1616 this.objectValue = input;
1618 internal void SetObjectValue(CesiumIntVec2 input)
1620 this.objectValue = input;
1622 internal void SetObjectValue(CesiumIntVec3 input)
1624 this.objectValue = input;
1626 internal void SetObjectValue(CesiumIntVec4 input)
1628 this.objectValue = input;
1630 internal void SetObjectValue(CesiumUintVec2 input)
1632 this.objectValue = input;
1634 internal void SetObjectValue(CesiumUintVec3 input)
1636 this.objectValue = input;
1638 internal void SetObjectValue(CesiumUintVec4 input)
1640 this.objectValue = input;
1642 internal void SetObjectValue(float2 input)
1644 this.objectValue = input;
1646 internal void SetObjectValue(float3 input)
1648 this.objectValue = input;
1650 internal void SetObjectValue(float4 input)
1652 this.objectValue = input;
1654 internal void SetObjectValue(double2 input)
1656 this.objectValue = input;
1658 internal void SetObjectValue(double3 input)
1660 this.objectValue = input;
1662 internal void SetObjectValue(double4 input)
1664 this.objectValue = input;
1666 internal void SetObjectValue(CesiumIntMat2x2 input)
1668 this.objectValue = input;
1670 internal void SetObjectValue(CesiumIntMat3x3 input)
1672 this.objectValue = input;
1674 internal void SetObjectValue(CesiumIntMat4x4 input)
1676 this.objectValue = input;
1678 internal void SetObjectValue(CesiumUintMat2x2 input)
1680 this.objectValue = input;
1682 internal void SetObjectValue(CesiumUintMat3x3 input)
1684 this.objectValue = input;
1686 internal void SetObjectValue(CesiumUintMat4x4 input)
1688 this.objectValue = input;
1690 internal void SetObjectValue(float2x2 input)
1692 this.objectValue = input;
1694 internal void SetObjectValue(float3x3 input)
1696 this.objectValue = input;
1698 internal void SetObjectValue(float4x4 input)
1700 this.objectValue = input;
1702 internal void SetObjectValue(double2x2 input)
1704 this.objectValue = input;
1706 internal void SetObjectValue(double3x3 input)
1708 this.objectValue = input;
1710 internal void SetObjectValue(double4x4 input)
1712 this.objectValue = input;
1714 internal void SetObjectValue(
String input)
1716 this.objectValue = input;
1718 internal void SetObjectValue(CesiumPropertyArray input)
1720 this.objectValue = input;
1724 #region Internal static partial methods
1725 internal static partial
bool ConvertToBoolean(
CesiumMetadataValue value,
bool defaultValue);
1726 internal static partial SByte ConvertToSByte(
CesiumMetadataValue value, SByte defaultValue);
1734 internal static partial
float ConvertToFloat(
CesiumMetadataValue value,
float defaultValue);
1735 internal static partial
double ConvertToDouble(
CesiumMetadataValue value,
double defaultValue);
1737 internal static partial uint2 ConvertToUInt2(
CesiumMetadataValue value, uint2 defaultValue);
1738 internal static partial float2 ConvertToFloat2(
CesiumMetadataValue value, float2 defaultValue);
1739 internal static partial double2 ConvertToDouble2(
CesiumMetadataValue value, double2 defaultValue);
1741 internal static partial uint3 ConvertToUInt3(
CesiumMetadataValue value, uint3 defaultValue);
1742 internal static partial float3 ConvertToFloat3(
CesiumMetadataValue value, float3 defaultValue);
1743 internal static partial double3 ConvertToDouble3(
CesiumMetadataValue value, double3 defaultValue);
1745 internal static partial uint4 ConvertToUInt4(
CesiumMetadataValue value, uint4 defaultValue);
1746 internal static partial float4 ConvertToFloat4(
CesiumMetadataValue value, float4 defaultValue);
1747 internal static partial double4 ConvertToDouble4(
CesiumMetadataValue value, double4 defaultValue);
1748 internal static partial int2x2 ConvertToInt2x2(
CesiumMetadataValue value, int2x2 defaultValue);
1749 internal static partial uint2x2 ConvertToUInt2x2(
CesiumMetadataValue value, uint2x2 defaultValue);
1750 internal static partial float2x2 ConvertToFloat2x2(
CesiumMetadataValue value, float2x2 defaultValue);
1751 internal static partial double2x2 ConvertToDouble2x2(
CesiumMetadataValue value, double2x2 defaultValue);
1752 internal static partial int3x3 ConvertToInt3x3(
CesiumMetadataValue value, int3x3 defaultValue);
1753 internal static partial uint3x3 ConvertToUInt3x3(
CesiumMetadataValue value, uint3x3 defaultValue);
1754 internal static partial float3x3 ConvertToFloat3x3(
CesiumMetadataValue value, float3x3 defaultValue);
1755 internal static partial double3x3 ConvertToDouble3x3(
CesiumMetadataValue value, double3x3 defaultValue);
1756 internal static partial int4x4 ConvertToInt4x4(
CesiumMetadataValue value, int4x4 defaultValue);
1757 internal static partial uint4x4 ConvertToUInt4x4(
CesiumMetadataValue value, uint4x4 defaultValue);
1758 internal static partial float4x4 ConvertToFloat4x4(
CesiumMetadataValue value, float4x4 defaultValue);
1759 internal static partial double4x4 ConvertToDouble4x4(
CesiumMetadataValue value, double4x4 defaultValue);