44
/// Rebuild the broad phase using current vertex positions
46
virtual void update_broad_phase_static( const DynamicSurface& surface ) = 0;
48
/// Rebuild the broad phase using current and predicted vertex positions
50
virtual void update_broad_phase_continuous( const DynamicSurface& surface ) = 0;
52
virtual void add_vertex( unsigned int index, const Vec3d& aabb_low, const Vec3d& aabb_high ) = 0;
53
virtual void add_edge( unsigned int index, const Vec3d& aabb_low, const Vec3d& aabb_high ) = 0;
54
virtual void add_triangle( unsigned int index, const Vec3d& aabb_low, const Vec3d& aabb_high ) = 0;
56
virtual void update_vertex( unsigned int index, const Vec3d& aabb_low, const Vec3d& aabb_high ) = 0;
57
virtual void update_edge( unsigned int index, const Vec3d& aabb_low, const Vec3d& aabb_high ) = 0;
58
virtual void update_triangle( unsigned int index, const Vec3d& aabb_low, const Vec3d& aabb_high ) = 0;
60
virtual void remove_vertex( unsigned int index ) = 0;
61
virtual void remove_edge( unsigned int index ) = 0;
62
virtual void remove_triangle( unsigned int index ) = 0;
64
/// Get the set of vertices whose bounding volumes overlap the specified bounding volume
66
virtual void get_potential_vertex_collisions( const Vec3d& query_low, const Vec3d& query_high, std::vector<unsigned int>& overlapping_vertices ) = 0;
68
/// Get the set of edges whose bounding volumes overlap the specified bounding volume
70
virtual void get_potential_edge_collisions( const Vec3d& query_low, const Vec3d& query_high, std::vector<unsigned int>& overlapping_triangles ) = 0;
72
/// Get the set of triangles whose bounding volumes overlap the specified bounding volume
74
virtual void get_potential_triangle_collisions( const Vec3d& query_low, const Vec3d& query_high, std::vector<unsigned int>& overlapping_triangles ) = 0;
44
/// Rebuild the broad phase
46
virtual void update_broad_phase( const DynamicSurface& surface, bool continuous ) = 0;
49
/// Add a vertex with the specified bounding box to the broad phase
51
virtual void add_vertex( size_t index,
52
const Vec3d& aabb_low,
53
const Vec3d& aabb_high,
56
/// Add an edge with the specified bounding box to the broad phase
58
virtual void add_edge( size_t index,
59
const Vec3d& aabb_low,
60
const Vec3d& aabb_high,
63
/// Add a triangle with the specified bounding box to the broad phase
65
virtual void add_triangle( size_t index,
66
const Vec3d& aabb_low,
67
const Vec3d& aabb_high,
70
/// Update a vertex's broad phase entry
72
virtual void update_vertex( size_t index,
73
const Vec3d& aabb_low,
74
const Vec3d& aabb_high,
77
/// Update an edges's broad phase entry
79
virtual void update_edge( size_t index,
80
const Vec3d& aabb_low,
81
const Vec3d& aabb_high,
84
/// Update a triangle's broad phase entry
86
virtual void update_triangle( size_t index,
87
const Vec3d& aabb_low,
88
const Vec3d& aabb_high,
91
/// Remove a vertex from the broad phase
93
virtual void remove_vertex( size_t index ) = 0;
95
/// Remove an edge from the broad phase
97
virtual void remove_edge( size_t index ) = 0;
99
/// Remove a triangle from the broad phase
101
virtual void remove_triangle( size_t index ) = 0;
103
/// Get the stored axis-aligned bounding box of a vertex
105
virtual void get_vertex_aabb( size_t index, bool is_solid, Vec3d& aabb_low, Vec3d& aabb_high ) = 0;
107
/// Get the stored axis-aligned bounding box of an edge
109
virtual void get_edge_aabb( size_t index, bool is_solid, Vec3d& aabb_low, Vec3d& aabb_high ) = 0;
111
/// Get the stored axis-aligned bounding box of a triangle
113
virtual void get_triangle_aabb( size_t index, bool is_solid, Vec3d& aabb_low, Vec3d& aabb_high ) = 0;
115
/// Get the set of vertices whose bounding volumes overlap the specified bounding volume
117
virtual void get_potential_vertex_collisions( const Vec3d& aabb_low,
118
const Vec3d& aabb_high,
121
std::vector<size_t>& overlapping_vertices ) = 0;
123
/// Get the set of edges whose bounding volumes overlap the specified bounding volume
125
virtual void get_potential_edge_collisions( const Vec3d& aabb_low,
126
const Vec3d& aabb_high,
129
std::vector<size_t>& overlapping_edges ) = 0;
131
/// Get the set of triangles whose bounding volumes overlap the specified bounding volume
133
virtual void get_potential_triangle_collisions( const Vec3d& aabb_low,
134
const Vec3d& aabb_high,
137
std::vector<size_t>& overlapping_triangles ) = 0;