Age | Commit message (Collapse) | Author |
|
This exposes a callback interface for supplying the AABB overlap
test used to determine node traversal and object filtering.
In advanced use cases like transformed 3D inersection testing of
two ix3 instances one needs to run user-supplied code in the
tree traversal with the node AABBs provided for e.g. transformed
searches against another ix3.
Other than the new ix3_aabb_cb_t hook, its use is identical to
ix3_search_by_aabb().
|
|
In preparation of adding an aabb-callback based search, rename the
existing callback to something more object-specific since that's
the context it applies to.
|
|
In 3D game engine use, it's convenient to be able to construct an ix3
for a model's mesh, in the model's local coordinate system. This
model may then be instanced any number of times in the world via
matrix transformations.
When such instances are collidable objects and encounter eachother in
the world, it becomes necessary to perform nested area searches on the
same ix3.
The existing code only allowed for a single area search on a given
ix3 at a time. This code changes that to a limit supplied to
ix3_new() as "max_asip" for "area searches in progress".
In scenarios where only point searches will be performed, 0 may be
supplied to save memory over the previous implementation. A value
of 2 is satisfactory for my existing 3D game use cases, but any value
is supported, it just takes more memory in the ix3_object_t struct.
|
|
|
|
Previously one could only say stop/ignore/continue from the
search callback.
There was no way to say stop and ignore, or stop but don't ignore.
Now there are basically two classes of returns, stop and continue,
and each of those have ignore/don't ignore sub-statuses. The naming
is changed to STOP vs. MORE and HIT vs. MISS for brevity:
typedef enum ix3_search_status_t {
IX3_SEARCH_STOP_MISS,
IX3_SEARCH_STOP_HIT,
IX3_SEARCH_MORE_MISS,
IX3_SEARCH_MORE_HIT,
} ix3_search_status_t;
|
|
This basically amounts to a pad_reset() wrapper.
Also incorporated resets into the test, while fixing a stupid
bug there.
|
|
This is a straightforward 3D conversion of libix2, the API is
completely unchanged aside from dimensional types going from
2->3.
Rather than a quadtree with 4 children per parent, this uses an
octree with 8 children. Otherwise it's basically identical to
libix2.
|