Giter Club home page Giter Club logo

simdissdk's People

Contributors

chriskwasneski avatar crmcnulty avatar emminizer avatar fabausch avatar fmoham18 avatar geissel1 avatar glenn-saic avatar gwaldron avatar jasonbeverage avatar sawolford avatar smarttigerfly avatar travisbender avatar usnrl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simdissdk's Issues

Problem displaying some 3D models

SIMDIS SDK Gurus,

I have a 3D ship model in OpenSceneGraph .ive format. It displays OK in the osgviewer (see 1st picture below) but appears ghost like in the SIMDIS SDK viewer (see 2nd picture below). The SIMDIS SDK viewer is not showing the textures/materials and not applying the vertex normals. Are there maybe specific flags I have to enable in the code? However, if I replace the ship model with one of the IVE files in the SIMDIS_SDK-Data folder, the latter displays fine with the same code.

Note: This ship model was originally created in USDZ format, converted into OBJ, and then I used osgconv to convert it from OBJ to IVE. The ship model is just an example, I see similar problems with other 3D models that I have. I thought the 3D model reader/renderer in SIMDIS SDK is based on OpenSceneGraph, so a 3D model should appear the same in both!?

image

image

osgeo::proj::io::FactoryException?

When runs the newest version of the simdissdk examples with qt (for example TestViewManager) , the application will print the osgeo::proj::io::FactoryException in the visual studio output console (for example vs2019). Is it a bug?

Information about .opt and .3db file formats?

I was playing with SIMDIS model editor, and I saw it saves in opt. I've never seen that file format. Is there a specification for it?

I also saw some "3db" models. I thought those may be an sqlite 3 db, but I did not have much luck there either.

Thanks.

ImGui And Mouse Double Clicks

In my testing with using ImGui with SIMDIS SDK, I have found that it is not processing mouse double clicks correctly.
OsgImGuiHandler.cpp has this:

bool OsgImGuiHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
{
...
  case osgGA::GUIEventAdapter::DOUBLECLICK:
  {
    io.MousePos = ImVec2(ea.getX(), io.DisplaySize.y - ea.getY());
    mouseDoubleClicked_[0] = ea.getButtonMask() & osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON;
    mouseDoubleClicked_[1] = ea.getButtonMask() & osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON;
    mouseDoubleClicked_[2] = ea.getButtonMask() & osgGA::GUIEventAdapter::MIDDLE_MOUSE_BUTTON;
    return wantCaptureMouse;
  }
...
}

which I have found needs to be the following so that g.IO.MouseClickedCount gets set correctly in ImGui:

bool OsgImGuiHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
{
...
  case osgGA::GUIEventAdapter::DOUBLECLICK:
  {
    io.MousePos = ImVec2(ea.getX(), io.DisplaySize.y - ea.getY());
    mousePressed_[0] = ea.getButtonMask() & osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON;
    mousePressed_[1] = ea.getButtonMask() & osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON;
    mousePressed_[2] = ea.getButtonMask() & osgGA::GUIEventAdapter::MIDDLE_MOUSE_BUTTON;
    mouseDoubleClicked_[0] = ea.getButtonMask() & osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON;
    mouseDoubleClicked_[1] = ea.getButtonMask() & osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON;
    mouseDoubleClicked_[2] = ea.getButtonMask() & osgGA::GUIEventAdapter::MIDDLE_MOUSE_BUTTON;
    return wantCaptureMouse;
  }
...
}

This can be tested by adding the following to the draw method in any example that uses ImGui:

    if (ImGui::TreeNodeEx("Test Root", ImGuiTreeNodeFlags_DefaultOpen |
      ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_OpenOnArrow |
      ImGuiTreeNodeFlags_OpenOnDoubleClick))
    {
      if (ImGui::TreeNodeEx("Test Node", ImGuiTreeNodeFlags_SpanAvailWidth |
        ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_DefaultOpen |
        ImGuiTreeNodeFlags_OpenOnDoubleClick))
      {
        if (ImGui::TreeNodeEx("Test Leaf", ImGuiTreeNodeFlags_Leaf |
          ImGuiTreeNodeFlags_SpanAvailWidth |
          ImGuiTreeNodeFlags_NoTreePushOnOpen))
        {
        }
        ImGui::TreePop();
      }
      ImGui::TreePop();
    }

