先show一下运行效果...
这个图片中的是演示我的自动寻径功能,路径有点挫...因为图中取的点太少了,所以导致路径不是按照实际的路来走的。
不过,也就将就着点啦。自动寻径的算法采用的是经典的迪杰特斯拉算法,对于我给的节点(<100)个,程序运行的效果还是很理想的。
再多,一是我没有那个耐心一个个添加进去,另外一个,也没那个必要,一个校园内,100个节点,已经差不多了。
接下来几天准备一边写报告,一边在这里把这个地图的各个部分详细的解说下。
先大致说下吧,
地图的思路还是我前面一篇文档中介绍的,窗口+图片。就是,我对一张虚拟的大图片建立坐标系,把它作为我的窗口的背景,然后拖曳功能就是不断修改窗口在背景中的相对坐标,然后重绘窗口而实现一种图片在拖曳的效果。这里这个窗口实际的实现是一个gtk+的drawarea组件。然后绘制用的库是cairo库。
然后另外一个主要的功能就是自动寻径了,我的地图信息采用的是图的矩阵存储。迪杰特斯拉算法网上,书上到处都有讲的,我只是给加了个图形显示功能。有人可能要问我这些坐标信息怎么来的,其实这里我走了点捷径,前面说过节点是我给的,其实,准确来说,是地图的用户给的,我只是在程序中给了一个接口,用户可以自己在地图上面绘制一条路径,然后添加到地图中去。我就是通过这种办法,把我的节点一个个添加进去的。
演示如下:
图片中大家应该可以看到,黑色的部分是我用鼠标在地图上面绘制的路径,这里我就代表添加一条边(
2024年3月31日 11:00
"I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work… These fortunate web sites are properly ranked by Bing, and by backlinking your site may also position well.
"
2024年3月31日 11:07
The the next time Someone said a blog, I hope it doesnt disappoint me around this one. Get real, Yes, it was my replacement for read, but When i thought youd have something intriguing to say. All I hear can be a handful of whining about something that you could fix when you werent too busy searching for attention.
2024年3月31日 11:08
I simply wished to appreciate you yet again. I’m not certain what I would have achieved without the entire advice documented by you regarding such area. Certainly was a depressing situation in my position, but encountering this professional avenue you processed that made me to cry for happiness. I am just happier for your information and even wish you really know what a powerful job you happen to be providing teaching people today by way of your web blog. Most probably you have never come across any of us.
2024年3月31日 11:09
Extraordinary positioned up, very informative. I’m thinking why the alternative experts of this area don’t realise this. You ought to continue your writing. I am sure, you’ve a large readers’ base already!
2024年3月31日 12:03
Hi, just wanted you to know I have added your site to my Google bookmarks because of your special blog layout. But earnestly, I think your site has one of the cleverest theme I’ve came across. It really helps make reading your blog a lot better.
2024年3月31日 12:04
Aw, this was an extremely good post. In concept I have to devote writing this way additionally – taking time and actual effort to make a good article… but what / things I say… I procrastinate alot and by no means often get something accomplished.
2024年3月31日 12:05
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
2024年3月31日 12:40
I think this is the most sensible perspective for getting it moving, actually. I have been hoping to find a comfort or clear perspective to turn up at ground zero. I'm unbelievably depleted on party with to find key and sharp talk concerning this. I will obviously be returning in the future to your weblog generally speaking around more soon. Appreciation for your brief and reasonable information. It is connected with a strikingly fair post with a lot of our resources. Thank for dropping this story.
2024年3月31日 12:41
Thanks for the sensible critique. Me & my neighbor were just preparing to do some research on this. We got a grab a book from our local library but I think I learned more from this post. I’m very glad to see such fantastic info being shared freely out there.
2024年3月31日 12:42
Cheap Handbags Wholesale You should think about doing growing this web site to a major authority in this particular market. You clearly contain a grasp handle in the topics so many people are looking for on this website anyways therefore you could indisputably even create a dollar or two off of some advertising. I’d explore following recent topics and raising how many write ups putting up and i guarantee you???d begin seeing some awesome web traffic in the near future. Simply a thought, all the best in whatever you do!
2024年3月31日 13:06
After study just a few of the blog posts in your website now, and I truly like your method of blogging. I bookmarked it to my bookmark website record and will likely be checking back soon. Pls try my web site as properly and let me know what you think.
2024年3月31日 13:07
I ran across your site last week and started to follow your posts consistently. I haven’t commented on any kind of blog site just yet but I was considering to start soon. It’s truly exciting to actually contribute to an article even if it’s only a blog. I really don’t know exactly what to write other than I really loved reading through a couple of of your articles. Great articles for sure. I will keep visiting your blog regularly. I learned a lot from you. Thanks!
2024年3月31日 13:07
Good – I should certainly pronounce, impressed with your web site. I had no trouble navigating through all tabs as well as related info ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or something, site theme . a tones way for your customer to communicate. Nice task.
2024年3月31日 13:21
Aw, this was an extremely good post. In concept I have to devote writing this way additionally – taking time and actual effort to make a good article… but what / things I say… I procrastinate alot and by no means often get something accomplished.
2024年3月31日 13:22
I’m impressed, I actually have to say. Genuinely hardly ever have to i stumble upon a blog that’s each educative and specific, and permit me inform you, you’ve hit the nail across the pinnacle. Your notion is super; ab muscle groups a few factor that insufficient clients are speaking intelligently approximately. We are glad that we got here during this in my search for some thing with this.
2024年3月31日 13:22
I think this is the most sensible perspective for getting it moving, actually. I have been hoping to find a comfort or clear perspective to turn up at ground zero. I'm unbelievably depleted on party with to find key and sharp talk concerning this. I will obviously be returning in the future to your weblog generally speaking around more soon. Appreciation for your brief and reasonable information. It is connected with a strikingly fair post with a lot of our resources. Thank for dropping this story.
2024年3月31日 13:32
After study just a few of the blog posts in your website now, and I truly like your method of blogging. I bookmarked it to my bookmark website record and will likely be checking back soon. Pls try my web site as properly and let me know what you think.
2024年3月31日 13:32
Hello, I just favored to take some time to make an observation and say Ive surely loved analyzing your web page. That have become a actually wonderful article Please preserve writing because I love your fashion plenty.
2024年3月31日 13:33
This is truly fascinating, and you are a really accomplished blogger.I subscribed to your rss feed and am looking forward to reading more of your posts.I also posted your website on my social media accounts.
2024年3月31日 14:10
The cell cell telephone switch are seeking merchandise similarly to offerings synthetic a manner at what time is absolutely technically cutting-edge day however hassle-loose considering nicely in view of the truth that actually speedy with the reason of obtain splurge of.
2024年3月31日 14:10
Hello, I just favored to take some time to make an observation and say Ive surely loved analyzing your web page. That have become a actually wonderful article Please preserve writing because I love your fashion plenty.
2024年3月31日 14:19
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
2024年3月31日 14:20
This is truly fascinating, and you are a really accomplished blogger.I subscribed to your rss feed and am looking forward to reading more of your posts.I also posted your website on my social media accounts.
2024年3月31日 14:59
Aw, this was an extremely good post. In concept I have to devote writing this way additionally – taking time and actual effort to make a good article… but what / things I say… I procrastinate alot and by no means often get something accomplished.
2024年3月31日 15:00
I think this is the most sensible perspective for getting it moving, actually. I have been hoping to find a comfort or clear perspective to turn up at ground zero. I'm unbelievably depleted on party with to find key and sharp talk concerning this. I will obviously be returning in the future to your weblog generally speaking around more soon. Appreciation for your brief and reasonable information. It is connected with a strikingly fair post with a lot of our resources. Thank for dropping this story.
2024年3月31日 15:03
This is truly fascinating, and you are a really accomplished blogger.I subscribed to your rss feed and am looking forward to reading more of your posts.I also posted your website on my social media accounts.
2024年3月31日 15:04
This is truly fascinating, and you are a really accomplished blogger.I subscribed to your rss feed and am looking forward to reading more of your posts.I also posted your website on my social media accounts.
2024年3月31日 15:05
What would many of us do devoid of the brilliant suggestions you share on this web site? Who else has got the perseverance to cope with important topics in the interest of ordinary subscribers like me? My spouse and i and my guys are really lucky to have your website among the ones we typically visit. We hope you know how a great deal we take pleasure in your efforts! Much luck coming from us all.
2024年3月31日 15:05
Admiring the time and effort you put into your website and in depth information you present. It’s good to come across a blog every once in a while that isn’t the same old rehashed information. Wonderful read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
2024年3月31日 15:58
I have been hoping to find a comfort or clear perspective to turn up at ground zero. I'm unbelievably depleted on party with to find key and sharp talk concerning this. I will obviously be returning in the future to your weblog generally speaking around more soon. Appreciation for your brief and reasonable information. It is connected with a strikingly fair post with a lot of our resources. Thank for dropping this story.
2024年3月31日 15:58
An interesting discussion will probably be worth comment. I’m sure that you ought to write much more about this topic, may possibly not become a taboo subject but usually everyone is not enough to communicate on such topics. To the next. Cheers
2024年3月31日 15:59
Have you ever considered about adding a little bit more than just your articles? I mean, what you say is fundamental and everything. Nevertheless think about if you added some great pictures or video clips to give your posts more, “pop”! Your content is excellent but with images and clips, this site could certainly be one of the most beneficial in its field. Fantastic blog!
2024年3月31日 16:41
Hi, just wanted you to know I have added your site to my Google bookmarks because of your special blog layout. But earnestly, I think your site has one of the cleverest theme I’ve came across. It really helps make reading your blog a lot better.
2024年3月31日 16:41
I discovered your site website on bing and check some of your early posts. Always maintain inside the great operate. I recently additional encourage RSS feed to my MSN News Reader. Looking for forward to reading more within you at a later time!…
2024年3月31日 16:42
The following time I learn a blog, I hope that it doesnt disappoint me as a lot as this one. I imply, I know it was my choice to learn, but I actually thought youd have one thing fascinating to say. All I hear is a bunch of whining about something that you may fix should you werent too busy searching for attention.
2024年3月31日 17:12
The following time I learn a blog, I hope that it doesnt disappoint me as a lot as this one. I imply, I know it was my choice to learn, but I actually thought youd have one thing fascinating to say. All I hear is a bunch of whining about something that you may fix should you werent too busy searching for attention.
2024年3月31日 17:12
I’m impressed, I actually have to say. Genuinely hardly ever have to i stumble upon a blog that’s each educative and specific, and permit me inform you, you’ve hit the nail across the pinnacle. Your notion is super; ab muscle groups a few factor that insufficient clients are speaking intelligently approximately. We are glad that we got here during this in my search for some thing with this.
2024年3月31日 18:00
Thanks for the sensible critique. Me & my neighbor were just preparing to do some research on this. We got a grab a book from our local library but I think I learned more from this post. I’m very glad to see such fantastic info being shared freely out there.
2024年3月31日 18:00
Thanks for the sensible critique. Me & my neighbor were just preparing to do some research on this. We got a grab a book from our local library but I think I learned more from this post. I’m very glad to see such fantastic info being shared freely out there.