1 #ifndef MATH3D_SPHERE3D_H 2 #define MATH3D_SPHERE3D_H 23 Real distance(
const Point3D& v)
const;
24 bool contains(
const Point3D& v)
const;
25 bool contains(
const Sphere3D& s)
const;
26 bool withinDistance(
const Point3D& v, Real dist)
const;
28 bool boundaryWithinDistance(
const Point3D& v, Real dist)
const;
29 bool intersects(
const Line3D&, Real* t1=NULL, Real* t2=NULL)
const;
30 bool intersects(
const Segment3D&, Real* t1=NULL, Real* t2=NULL)
const;
31 bool intersects(
const Plane3D& p)
const;
32 bool intersects(
const Sphere3D& s)
const;
33 bool boundaryIntersects(
const Sphere3D& s)
const;
34 bool boundaryIntersectsBoundary(
const Sphere3D& s)
const;
36 bool Write(
File& f)
const;
38 void getAABB(
AABB3D& bb)
const;
39 bool intersects(
const AABB3D& bb)
const;
41 static bool ballsIntersect(
const Point3D& ca,Real ra,
const Point3D& cb,Real rb);
42 static bool ballSphereIntersect(
const Point3D& ca,Real ra,
const Point3D& cb,Real rb);
43 static bool spheresIntersect(
const Point3D& ca,Real ra,
const Point3D& cb,Real rb);
A 3D plane classRepresents plane with a normal and offset such that x on the plane satisfy dot(normal...
Definition: Plane3D.h:19
A 3D vector class.
Definition: math3d/primitives.h:136
A 3D axis-aligned bounding box.
Definition: AABB3D.h:13
A 3D sphere class.
Definition: Sphere3D.h:21
Contains all the definitions in the Math3D package.
Definition: AnyGeometry.h:12
A 3D line class.
Definition: Line3D.h:18
Real closestPoint(const Point3D &in, Point3D &out) const
Returns the distance from the sphere to in.
Definition: geometry3d.cpp:52
A cross-platform class for reading/writing binary data.
Definition: File.h:47
Definition: Segment3D.h:12