And double click on the tree nodes to expand/collapse the node.

Test environment:
OS: Windows 10 x64
Compiler: Visual Studio 2019

I am also using the latest version of the ImGui docking branch in my testing.

Thanks.

SimpleOceanLayer is not working

I created a SimpleOceanLayer instance and also passed bathymetry data using GdalElevationLayer , i have a slider to increase the sea level which will set the SimpleOceanLayer ->setSeaLevel(value) But there is no visible change in the sea level though the sea value is set.

Toggling Platform Highlight Causes Icon To Disappear

In example_imageicons, toggling the highlight on and then off causes the icon itself to disappear. You have to re-enable the highlight to make the icon visible. Tested on SDK version 1.15 on Windows using Visual Studio 2019.

Trying to understand the track preferences

I'm writing a program that adds waypoints to a platform simulator to show the trajectory of an object. When running, the simulation repeats itself when it gets to the end of the waypoints.

Is there a way to remove the "repeats"? That is, when the platform gets to the last waypoint I would like for it to stay there instead of repeating the simulation. I've tried using simUtil::PlatformSimulator::setLoop(bool) to turn that off, but it doesn't give what I want.

Any ideas out there?

Fast Mouse/Keyboard Events Crash Qt/SIMDIS Application

This is a long shot, but just in case someone ran into the same issue or may have some ideas.

Mouse and keyboard work fine in my SIMDIS standalone application. However, after integrating with Qt, fast mouse and keyboard events cause the Qt/SIMDIS application to crash.

I'm capturing the mouse and keyboard events from my Qt main GUI and then send the events to SIMDIS for updating the 3D scene. For example, holding Shift + Up Arrow zooms in to the scene. If I hold Shift and press/release Up Arrow slowly, then it works fine zooming incrementally. If I hold Shift and press/hold Up Arrow (or press/release Up Arrow too fast), then the application crashes. It seems the key events are sent too fast from Qt to SIMDIS to cause the crash (I tried adding a small time delay but didn't help).

Also, the left and right mouse keys work fine for pan and rotate, however, scrolling the middle mouse wheel to do zooming immediately crashes the applications.

GOG Projections w.r.t. View Angle

I have a GOG file with some annotations and equilateral triangles that I loaded into the scene. Below are two images captured from two different viewing angles. The annotations, "T" symbols, automatically rotate with respect to the camera. How do I get the triangles to also rotate automatically so they are always shown as equilateral triangles, regardless of the viewing angle?

Do I have to manually project the points of the triangles to the plane that's perpendicular to the line-of-sight?

image

Visual issues with simQt::ViewWidgets that share simVis::SceneManagers and simVis::ViewManagers

I am currently writing a Qt application that will need to use multiple instances of simQt::ViewWidgets across different widgets/windows through the runtime. In some specific cases, the ability to create a mirrored instance of a view widget that displays the previously created artifacts and platforms from a different widget the user was interacting with is needed.

Based on the examples provided in the SDK, I am creating multiple view widgets dynamically, each with their on instance of a simVis::View and sharing the same instance of the simVis::SceneManager. Each simVis::View is added to the same instance of the simVis::ViewManager. This methodology works when any "shared" instances of the view widgets are created very close together in the program execution, like a constructor or main loop. However, in an event-driven scenario where the different view widgets are created apart, I'm seeing some interesting effects.

When creating new simQt::ViewWidgets dynamically some time after the application runtime begins, the tiling of the globe behaves strangely. Specifically the globe shows up black. If you zoom in, re-tiling occurs, but significantly slower than expected. Zooming out returns the globe to black. The first instance of the view widget created in the application always renders correctly with no noticeable issues. All of the subsequent view widgets have the described problem, though.

I've been able to successfully recreate this issue using the Qt Dockable Views test, as well as a modified version of the Qt View Manager Test.

Qt Dockable View Test
In this first screenshot, the Qt Dockable View Test renders the first view widget expectedly.

start_up_qt_dockable_views

The second screenshot is the result of creating a new Dialog.

new_view_added_qt_dockable_views

