[go: up one dir, main page]

Menu

[r377]: / gr_scat / src / disc.h  Maximize  Restore  History

Download this file

32 lines (23 with data), 782 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef DISC_H_DEF
#define DISC_H_DEF 1
#define PI 3.141592654
//#define float double
/*This include file contains the object definitions for a simulation of the three-disc scattering
system*/
class disc {
friend class NdiscMat;
float rad;
float cx, cy;
public:
disc();
disc(float radius, float centerx, float centery);
void init(float radius, float centerx, float centery);
void intercept (float begx, float begy, float dirx, float diry,
float *t1, float *t2);
int int_near (float begx, float begy, float dirx, float diry, float *t);
int int_far (float begx, float begy, float dirx, float diry, float *t);
void bounce (float interceptx, float intercepty, float dirx, float diry,
float *reflectxhat, float *reflectyhat);
void plot();
};
#endif