Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
| Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | static inline bool crossesProscenium(real proscenium[4], FEdge *fe) | ||||
| Vec2r min(proscenium[0], proscenium[2]); | Vec2r min(proscenium[0], proscenium[2]); | ||||
| Vec2r max(proscenium[1], proscenium[3]); | Vec2r max(proscenium[1], proscenium[3]); | ||||
| Vec2r A(fe->vertexA()->getProjectedX(), fe->vertexA()->getProjectedY()); | Vec2r A(fe->vertexA()->getProjectedX(), fe->vertexA()->getProjectedY()); | ||||
| Vec2r B(fe->vertexB()->getProjectedX(), fe->vertexB()->getProjectedY()); | Vec2r B(fe->vertexB()->getProjectedX(), fe->vertexB()->getProjectedY()); | ||||
| return GeomUtils::intersect2dSeg2dArea(min, max, A, B); | return GeomUtils::intersect2dSeg2dArea(min, max, A, B); | ||||
| } | } | ||||
| static inline bool insideProscenium(real proscenium[4], const Vec3r &point) | static inline bool insideProscenium(const real proscenium[4], const Vec3r &point) | ||||
| { | { | ||||
| return !(point[0] < proscenium[0] || point[0] > proscenium[1] || point[1] < proscenium[2] || | return !(point[0] < proscenium[0] || point[0] > proscenium[1] || point[1] < proscenium[2] || | ||||
| point[1] > proscenium[3]); | point[1] > proscenium[3]); | ||||
| } | } | ||||
| void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSearch) | void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSearch) | ||||
| { | { | ||||
| // Cull view edges by marking them as non-displayable. | // Cull view edges by marking them as non-displayable. | ||||
| ▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines | |||||