Modified Qt View Manager Test
To debug the issue that I've been seeing, I modified the Qt View Manager Test to create two view widgets immediately after each other sharing the same instance of the simVis::SceneManager with each simVis::View added to the same simVis::ViewManager. I added a button that invokes a lambda to create a new view widget, attaches its simVis::View to the shared simVis::SceneManager, and adds the view to the same simVis::ViewManager. The same result described in the dockable test occurs.

modified_view_manager_test

The only useful logging information I've derived through my testing is a warning that occurs when created the second and third instances of the view widgets in the modified Qt View Manager Test:

CompositeViewer::realize() - No views to realize.

I can recreate this issue on Windows 10, openSUSE 15.2, and Cent OS 8 using these same dependencies versions:

Dependency Versions:
osg - 3.6.5
osgEarth - osgearth-simdis-sdk-1.12
osgQt - 91ba61f
Qt - 5.13.2

Any help would be greatly appreciated!

PlatformNode is attached to Mapnode?

what is the hierarchy of attaching PlatformNode (the one that contains the icon/model) to the earth node) , i would like to know if the model nodes are getting added to map node or not?

Good gidelines / examples for creating plugins

Hello, I have written a C++ program that integrates with SimDis by exporting a file in the ASI format. Are there guidelines/examples that will let me embed this solution as a plugin.

Compile error on simCore::checkVersionThrow()

SIMDIS SDK Gurus,

I'm trying to compile the example code /SIMDIS_SDK/share/ExternalSdkProject/VisExample/VisExample.cpp on Qt Creator and keep getting the below compilation errors. If I change the first line simCore::checkVersionThrow() to simCore::checkVersion(), then the code compiles and runs OK.

I'm using SIMDIS SDK 1.17 on RHEL 8.9 with Qt 5.9.8. I can successfully compile the SIMDIS SDK from source code but my own compiled version of the SIMDIS SDK libraries gives the same compilation errors.

main.cpp

#include "simCore/Common/Version.h"
#include "simVis/Viewer.h"
#include "simUtil/ExampleResources.h"

int main(int argc, char* argv[])
{
  simCore::checkVersionThrow();
  osg::ArgumentParser arguments(&argc, argv);
  simExamples::configureSearchPaths();

  // Set up OSG features if supported
  osg::DisplaySettings::instance()->setNumMultiSamples(4);

  // initialize a SIMDIS viewer and load a planet.
  osg::ref_ptr<simVis::Viewer> viewer = new simVis::Viewer(arguments);
  viewer->setMap(simExamples::createDefaultExampleMap());

  // start in a windowed mode
  viewer->getMainView()->setUpViewInWindow(100, 100, 1024, 768);
  // set an initial viewpoint
  viewer->getMainView()->lookAt(38.89511, -77.03637, 0, 0, -89, 5e6);

  // add debug handlers like stats and fullscreen mode (s and f hotkeys)
  viewer->installDebugHandlers();

  return viewer->run();
}

Compilation errors:

g++ -Wl,-O1 -Wl,-rpath,/home/facula/Qt5.9.8/5.9.8/gcc_64/lib -o simdis main.o mainwindow.o moc_mainwindow.o   -L/home/facula/SIMDIS/SIMDIS_SDK/lib -lsimCore -lsimNotify -lsimUtil -lsimVis -lsimQt -lsimData -lgdal -lgeos -lgeos_c -losg -losgUtil -losgViewer -losgDB -losgGA -losgText -lOpenThreads -losgShadow -losgSim -losgTerrain -losgQt5 -losgAnimation -losgWidget -losgEarth -losgEarthTriton -losgEarthSilverLining -L/home/facula/Qt5.9.8/5.9.8/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 
main.o: In function `simCore::Exception::~Exception()':
main.cpp:(.text._ZN7simCore9ExceptionD2Ev[_ZN7simCore9ExceptionD5Ev]+0x7a): undefined reference to `simNotify::NotifyHandler::operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.o: In function `simCore::LibraryVersionError::~LibraryVersionError()':
main.cpp:(.text._ZN7simCore19LibraryVersionErrorD2Ev[_ZN7simCore19LibraryVersionErrorD5Ev]+0x7a): undefined reference to `simNotify::NotifyHandler::operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.o: In function `simCore::Exception::~Exception()':
main.cpp:(.text._ZN7simCore9ExceptionD0Ev[_ZN7simCore9ExceptionD5Ev]+0x82): undefined reference to `simNotify::NotifyHandler::operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
main.o: In function `simCore::LibraryVersionError::~LibraryVersionError()':
main.cpp:(.text._ZN7simCore19LibraryVersionErrorD0Ev[_ZN7simCore19LibraryVersionErrorD5Ev]+0x82): undefined reference to `simNotify::NotifyHandler::operator<<(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:249: simdis] Error 1
06:07:14: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project simdis (kit: Desktop Qt 5.9.8 GCC 64bit)
When executing step "Make"

