| | |
| | using UnityEngine; |
| | using System.Collections.Generic; |
| |
|
| | public class FieldRenderer : MonoBehaviour |
| | { |
| | public static List<QuaternionEdge> Edges = new List<QuaternionEdge>(27841); |
| | |
| | [System.Serializable] |
| | public class QuaternionEdge |
| | { |
| | public Vector4 quat; |
| | public Vector3 center; |
| | public float ghr_norm; |
| | public int arity; |
| | } |
| | |
| | public void RenderHypergraph(List<QuaternionEdge> edges) |
| | { |
| | foreach(var edge in edges) |
| | { |
| | GameObject node = Instantiate(EdgePrefab); |
| | node.transform.position = edge.center; |
| | node.transform.rotation = new Quaternion(edge.quat.x, edge.quat.y, edge.quat.z, edge.quat.w); |
| | |
| | |
| | var emitter = node.GetComponent<ParticleSystem>(); |
| | emitter.emissionRate = edge.ghr_norm * 100f; |
| | } |
| | } |
| | } |