Class KeyData
Lightweight container for a data object. From Key Data objects, scalar and vector variables can be obtained (see the example below).
Namespace: IVLab.ABREngine
Assembly: IVLab.ABREngine.Runtime.dll
Syntax
public class KeyData : IHasDataset, IABRInput
Examples
KeyData can be used to easily get ScalarDataVariables and VectorDataVariables from a dataset.
public class KeyDataExample : MonoBehaviour
{
void Start()
{
// Load some point data
string dataPath = "Demo/Wavelet/KeyData/Points";
KeyData kd = ABREngine.Instance.Data.LoadData(dataPath);
// Then, we can fetch variables:
// ALL the variables
kd.GetScalarVariables();
kd.GetVectorVariables();
// Only the names of the variables
kd.GetScalarVariableNames();
kd.GetVectorVariableNames();
// Fetch a specific scalar or vector variable by its name
kd.GetScalarVariable("XAxis");
kd.GetVectorVariable("Inward");
}
}
Constructors
| Improve this Doc View SourceKeyData(string, DataTopology)
Lightweight container for a data object. From Key Data objects, scalar and vector variables can be obtained (see the example below).
Declaration
public KeyData(string path, DataTopology topology)
Parameters
Type | Name | Description |
---|---|---|
string | path | |
DataTopology | topology |
Examples
KeyData can be used to easily get ScalarDataVariables and VectorDataVariables from a dataset.
public class KeyDataExample : MonoBehaviour
{
void Start()
{
// Load some point data
string dataPath = "Demo/Wavelet/KeyData/Points";
KeyData kd = ABREngine.Instance.Data.LoadData(dataPath);
// Then, we can fetch variables:
// ALL the variables
kd.GetScalarVariables();
kd.GetVectorVariables();
// Only the names of the variables
kd.GetScalarVariableNames();
kd.GetVectorVariableNames();
// Fetch a specific scalar or vector variable by its name
kd.GetScalarVariable("XAxis");
kd.GetVectorVariable("Inward");
}
}
Properties
| Improve this Doc View SourceGenre
"Genre" of the input - is it Data, a visual element, or something else?
Declaration
public ABRInputGenre Genre { get; }
Property Value
Type | Description |
---|---|
ABRInputGenre |
Path
Lightweight container for a data object. From Key Data objects, scalar and vector variables can be obtained (see the example below).
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
string |
Examples
KeyData can be used to easily get ScalarDataVariables and VectorDataVariables from a dataset.
public class KeyDataExample : MonoBehaviour
{
void Start()
{
// Load some point data
string dataPath = "Demo/Wavelet/KeyData/Points";
KeyData kd = ABREngine.Instance.Data.LoadData(dataPath);
// Then, we can fetch variables:
// ALL the variables
kd.GetScalarVariables();
kd.GetVectorVariables();
// Only the names of the variables
kd.GetScalarVariableNames();
kd.GetVectorVariableNames();
// Fetch a specific scalar or vector variable by its name
kd.GetScalarVariable("XAxis");
kd.GetVectorVariable("Inward");
}
}
|
Improve this Doc
View Source
Topology
Lightweight container for a data object. From Key Data objects, scalar and vector variables can be obtained (see the example below).
Declaration
public DataTopology Topology { get; }
Property Value
Type | Description |
---|---|
DataTopology |
Examples
KeyData can be used to easily get ScalarDataVariables and VectorDataVariables from a dataset.
public class KeyDataExample : MonoBehaviour
{
void Start()
{
// Load some point data
string dataPath = "Demo/Wavelet/KeyData/Points";
KeyData kd = ABREngine.Instance.Data.LoadData(dataPath);
// Then, we can fetch variables:
// ALL the variables
kd.GetScalarVariables();
kd.GetVectorVariables();
// Only the names of the variables
kd.GetScalarVariableNames();
kd.GetVectorVariableNames();
// Fetch a specific scalar or vector variable by its name
kd.GetScalarVariable("XAxis");
kd.GetVectorVariable("Inward");
}
}
Methods
| Improve this Doc View SourceGetDataset()
Lightweight container for a data object. From Key Data objects, scalar and vector variables can be obtained (see the example below).
Declaration
public Dataset GetDataset()
Returns
Type | Description |
---|---|
Dataset |
GetRawABRInput()
Get the "raw" ABR input - the one that is represented in the state JSON
Declaration
public RawABRInput GetRawABRInput()
Returns
Type | Description |
---|---|
RawABRInput |
GetRawDataset()
Lightweight container for a data object. From Key Data objects, scalar and vector variables can be obtained (see the example below).
Declaration
public RawDataset GetRawDataset()
Returns
Type | Description |
---|---|
RawDataset |
Examples
KeyData can be used to easily get ScalarDataVariables and VectorDataVariables from a dataset.
public class KeyDataExample : MonoBehaviour
{
void Start()
{
// Load some point data
string dataPath = "Demo/Wavelet/KeyData/Points";
KeyData kd = ABREngine.Instance.Data.LoadData(dataPath);
// Then, we can fetch variables:
// ALL the variables
kd.GetScalarVariables();
kd.GetVectorVariables();
// Only the names of the variables
kd.GetScalarVariableNames();
kd.GetVectorVariableNames();
// Fetch a specific scalar or vector variable by its name
kd.GetScalarVariable("XAxis");
kd.GetVectorVariable("Inward");
}
}
|
Improve this Doc
View Source
GetScalarVariable(string)
Get a specific scalar variable that exists within this key data object
Declaration
public ScalarDataVariable GetScalarVariable(string varName)
Parameters
Type | Name | Description |
---|---|---|
string | varName |
Returns
Type | Description |
---|---|
ScalarDataVariable |
GetScalarVariableNames()
Get the names of every scalar variable associated with this key data object
Declaration
public string[] GetScalarVariableNames()
Returns
Type | Description |
---|---|
string[] |
GetScalarVariables()
Get all of the scalar data variables associated with this key data object
Declaration
public ScalarDataVariable[] GetScalarVariables()
Returns
Type | Description |
---|---|
ScalarDataVariable[] |
GetVectorVariable(string)
Get a specific vector variable that exists within this key data object
Declaration
public VectorDataVariable GetVectorVariable(string varName)
Parameters
Type | Name | Description |
---|---|---|
string | varName |
Returns
Type | Description |
---|---|
VectorDataVariable |
GetVectorVariableNames()
Get the names of every vector variable associated with this key data object
Declaration
public string[] GetVectorVariableNames()
Returns
Type | Description |
---|---|
string[] |
GetVectorVariables()
Get all of the vector data variables associated with this key data object
Declaration
public VectorDataVariable[] GetVectorVariables()
Returns
Type | Description |
---|---|
VectorDataVariable[] |