Top | ![]() |
![]() |
![]() |
![]() |
#define | HKL_HOLDER_SAMPLE_IDX |
#define | HKL_HOLDER_DETECTOR_IDX |
typedef | darray_holder |
struct | HklHolderConfig |
struct | HklHolder |
struct | HklGeometryOperations |
HklGeometry | |
#define | HKL_GEOMETRY_OPERATIONS_DEFAULTS |
extern const HklGeometryOperations | hkl_geometry_operations_defaults |
#define | HKL_GEOMETRY_ERROR |
enum | HklGeometryError |
HklGeometryList | |
HklGeometryListItem |
void (*HklGeometryListMultiplyFunction) (HklGeometryList *self
,HklGeometryListItem *item
);
HklHolder *
hkl_geometry_sample_holder_get_real (const HklGeometry *self
);
HklHolder *
hkl_geometry_detector_holder_get_real (const HklGeometry *self
);
HklParameter * hkl_holder_add_parameter (HklHolder *self
,char const *name
,const HklUnit *punit
);
HklParameter * hkl_holder_add_rotation (HklHolder *self
,char const *name
,double x
,double y
,double z
,const HklUnit *punit
);
HklParameter * hkl_holder_add_rotation_with_origin (HklHolder *self
,const char *name
,double x
,double y
,double z
,double ox
,double oy
,double oz
,const HklUnit *punit
);
HklParameter * hkl_holder_add_translation (HklHolder *self
,char const *name
,double x
,double y
,double z
,const HklUnit *punit
);
HklVector hkl_holder_transformation_apply (const HklHolder *self
,const HklVector *v
);
HklGeometry * hkl_geometry_new (const HklFactory *factory
,const HklGeometryOperations *ops
);
constructor
[skip]
int hkl_geometry_init_geometry (HklGeometry *self
,const HklGeometry *src
);
initilize an HklGeometry
[skip]
HklHolder *
hkl_geometry_add_holder (HklGeometry *self
);
add an Holder to the HklGeometry
[skip]
void
hkl_geometry_update (HklGeometry *self
);
update the geometry internal once an Axis values changed
[skip]
int hkl_geometry_get_axis_idx_by_name (const HklGeometry *self
,const char *name
);
get the index of the axes named name
in the geometry
[skip]
HklParameter * hkl_geometry_get_axis_by_name (HklGeometry *self
,const char *name
);
get an HklAxis using its name
double hkl_geometry_distance (const HklGeometry *self
,const HklGeometry *ref
);
compute the distance between two HklGeometries
double hkl_geometry_distance_orthodromic (const HklGeometry *self
,const HklGeometry *ref
);
[skip]
int hkl_geometry_closest_from_geometry_with_range (HklGeometry *self
,const HklGeometry *ref
);
get the closest axes values in the HklInterval compatible with the current axes values
[skip]
int
hkl_geometry_is_valid (const HklGeometry *self
);
check if all axes of the HklGeometry are valid.
[skip]
int
hkl_geometry_is_valid_range (const HklGeometry *self
);
check if all axes of the HklGeometry are valid. (there is a difference for axis)
[skip]
HklHolder * hkl_geometry_sample_holder_get (const HklGeometry *self
,const HklSample *sample
);
HklHolder * hkl_geometry_detector_holder_get (const HklGeometry *self
,const HklDetector *detector
);
HklVector hkl_geometry_kf_get (const HklGeometry *self
,const HklDetector *detector
);
HklGeometryList *
hkl_geometry_list_new_copy (const HklGeometryList *self
);
copy constructor
[skip]
void hkl_geometry_list_add (HklGeometryList *self
,const HklGeometry *geometry
);
this method Add a geometry to the geometries
This method try to be clever by allocating memory only if the current length of the geometries is not large enought. Then it just set the geometry axes and copy it to the right geometries. We do not gives the x len as it is equal to the self->axes_len.
[skip]
void
hkl_geometry_list_reset (HklGeometryList *self
);
reset the HklGeometry, in fact it is a sort of clean method remove all the items of the list.
[skip]
void hkl_geometry_list_sort (HklGeometryList *self
,HklGeometry *ref
);
sort the HklGeometryList compare to the distance of the given HklGeometry
[skip]
void hkl_geometry_list_fprintf (FILE *f
,const HklGeometryList *self
);
print to a file the HklGeometryList
[skip]
void
hkl_geometry_list_multiply (HklGeometryList *self
);
apply the multiply lenthod to the HklGeometry
[skip]
void
hkl_geometry_list_multiply_from_range (HklGeometryList *self
);
void
hkl_geometry_list_remove_invalid (HklGeometryList *self
);
remove all invalid HklGeometry from the HklGeometryList
[skip]
HklGeometryListItem *
hkl_geometry_list_item_new (const HklGeometry *geometry
);
constructor
[skip]
HklGeometryListItem *
hkl_geometry_list_item_new_copy (const HklGeometryListItem *self
);
copy constructor
[skip]
void
hkl_geometry_list_item_free (HklGeometryListItem *self
);
destructor
[skip]
struct HklHolder { struct HklHolderConfig *config; HklGeometry *geometry; HklQuaternion q; };
struct HklGeometryOperations { HklHolder* (*sample_holder_get) (const HklGeometry *self, const HklSample *sample); HklHolder* (*detector_holder_get) (const HklGeometry *self, const HklDetector *detector); HklVector (*ki_get) (const HklGeometry *geometry); HklVector (*kf_get) (const HklGeometry *self, const HklDetector *detector); };
typedef struct { const HklFactory *factory; HklSource source; darray_parameter axes; darray_holder holders; const HklGeometryOperations *ops; } HklGeometry;
extern const HklGeometryOperations hkl_geometry_operations_defaults;
typedef struct { HklGeometryListMultiplyFunction multiply; struct list_head items; size_t n_items; } HklGeometryList;