Class RawDataset
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Namespace: IVLab.ABREngine
Assembly: IVLab.ABREngine.Runtime.dll
Syntax
[Serializable]
public class RawDataset
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
Constructors
| Improve this Doc View SourceRawDataset()
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public RawDataset()
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
RawDataset(JsonHeader, BinaryData)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public RawDataset(RawDataset.JsonHeader jh, RawDataset.BinaryData bd)
Parameters
Type | Name | Description |
---|---|---|
RawDataset.JsonHeader | jh | |
RawDataset.BinaryData | bd |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
Fields
| Improve this Doc View Sourcebounds
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public Bounds bounds
Field Value
Type | Description |
---|---|
Bounds |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
cellIndexCounts
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public int[] cellIndexCounts
Field Value
Type | Description |
---|---|
int[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
cellIndexOffsets
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public int[] cellIndexOffsets
Field Value
Type | Description |
---|---|
int[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
dataTopology
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public DataTopology dataTopology
Field Value
Type | Description |
---|---|
DataTopology |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
dimensions
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public Vector3Int dimensions
Field Value
Type | Description |
---|---|
Vector3Int |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
indexArray
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public int[] indexArray
Field Value
Type | Description |
---|---|
int[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
matrixArrayNames
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public string[] matrixArrayNames
Field Value
Type | Description |
---|---|
string[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
matrixArrays
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public Matrix4x4[][] matrixArrays
Field Value
Type | Description |
---|---|
Matrix4x4[][] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
scalarArrayNames
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public string[] scalarArrayNames
Field Value
Type | Description |
---|---|
string[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
scalarArrays
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public SerializableFloatArray[] scalarArrays
Field Value
Type | Description |
---|---|
SerializableFloatArray[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
scalarMaxes
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public float[] scalarMaxes
Field Value
Type | Description |
---|---|
float[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
scalarMins
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public float[] scalarMins
Field Value
Type | Description |
---|---|
float[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
vectorArrayNames
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public string[] vectorArrayNames
Field Value
Type | Description |
---|---|
string[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
vectorArrays
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public SerializableVectorArray[] vectorArrays
Field Value
Type | Description |
---|---|
SerializableVectorArray[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
vertexArray
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
[SerializeField]
public Vector3[] vertexArray
Field Value
Type | Description |
---|---|
Vector3[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
Methods
| Improve this Doc View SourceGetMatrixArray(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public Matrix4x4[] GetMatrixArray(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
Matrix4x4[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
GetScalarArray(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public float[] GetScalarArray(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
float[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
GetScalarMax(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public float GetScalarMax(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
float |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
GetScalarMin(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public float GetScalarMin(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
float |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
GetVectorArray(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public Vector3[] GetVectorArray(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
Vector3[] |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
GetVectorMax(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public Vector3 GetVectorMax(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
Vector3 |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
GetVectorMin(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public Vector3 GetVectorMin(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
Vector3 |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
HasScalarArray(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public bool HasScalarArray(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
bool |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
HasVectorArray(string)
The raw variable arrays and geometry for a Data Object. RawDatasets
can be loaded from a pair of .json and .bin files (JsonHeader and
BinaryData, respectively). This RawDataset defines the specification
for each of these files. RawDataset is not to be confused with
Dataset
, which represents a collection of RawDatasets which
share a coordinate space, key data, and variables.
Declaration
public bool HasVectorArray(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
bool |
Examples
A simple 4-vertex plane with no variables can be created like this:
RawDataset ds = new RawDataset();
ds.meshTopology = MeshTopology.Triangles;
ds.bounds = new Bounds(Vector3.zero, Vector3.one * 2.0f);
ds.vectorArrays = new SerializableVectorArray[0];
ds.vectorArrayNames = new string[0];
ds.scalarArrays = new SerializableFloatArray[0];
ds.scalarArrayNames = new string[0];
ds.scalarMins = new float[0];
ds.scalarMaxes = new float[0];
// Construct the vertices
Vector3[] vertices = {
new Vector3(-1, 0, -1), // 0
new Vector3( 1, 0, -1), // 1
new Vector3(-1, 0, 1), // 2
new Vector3( 1, 0, 1), // 3
};
ds.vertexArray = vertices;
// Construct triangle indices/faces - LEFT HAND RULE, outward-facing normals
int[] indices = {
// Bottom face
0, 1, 3,
0, 3, 2
};
ds.indexArray = indices;
// How many verts per cell are there? (each triangle is a cell)
int[] cellIndexCounts = { 3, 3 };
ds.cellIndexCounts = cellIndexCounts;
// Where does each cell begin?
int[] cellIndexOffsets = { 0, 3 };
ds.cellIndexOffsets = cellIndexOffsets;
|
Improve this Doc
View Source
ToFilePair()
Convert this raw dataset into a .json and .bin pair representation. Does not save the file, only returns a tuple.
Declaration
public Tuple<string, byte[]> ToFilePair()
Returns
Type | Description |
---|---|
Tuple<string, byte[]> | Returns a tuple (json data header, binary data file contents) |