Beispiel #1
0
        public void RecalculateInteractions(FoliageReceiver receiver)
        {
            Clear(false, defaultColor);
            var relevantInteractions = BaseInteraction.GetRelevantInteractions(receiver);

            for (int i = 0; i < relevantInteractions.Count; i++)
            {
                relevantInteractions[i].UpdateInteraction(receiver);
            }

            SetPixels32();
        }
Beispiel #2
0
        public static List <FoliageReceiver> GetRelevantReceivers(BaseInteraction interaction)
        {
            List <FoliageReceiver> relevantReceivers = new List <FoliageReceiver>();
            FoliageReceiver        receiver;

            for (int i = 0; i < FReceivers.Count; i++)
            {
                receiver = FReceivers[i];

                if (Vector3.Distance(receiver.threadPositionDepth, interaction.threadPositionDepth) <= receiver.interactionMap.radius)
                {
                    relevantReceivers.Add(receiver);
                }
            }

            return(relevantReceivers);
        }