Ejemplo n.º 1
0
 public Vector2D(Vector2F copy)
 {
     x = copy.x; y = copy.y;
 }
Ejemplo n.º 2
0
 public float Project(Vector2F p)
 {
     return((p - Center).Dot(Direction));
 }
Ejemplo n.º 3
0
 void update_from_endpoints(Vector2F p0, Vector2F p1)
 {
     Center    = 0.5f * (p0 + p1);
     Direction = p1 - p0;
     Extent    = 0.5f * Direction.Normalize();
 }
Ejemplo n.º 4
0
 public Segment2f(Vector2F center, Vector2F direction, float extent)
 {
     Center = center; Direction = direction; Extent = extent;
 }