Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _TREE_H_
- #define _TREE_H_
- #include <xmmintrin.h>
- #include <stdint.h>
- #define N 3
- #define NS 8
- #define MAX_DOTS 7
- #define LEAF 0
- #define FULL 1
- typedef union
- {
- float c[4];
- __v4sf vect;
- } dot;
- typedef struct
- {
- unsigned int dots_num;
- dot dots[MAX_DOTS];
- } leaf_data;
- typedef struct
- {
- dot center;
- struct node *children[NS];
- } inner_data;
- union node_data
- {
- leaf_data leaf;
- inner_data inner;
- };
- struct node
- {
- unsigned int flags;
- dot bb_min;
- dot bb_max;
- union node_data data;
- };
- extern dot voxel;
- void calc_bounding_box (const dot*, unsigned int, dot*, dot*);
- dot calc_avg (const dot*, unsigned int);
- uint8_t get_subspace_idx (dot, dot);
- dot align_on_voxel (dot);
- unsigned int filter_set (const dot*, dot*, unsigned int, uint8_t, dot);
- struct node* make_tree (const dot*, unsigned int);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement