A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::visualizer::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 "fast-clipping.h"

Collaboration diagram for ns3::visualizer::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 24 of file fast-clipping.h.

Constructor & Destructor Documentation

◆ FastClipping()

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

Constructor.

Parameters
clipMinminimum clipping vector
clipMaxmaximum clipping vector

Definition at line 16 of file fast-clipping.cc.

References m_clipMax, and m_clipMin.

Member Function Documentation

◆ ClipEndBottom()

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

Clip end bottom function.

Parameters
linethe clip line

Definition at line 58 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, ns3::visualizer::FastClipping::Line::end, m_clipMax, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipEndLeft()

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

Clip end left function.

Parameters
linethe clip line

Definition at line 72 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, ns3::visualizer::FastClipping::Line::end, m_clipMin, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipEndRight()

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

Clip end right function.

Parameters
linethe clip line

Definition at line 65 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, ns3::visualizer::FastClipping::Line::end, m_clipMax, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipEndTop()

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

Clip end top function.

Parameters
linethe clip line

Definition at line 51 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, ns3::visualizer::FastClipping::Line::end, m_clipMin, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipLine()

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

Clip line function.

Parameters
linethe clip line
Returns
true if clipped

Definition at line 79 of file fast-clipping.cc.

References ClipEndBottom(), ClipEndLeft(), ClipEndRight(), ClipEndTop(), ClipStartBottom(), ClipStartLeft(), ClipStartRight(), ClipStartTop(), ns3::visualizer::FastClipping::Line::end, m_clipMax, m_clipMin, ns3::visualizer::FastClipping::Line::start, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ns3::visualizer::PyViz::LineClipping().

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

◆ ClipStartBottom()

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

Clip start bottom function.

Parameters
linethe clip line

Definition at line 30 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, m_clipMax, ns3::visualizer::FastClipping::Line::start, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipStartLeft()

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

Clip start left function.

Parameters
linethe clip line

Definition at line 44 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, m_clipMin, ns3::visualizer::FastClipping::Line::start, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipStartRight()

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

Clip start right function.

Parameters
linethe clip line

Definition at line 37 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, m_clipMax, ns3::visualizer::FastClipping::Line::start, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

◆ ClipStartTop()

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

Clip start top function.

Parameters
linethe clip line

Definition at line 23 of file fast-clipping.cc.

References ns3::visualizer::FastClipping::Line::dx, ns3::visualizer::FastClipping::Line::dy, m_clipMin, ns3::visualizer::FastClipping::Line::start, ns3::visualizer::FastClipping::Vector2::x, and ns3::visualizer::FastClipping::Vector2::y.

Referenced by ClipLine().

Here is the caller graph for this function:

Member Data Documentation

◆ m_clipMax

Vector2 ns3::visualizer::FastClipping::m_clipMax
private

The maximum point of the bounding area required clipping.

Definition at line 125 of file fast-clipping.h.

Referenced by FastClipping(), ClipEndBottom(), ClipEndRight(), ClipLine(), ClipStartBottom(), and ClipStartRight().

◆ m_clipMin

Vector2 ns3::visualizer::FastClipping::m_clipMin
private

The minimum point of the bounding area required clipping.

Definition at line 124 of file fast-clipping.h.

Referenced by FastClipping(), ClipEndLeft(), ClipEndTop(), ClipLine(), ClipStartLeft(), and ClipStartTop().


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