root/OpenSceneGraph/trunk/examples/osgkdtree/osgkdtree.cpp
@
8404
| Revision 8404, 1.7 kB (checked in by robert, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | /* OpenSceneGraph example, osgintersection. |
| 2 | * |
| 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | * of this software and associated documentation files (the "Software"), to deal |
| 5 | * in the Software without restriction, including without limitation the rights |
| 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | * copies of the Software, and to permit persons to whom the Software is |
| 8 | * furnished to do so, subject to the following conditions: |
| 9 | * |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 11 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 12 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 13 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 14 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 15 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 16 | * THE SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | #include <osg/ArgumentParser> |
| 20 | #include <osg/ApplicationUsage> |
| 21 | #include <osg/Timer> |
| 22 | #include <osg/CoordinateSystemNode> |
| 23 | #include <osg/Notify> |
| 24 | #include <osg/io_utils> |
| 25 | |
| 26 | #include <osgDB/ReadFile> |
| 27 | |
| 28 | #include <osgUtil/IntersectionVisitor> |
| 29 | #include <osgUtil/LineSegmentIntersector> |
| 30 | |
| 31 | #include <osgSim/LineOfSight> |
| 32 | #include <osgSim/HeightAboveTerrain> |
| 33 | #include <osgSim/ElevationSlice> |
| 34 | |
| 35 | #include <iostream> |
| 36 | |
| 37 | |
| 38 | int main(int argc, char **argv) |
| 39 | { |
| 40 | // use an ArgumentParser object to manage the program arguments. |
| 41 | osg::ArgumentParser arguments(&argc,argv); |
| 42 | |
| 43 | osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments); |
| 44 | |
| 45 | if (!scene) |
| 46 | { |
| 47 | std::cout<<"No model loaded, please specify a valid model on the command line."<<std::endl; |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | |
| 52 | return 0; |
| 53 | } |
Note: See TracBrowser
for help on using the browser.
