3 using System.Collections;
4 using System.Collections.Generic;
14 orientation =
new Quaternion( (
float)vj.orientation[0],(
float) vj.orientation[1], (
float)vj.orientation[2], (
float)vj.orientation[3] );
15 scale =
new Vector3( (
float)vj.scale[0], (
float)vj.scale[1], (
float)vj.scale[2] );
16 opacities =
new Dictionary<string, double>();
17 if( vj.opacityKeys.Count == vj.opacityValues.Count )
19 int numEntries = vj.opacityKeys.Count;
20 for(
int i = 0; i < numEntries; i ++ )
22 opacities.Add( vj.opacityKeys[i], vj.opacityValues[i] );
25 throw new System.Exception(
"Number of opacity values incorrect. Number of opacity keys and number of opacities must match!");
29 opacities =
new Dictionary<string, double>();
31 public string name {
get; set; }
32 public Quaternion orientation {
get; set; }
33 public Vector3 scale {
get; set; }
34 public Dictionary<string, double> opacities {
get; set; }
40 orientation =
new double[4];
41 scale =
new double[3];
45 opacityKeys =
new List<string>();
46 opacityValues =
new List<double>();
51 orientation =
new double[4];
52 orientation[0] = (double)v.orientation.x;
53 orientation[1] = (
double)v.orientation.y;
54 orientation[2] = (double)v.orientation.z;
55 orientation[3] = (
double)v.orientation.w;
56 scale =
new double[3];
57 scale[0] = (double)v.scale.x;
58 scale[1] = (
double)v.scale.y;
59 scale[2] = (double)v.scale.z;
60 opacityKeys = v.opacities.Keys.ToList();
61 opacityValues = v.opacities.Values.ToList();
72 public string name {
get; set; }
73 public double[] orientation {
get; set; }
74 public double[] scale {
get; set; }
77 public List<string> opacityKeys {
get; set; }
78 public List<double> opacityValues {
get; set; }