This class is used by the visualizer for the process of removing lines or portions of lines outside of an area of interest. More...
#include "fastClipping.h"
Classes | |
| struct | Line |
| The line struct. More... | |
| struct | Vector2 |
| The Vector 2 struct. More... | |
Public Member Functions | |
| FastClipping (Vector2 clipMin, Vector2 clipMax) | |
| Constructor. | |
| bool | ClipLine (Line &line) |
| Clip line function. | |
Private Member Functions | |
| void | ClipEndBottom (Line &line) const |
| Clip end bottom function. | |
| void | ClipEndLeft (Line &line) const |
| Clip end left function. | |
| void | ClipEndRight (Line &line) const |
| Clip end right function. | |
| void | ClipEndTop (Line &line) const |
| Clip end top function. | |
| void | ClipStartBottom (Line &line) const |
| Clip start bottom function. | |
| void | ClipStartLeft (Line &line) const |
| Clip start left function. | |
| void | ClipStartRight (Line &line) const |
| Clip start right function. | |
| void | ClipStartTop (Line &line) const |
| Clip start top function. | |
Private Attributes | |
| Vector2 | m_clipMax |
| The maximum point of the bounding area required clipping. | |
| Vector2 | m_clipMin |
| The minimum point of the bounding area required clipping. | |
This class is used by the visualizer for the process of removing lines or portions of lines outside of an area of interest.
This code has been adapted from http://en.wikipedia.org/w/index.php?title=Line_clipping&oldid=248609574
Definition at line 22 of file fastClipping.h.
Constructor.
| clipMin | minimum clipping vector |
| clipMax | maximum clipping vector |
Definition at line 14 of file fastClipping.cc.
|
private |
Clip end bottom function.
| line | the clip line |
Definition at line 56 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, ns3::FastClipping::Line::end, m_clipMax, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
Clip end left function.
| line | the clip line |
Definition at line 70 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, ns3::FastClipping::Line::end, m_clipMin, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
Clip end right function.
| line | the clip line |
Definition at line 63 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, ns3::FastClipping::Line::end, m_clipMax, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
Clip end top function.
| line | the clip line |
Definition at line 49 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, ns3::FastClipping::Line::end, m_clipMin, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
| bool ns3::FastClipping::ClipLine | ( | Line & | line | ) |
Clip line function.
| line | the clip line |
Definition at line 77 of file fastClipping.cc.
References ClipEndBottom(), ClipEndLeft(), ClipEndRight(), ClipEndTop(), ClipStartBottom(), ClipStartLeft(), ClipStartRight(), ClipStartTop(), ns3::FastClipping::Line::end, m_clipMax, m_clipMin, ns3::FastClipping::Line::start, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ns3::PyViz::LineClipping().
|
private |
Clip start bottom function.
| line | the clip line |
Definition at line 28 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, m_clipMax, ns3::FastClipping::Line::start, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
Clip start left function.
| line | the clip line |
Definition at line 42 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, m_clipMin, ns3::FastClipping::Line::start, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
Clip start right function.
| line | the clip line |
Definition at line 35 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, m_clipMax, ns3::FastClipping::Line::start, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
Clip start top function.
| line | the clip line |
Definition at line 21 of file fastClipping.cc.
References ns3::FastClipping::Line::dx, ns3::FastClipping::Line::dy, m_clipMin, ns3::FastClipping::Line::start, ns3::FastClipping::Vector2::x, and ns3::FastClipping::Vector2::y.
Referenced by ClipLine().
|
private |
The maximum point of the bounding area required clipping.
Definition at line 123 of file fastClipping.h.
Referenced by FastClipping(), ClipEndBottom(), ClipEndRight(), ClipLine(), ClipStartBottom(), and ClipStartRight().
|
private |
The minimum point of the bounding area required clipping.
Definition at line 122 of file fastClipping.h.
Referenced by FastClipping(), ClipEndLeft(), ClipEndTop(), ClipLine(), ClipStartLeft(), and ClipStartTop().