X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FSphere.hh;h=d6903564eac5309c59f6f793eef60e8ea0c0844b;hp=7f7a76373dfd7f0d228f33c9c36379c25a57959c;hb=64bd443538f57ad1bdff6c6b35953e72141129b2;hpb=bc2bc12125d6c223d2935557e01926fe21166e38 diff --git a/src/Moof/Sphere.hh b/src/Moof/Sphere.hh index 7f7a763..d690356 100644 --- a/src/Moof/Sphere.hh +++ b/src/Moof/Sphere.hh @@ -62,6 +62,12 @@ struct Sphere : public Cullable, public Drawable radius = r; } + void init(const Vector3& p, const Vector3& o) + { + point = p; + radius = (o - p).length(); + } + void encloseVertices(const Vector3 vertices[], unsigned count); void draw(Scalar alpha = 0.0) const;