Microscopic Traffic Simulator

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Protected Member Functions | Protected Attributes | Properties | List of all members
Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer Class Reference

Renderer for drawing bezier lanes during their building. More...

Inheritance diagram for Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer:

## Classes
class | BezierLanePoints
| Assigns integer identifiers for additional points of a bezier lane. More...

## Protected Member Functions
override IList< double > | GetSquaredDistancesOfCanvasPointToWorldLanePoints (Point canvasPoint)
| Get squared distances of all lane world points from cursor point on canvas. More...
Protected Member Functions inherited from Microscopic_Traffic_Simulator.Renderers.LaneBuildingRenderer
override void | Render (Point currentMouseLocation)
  | Render preview change of move or zoom. Parameters
  currentMouseLocation | Current mouse location.
More...
void | DrawPreviewStraightLane (Point endPointOnCanvas)
| Draws preview of straight lane. More...
Vector | GetVectorOfMoveOfPointIfItIsBeingDragged (Point cursorPointOnCanvas, bool isBeingDragged)
| Gets vector of move of point if the point is being dragged and update the previous reference point for dragging. More...
void | SetPointToDraggingModeIfCursorIsNearAndDragging (ref bool pointIsInDraggingMode, Point cursorPointOnCanvas, double squaredDistanceOfWorldPointFromCanvasPoint, IList< double > squaredDistancesOfRemainingWorldPointsFromCanvasPoint)
| Set point to dragging mode if cursor is near to any point of lane. More...
Protected Member Functions inherited from Microscopic_Traffic_Simulator.Renderers.VisualCanvasRenderer
| VisualCanvasRenderer (DrawingVisual visual)
| Initialization of visual canvas renderer. More...
Point | TransformRealWorldPoint (Point point)
| Transforms real-world point to point on canvas. More...
Point | TransformCanvasPoint (Point point)
| Transform point on canvas to real-world point. More...

## Protected Attributes
Point | firstWorldControlPoint
| The first control point of a previewing building lane. More...
bool | isFirstControlPointBeingDragged
| Determines whether the firstWorldControlPoint is currently being dragged. More...
Point | secondWorldControlPoint
| The second control point of a previewing building lane. More...
bool | secondControlPointIsMoving
| Determines whether the secondWorldControlPoint is currently being dragged. More...
Protected Attributes inherited from Microscopic_Traffic_Simulator.Renderers.LaneBuildingRenderer
const double | PenThickness = 1.0
| Thickness of the pen drawing the preview of a lane. More...
const double | DraggingCircleRadius = 4.0
| Radius of a circle surrounding the points of a lane. The circle determines the area where cursor must be when user wants to press left mouse button and drag a point the circle surround. More...
const double | DraggingCircleRadiusSquared = DraggingCircleRadius * DraggingCircleRadius
| Value of squared radius of dragging circle which can be used to skip sqrt operation in computation of the Euclidean distance. More...
Pen | pen = new Pen(Brushes.Green, PenThickness)
| Pen used to draw road preview. More...
Point | startWorldPoint = null
| Start point of a previewing building lane. More...
Point | endWorldPoint = null
| End point of a previewing building lane. More...
Point | previousReferencePointForDragging
| Previous reference point for dragging More...
Point | lastCursorPointOnCanvas
| Last cursor point after rendering prewview of building lane. More...
Protected Attributes inherited from Microscopic_Traffic_Simulator.Renderers.VisualCanvasRenderer
DrawingVisual | visual
| Drawing visual to render to. More...

## Properties
Point | FirstWorldControlPoint`[get]`
| The first control point of a previewing building lane. More...
Point | SecondWorldControlPoint`[get]`
| The second control point of a previewing building lane. More...
Properties inherited from Microscopic_Traffic_Simulator.Renderers.VisualCanvasRenderer
double | PixelsPerMeter`[get]`
| Number of meters per one pixel determining zoom level. More...

## Detailed Description

Renderer for drawing bezier lanes during their building.

Definition at line 12 of file BezierLaneBuildingRenderer.cs.

## Member Function Documentation

override IList<double> Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.GetSquaredDistancesOfCanvasPointToWorldLanePoints | ( | Point | canvasPoint | ) |
| protected virtual

Get squared distances of all lane world points from cursor point on canvas.

Parameters

  cursorPointOnCanvasPoint | Cursor point on canvas.

Returns
  List of squared distances of all lane world points from cursor point on canvas.

Reimplemented from Microscopic_Traffic_Simulator.Renderers.LaneBuildingRenderer.

Definition at line 230 of file BezierLaneBuildingRenderer.cs.

## Member Data Documentation

Point Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.firstWorldControlPoint
| protected

The first control point of a previewing building lane.

Definition at line 31 of file BezierLaneBuildingRenderer.cs.

bool Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.isFirstControlPointBeingDragged
| protected

Determines whether the firstWorldControlPoint is currently being dragged.

Definition at line 40 of file BezierLaneBuildingRenderer.cs.

bool Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.secondControlPointIsMoving
| protected

Determines whether the secondWorldControlPoint is currently being dragged.

Definition at line 54 of file BezierLaneBuildingRenderer.cs.

Point Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.secondWorldControlPoint
| protected

The second control point of a previewing building lane.

Definition at line 45 of file BezierLaneBuildingRenderer.cs.

## Property Documentation

Point Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.FirstWorldControlPoint
| get

The first control point of a previewing building lane.

Definition at line 35 of file BezierLaneBuildingRenderer.cs.

Point Microscopic_Traffic_Simulator.Renderers.BezierLaneBuildingRenderer.SecondWorldControlPoint
| get

The second control point of a previewing building lane.

Definition at line 49 of file BezierLaneBuildingRenderer.cs.

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

- Microscopic Traffic Simulator/Renderers/BezierLaneBuildingRenderer.cs