00001 #include "spacetime.h"
00002
00003 namespace Traum
00004 {
00005 class SchwarzschildGeodesic;
00006 }
00007
00008 class SPACETIME_API CurvedSpaceIntegrator
00009 {
00010 Traum::SchwarzschildGeodesic*swg;
00011
00012 public:
00013
00014 struct pt
00015 {
00016 double x,y,z;
00017 };
00018
00019
00020 CurvedSpaceIntegrator();
00021 ~CurvedSpaceIntegrator();
00022
00026 void setMass(long double M) const;
00027
00032 void setCenter(const pt&Center) const;
00033
00034
00042 int integrate(double time, const pt&O, const pt&d, double dist=-1, int maxsteps=5000);
00043
00048 virtual int straight_ray(const pt&O, const pt&d) = 0;
00049
00055 virtual int segment_intersect(const pt&where, const pt&dir, double segment_length) = 0;
00056
00060 virtual int at_singularity() = 0;
00061 };