source: sasview/sansmodels/prototypes/src/canvas.h @ 42c974f

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 42c974f was 7df1a50, checked in by Jae Cho <jhjcho@…>, 13 years ago

moving a file

  • Property mode set to 100644
File size: 1.7 KB
Line 
1#if !defined(simcanvas_h)
2#define simcanvas_h
3
4#include "modelCalculations.h"
5
6#define REALSPACE_SPHERE 1
7
8typedef struct {
9        // Position
10        double x;
11        double y;
12        double z;
13        // Orientation
14        double o1;
15        double o2;
16        double o3;
17        // Vector of parameters
18        double params[15];
19       
20        // Pointer to function to generate space points
21        int (*generate)(SpacePoint *points, double *params, int npts);
22        // Pointer to function to check whether a point is contained by an object
23        int (*isContained)(SpacePoint *point, double *params);
24        // Pointer to function to calculate the object's volume
25        double (*getVolume)(double *params);
26       
27       
28        // Points available
29        int points_available;
30        // Space points
31        SpacePoint points[151000];
32        //SpacePoint *points;
33        // Number of space points
34        int npts;
35        double volume;
36        int layer;
37       
38} SpaceObject;
39
40
41typedef struct {
42        // Maximum number of shapes
43        int max_shapes;
44        // List of real-space objects
45        SpaceObject *shapes;
46        int n_shapes;
47} CanvasParams;
48
49
50int canvas_dealloc(CanvasParams *self);
51int canvas_add(CanvasParams *pars, SpaceObject *shape);
52double canvas_intensity(CanvasParams *self, double q, double phi);
53int canvas_init(CanvasParams *pars);
54int canvas_add(CanvasParams *self, int objectCode);
55int canvas_setParam(CanvasParams *self, int shapeID, int paramID, double value);
56int canvas_PointAllowed(CanvasParams *self, int object_id, int i_pt);
57
58
59// SPHERE object ----------------------------------------------------------------------
60int initSphereObject(SpaceObject *pars);
61int generateSphereObject(SpacePoint *points, double *params, int npts);
62int sphere_IsContained(SpacePoint *point, double *params);
63double sphere_getVolume(double *params);
64
65#endif
Note: See TracBrowser for help on using the repository browser.