private HashSet <Connection> QueryConnection(Vector3 position, Connection.ConnectionType srcType) { HashSet <Connection> result = new HashSet <Connection>(); // PhysicsScene var physicsScene = gameObject.scene.GetPhysicsScene(); var hits = physicsScene.OverlapSphere(position, .05f, BrickBuildingUtility.colliderBuffer, LayerMask.GetMask(Connection.connectivityFeatureLayerName), QueryTriggerInteraction.Collide); for (var i = 0; i < hits; i++) { var overlap = BrickBuildingUtility.colliderBuffer[i]; var connection = overlap.GetComponent <Connection>(); if (connection == null) { continue; } if (Connection.MatchTypes(srcType, connection.connectionType)) { result.Add(connection); } } return(result); }
public Connection.ConnectionType type() { Connection.ConnectionType ret = (Connection.ConnectionType)msclPINVOKE.Connection_type(swigCPtr); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool IsConnectionTypeSupported(Connection.ConnectionType connectionType) { return(currentlySupportedConnectionTypes.Contains(connectionType)); }