This repository was archived by the owner on Mar 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-2
lines changed
Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 1+ # RoboCup base editorconfig
2+
3+ # Editorconfig files are recursive, so if you want to add specifc rules for
4+ # your subdirectory, make a file like this in that directory.
5+
6+ # Lots of configuration is supported, like max line length, and charset.
7+
8+ # for more information look at http://editorconfig.org/. There are
9+ # plugins available for almost every text editor!
10+
11+ # For an easy install of the sublime editorconfig package, go to:
12+ # PackageControl -> Install Package -> EditorConfig
13+
14+ root = false
15+
16+ # Unix-style newlines with a newline ending every file
17+ [* ]
18+ end_of_line = lf
19+ insert_final_newline = true
20+ trim_trailing_whitespace = true
21+
22+ # Use 4 spaces for most files
23+ indent_style = space
24+ indent_size = 4
25+
26+
27+ # Use 2 spaces for travis files
28+ [{package.json,* .yml} ]
29+ indent_style = space
30+ indent_size = 2
31+
32+ # Makefiles are required to use tabs
33+ [{makefile, Makefile} ]
34+ indent_style = tab
35+ indent_size = 4
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ void RRTWidget::paintEvent(QPaintEvent *p) {
194194 controlLength = 0.5 *min ( (waypoint - prevWaypoint).norm (), (nextWaypoint - waypoint).norm () );
195195 controlDir = ((prevWaypoint - waypoint).normalized () - (nextWaypoint - waypoint).normalized ()).normalized ();
196196 }
197-
197+
198198
199199 Vector2f controlDiff = controlDir * controlLength;
200200
@@ -344,7 +344,10 @@ void RRTWidget::mouseMoveEvent(QMouseEvent *event) {
344344 _goalVel = (point - _biRRT->goalState ()) / VelocityDrawingMultiplier;
345345 } else if (_editingObstacles) {
346346 Vector2i gridLoc = _stateSpace->obstacleGrid ().gridSquareForLocation (point);
347- _stateSpace->obstacleGrid ().obstacleAt (gridLoc) = !_erasingObstacles;
347+ if (gridLoc[1 ] >= 0 && gridLoc[1 ] < _stateSpace->obstacleGrid ().discretizedHeight ()
348+ && gridLoc[0 ] >= 0 && gridLoc[0 ] < _stateSpace->obstacleGrid ().discretizedWidth ()) {
349+ _stateSpace->obstacleGrid ().obstacleAt (gridLoc) = !_erasingObstacles;
350+ }
348351 }
349352
350353 if (_draggingItem != DraggingNone || _editingObstacles) update ();
You can’t perform that action at this time.
0 commit comments