Debug(" -- t0: %f to t1: %f", t0, t1);
Real ptx, pty;
Evaluate(ptx, pty, ((t1 + t0) / Real(2)));
- if (r.PointIn(ptx, pty))
+ if (true || r.PointIn(ptx, pty))
{
all_beziers.push_back(this->ReParametrise(t0, t1));
}
}
case BEZIER:
{
-// Rect child_node_bounds = m_objects.bounds[object_id];
+ // If we're entirely within the quadtree node, no clipping need occur.
+ if (ContainedInQuadChild(m_objects.bounds[object_id], type))
+ {
+ m_objects.bounds.push_back(TransformToQuadChild(m_objects.bounds[object_id], type));
+ m_objects.types.push_back(m_objects.types[object_id]);
+ m_objects.data_indices.push_back(m_objects.data_indices[object_id]);
+ return 1;
+ }
Rect clip_bezier_bounds = TransformRectCoordinates(m_objects.bounds[object_id], TransformFromQuadChild(Rect{0,0,1,1}, type));
std::vector<Bezier> new_curves = m_objects.beziers[m_objects.data_indices[object_id]].ClipToRectangle(clip_bezier_bounds);
for (size_t i = 0; i < new_curves.size(); ++i)