ogl::aabb ogl::node::view(int id, const vec4 *V, int n) { if (!ubiquitous) { // Get the cached culler hint. int bit, hint = get_oct(hint_cache, id); // Test the bounding box and set the visibility bit. if (V == 0 || my_aabb.test(V, n, M, hint)) test_cache = set_bit(test_cache, id, (bit = 1)); else test_cache = set_bit(test_cache, id, (bit = 0)); // Set the cached culler hint. hint_cache = set_oct(hint_cache, id, hint); // If this node is visible, return the world-space AABB. if (bit && V) return ogl::aabb(my_aabb, M); } return ogl::aabb(); }
void write_value(t_mem **mem, int value, int addr, t_champ *champ) { t_mem *tmp; int i; i = 0; tmp = set_oct(*mem, addr); i = REG_SIZE; while (i > 0) { if (i == 1) tmp->oct = 0x000000ff & value; else tmp->oct = (value >> ((i - 1) * 8)) | (0xff << ((i - 1) * 8)); tmp->champ_wr = champ->num; tmp = tmp->next; i--; } }