A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::FastClipping Class Reference

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"

Collaboration diagram for ns3::FastClipping:

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.

Detailed Description

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 & Destructor Documentation

◆ FastClipping()

ns3::FastClipping::FastClipping ( Vector2 clipMin,
Vector2 clipMax )

Constructor.

Parameters
clipMinminimum clipping vector
clipMaxmaximum clipping vector

Definition at line 14 of file fastClipping.cc.

References m_clipMax, and m_clipMin.

Member Function Documentation

◆ ClipEndBottom()

void ns3::FastClipping::ClipEndBottom ( Line & line) const
private

Clip end bottom function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipEndLeft()

void ns3::FastClipping::ClipEndLeft ( Line & line) const
private

Clip end left function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipEndRight()

void ns3::FastClipping::ClipEndRight ( Line & line) const
private

Clip end right function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipEndTop()

void ns3::FastClipping::ClipEndTop ( Line & line) const
private

Clip end top function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipLine()

bool ns3::FastClipping::ClipLine ( Line & line)

Clip line function.

Parameters
linethe clip line
Returns
true if clipped

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClipStartBottom()

void ns3::FastClipping::ClipStartBottom ( Line & line) const
private

Clip start bottom function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipStartLeft()

void ns3::FastClipping::ClipStartLeft ( Line & line) const
private

Clip start left function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipStartRight()

void ns3::FastClipping::ClipStartRight ( Line & line) const
private

Clip start right function.

Parameters
linethe 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().

Here is the caller graph for this function:

◆ ClipStartTop()

void ns3::FastClipping::ClipStartTop ( Line & line) const
private

Clip start top function.

Parameters
linethe 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().

Here is the caller graph for this function:

Member Data Documentation

◆ m_clipMax

Vector2 ns3::FastClipping::m_clipMax
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().

◆ m_clipMin

Vector2 ns3::FastClipping::m_clipMin
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().


The documentation for this class was generated from the following files: