Пример #1
0
 /// <summary>
 /// Add a new reflection point or receiver point(destination) to this path
 /// </summary>
 /// <param name="nextPoint">the reflection point or receiver</param>
 /// <param name="powerAtThisPoint">Power in dbW at this point</param>
 public void addNextPoint(Vector3 nextPoint, double powerAtThisPoint)
 {
     //If there is a last ray then uses its endPoint as a start point for this new ray
     string rayID = rayTracerModel.getRayID();
     if (lastRay != null)
     {
         double newStartPower = powerAtThisPoint; 
         RayAsPathSection ray = new RayAsPathSection(lastRay.endPoint, nextPoint, newStartPower, rayID, rayTracerModel);
         rayList.Add(rayID, ray);
         lastRay = ray;
     }
     else //This is the first ray starting from the transmitter to the given 'nextPoint'
     {
         RayAsPathSection startRay = new RayAsPathSection(transmitterPos, nextPoint, rayTracerModel.runningPowerRT, rayID, rayTracerModel);
         rayList.Add(rayID, startRay);
         lastRay = startRay;
     }
 }
Пример #2
0
 /// <summary>
 /// Add a new reflection point or receiver point(destination) to this path
 /// </summary>
 /// <param name="nextPoint">the reflection point or receiver</param>
 /// <param name="primMaterial">Material number from 0-6 NOT refractive index.</param>
 public void addNextPoint(Vector3 nextPoint, int primMaterial)
 {
     //If there is a last ray then uses its endPoint as a start point for this new ray
     string rayID = rayTracerModel.getRayID();
     if (lastRay != null)
     {
         //At the moment, new power = last ray's min power. Once the ComputeRefloss() has been fixed, then 
         //uncomment the "- lastRay.getRefLoss(nextPoint, primMaterial);"
         double newStartPower = lastRay.minPower; // - lastRay.getRefLoss(nextPoint, primMaterial);
         RayAsPathSection ray = new RayAsPathSection(lastRay.endPoint, nextPoint, newStartPower, rayID, rayTracerModel);
         rayList.Add(rayID, ray);
         lastRay = ray;
     }
     else //This is the first ray starting from the transmitter to the given 'nextPoint'
     {
         RayAsPathSection startRay = new RayAsPathSection(transmitterPos, nextPoint, rayTracerModel.runningPowerRT, rayID, rayTracerModel);
         rayList.Add(rayID, startRay);
         lastRay = startRay;
     }
 }