Model.collisionrecheck_temp#
- Model.collisionrecheck_temp(collection)#
Updates the results of a collision detection that had been done using
Model.collisioncheck2_temp().There are some restrictions regarding the collision result entities that are used as input:
Only possible for either intersections or penetrations at a time. All provided collision result entities should have the same “config” (otherwise the ones with another config than the first one are ignored).
Only possible for one group at a time. All provided collision result entities have to have the same “parent” (otherwise the ones with another parent than the first one are ignored).
A “fast recheck” of collision result entities is only implemented for intersections. If penetration result entities are passed to the function, a complete recheck of the given group is performed,
Note that
Model.hm_collisionend()does not delete any collision result entities. The deletion must be handled usingModel.deletemark().- Parameters:
collection (Collection) – The collection containing the entities to recheck. Valid entity types are groups and collisions.
Example#
Recheck all groups for which outdated collision result entities are exist#import hm import hm.entities as ent model = hm.Model() coll_collection = hm.Collection(model, ent.Collision) group_list = [] for coll in coll_collection: group_list.append(coll.parent) group_collection = hm.Collection(group_list) model.collisionrecheck_temp(collection=group_list)