Updating GOG shape

Is there any example to update GOG shapes using callback , i tried using example_customrenderingtest but the output was not as expected. I just need a shape attached to a property which updates for each second.

GOG Coordinate System

What coordinate system and units are the XYZ position values for GOG?

I'm trying to create a GOG and place it at a specific location. The following code snippet extracted from ExamplePicking.cpp works fine. However, instead of using centerll, I want to use centerxyz. I converted the LAT/LON values into ECEF for use with centerxyz, but the latter doesn't place the GOG at the correct location (i.e. it's not placed at the same position as LAT/LON specified using centerll).

  ss << "start\n";
  ss << "circle\n";
  ss << "3d name First Circle - outlined\n";
  ss << "depthbuffer on\n";
  ss << "altitudeunits meters\n";
  ss << "linecolor green\n";
  ss << "linewidth 2\n";
  ss << "centerll " << LAT << " " << LON - 0.01 << " " << GOG_ALT << "\n";
  ss << "radius " << (0.25 * (MAX_X - MIN_X)) << "\n";
  ss << "end\n";

I used the following code to convert LAT/LON to ECEF:

simCore::Coordinate lla(simCore::COORD_SYS_LLA,
      simCore::Vec3(LAT * simCore::DEG2RAD, LON * simCore::DEG2RAD, GOG_ALT),
      simCore::Vec3(45.0, 45.0, 45.0),
      simCore::Vec3(0.0, 0.0, 0.0));

simCore::Coordinate ecef;
simCore::CoordinateConverter::convertGeodeticToEcef(lla, ecef);

simdis triton ocean problem

I use simdissdk-1.8 and osgearth-simdis-sdk-1.8 version, when I run osgearth_triton example the triton ocean is normal display on the earth, but run simdissdk example Ocean, the triron ocean display abnormally, can't see the ocean surface on the earth:
_20180614210516
_20180614210509
but can see the ocean water wave when I look up from under the water:
_20180614210522
I don't know why, maybe it's simdissdk bug? Hope for your help thanks.
My system is Windows 10 and Nvidia graphics card.

Override 3D Model Color

I'm using the functions mutable_commonprefs()->set_useoverridecolor(true) and mutable_commonprefs()->set_overridecolor() from simData::PlatformPrefs to change the color of a 3D model displayed in the scene. The results appear to show that these functions blend the new color with the original color of the 3D model rather than overriding. Am I missing a setting?

Below is an example with override colors applied to the SIMDIS EXAMPLE_AIRPLANE_ICON model. First picture shows that original model color, second picture shows Yellow as the applied override color, and third picture shows Dark Blue as the applied override color. Notice the Yellow color barely had any effect.

image

Qt6 Support

I need to talk with someone about what plans (if any) the SIMDIS SDK has for migration to Qt6.

LOS attached with platform

Is there any example where the LOS node is attached to a moving 3D model and will the visibility sense if the yaw of the model changes so that the LOS node will obstruct with the model

Does DCS API work?

Hello,

In the website, it is written that DCS API has been deprecated since 2008. Today I've downloaded DCS examples and compiled them. They work well with SIMDIS application. Does this mean that DCSI API works but not supported, or it seems working but may work incorrectly?

Specifically, I want to show some scenarios using live mode but the existing Plugin-API requires two tasks: writing a plugin and writing another app to provide the plugin data. Well, I can do all of them in the plugin code but I'm not good at C++. I will use C#. That's why I'm asking.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.