Basic ABREngine Terminology
Beyond the key data, visasset, and data impression metaphors, there are also some new concepts and terminology that you'll need to work with the ABR Engine via C# scripting in Unity.
ABREngine
The ABREngine is the main class with which visualizations are constructed. ABREngine exists as a singleton object in the Unity scene, that is, there is only ONE instance of ABREngine the entire time Unity is running. You can access the running instance easily in code with ABREngine.Instance; for example, you can use any of the following important methods and objects in this manner:
- ABREngine.
Instance. - single instanceSingle instance of the VisAssetManager (you can load or get visassets with this object)Vis Assets - ABREngine.
Instance. - Single instance of the DataManager (you can load or get data with this object)Data - ABREngine.
Instance. - Connect the data and visuals together in the engineRegister Data Impression() - ABRengine.
Instance. - Display the visualizationRender()
RawDataset
A Raw
The following example shows how to construct and import a simple dataset of 3 points:
// Build a simple list of 3D points
List<Vector3> points = new List<Vector3> { Vector3.zero, Vector3.one, 2*Vector3.one };
// We need to provide a bounding box for the data so ABR knows where it can safely place the visualization in space.
// The data should NEVER go outside these bounds.
Bounds b = new Bounds(Vector3.zero, 2*Vector3.one);
// Standardize these points into a format ABR can understand
RawDataset abrPoints = RawDatasetAdapter.PointsToPoints(points, b, null, null);
// Then, import the data so we can use it in a visualization
KeyData pointsKD = ABREngine.Instance.Data.ImportRawDataset(abrPoints);
Read the docs on ABREngine.
DataImpressionGroup
Data impressions can be "grouped" in your ABR scene, which makes it easier to move data impressions around (e.g., for a side-by-side visualization). Check out the DataImpressionGroup example in the ABREngine for more information.