Exemple #1
0
 internal static Point3d RandomPoint(Point3d min, Point3d max)
 {
   double x = Random.RandomDouble(min.X, max.X);
   double y = Random.RandomDouble(min.Y, max.Y);
   double z = Random.RandomDouble(min.Z, max.Z);
   return new Point3d(x, y, z);
 }
Exemple #2
0
 public Bounds(Point3d min, Point3d max)
 {
   Vector3 lb = new Vector3((float)min.X, (float)min.Y, (float)min.Z);
   Vector3 rt = new Vector3((float)max.X, (float)max.Y, (float)max.Z);
   this.center = new Vector3((lb.X + rt.X) / 2, (lb.Y + rt.Y) / 2, (lb.Z + rt.Z) / 2);
   this.r = new Vector3(rt.X - center.X, rt.Y - center.Y, rt.Z - center.Z);
   this.lb = lb;
   this.rt = rt;
 }
Exemple #3
0
 public static double DistanceSquared(Point3d p1, Point3d p2)
 {
   return (Math.Pow(p1.X - p2.X, 2) +
                            Math.Pow(p1.Y - p2.Y, 2) +
                            Math.Pow(p1.Z - p2.Z, 2));
 }
Exemple #4
0
 public AgentType(AgentType agent)
 {
   this.position = agent.position;
   this.refPosition = agent.refPosition;
 }
Exemple #5
0
    public AgentType(AgentType agent, Point3d position, Point3d refPosition)
    {

      this.position = position;
      this.refPosition = refPosition;
    }
Exemple #6
0
 public AgentType(Point3d position)
 {
   this.position = position;
   this.refPosition = position;
 }
Exemple #7
0
 public AgentType()
 {
   this.position = Point3d.Origin;
   this.refPosition = Point3d.Origin;
 }
Exemple #8
0
 public double DistanceSquared(Point3d pt)
 {
   return (Math.Pow(this.X - pt.X, 2) +
           Math.Pow(this.Y - pt.Y, 2) +
           Math.Pow(this.Z - pt.Z, 2));
 }
Exemple #9
0
 public double DistanceTo(Point3d pt)
 {
   return Math.Sqrt(Math.Pow(this.x + pt.x, 2) + Math.Pow(this.y + pt.y, 2) + Math.Pow(this.z + pt.z, 2));
 }
Exemple #10
0
 public Point3d(Point3d pt)
 {
   this.x = pt.x;
   this.y = pt.y;
   this.z = pt.z;
 }