Announcement

Collapse
No announcement yet.

Help desperately needed with KML/Collada - Thank you!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help desperately needed with KML/Collada - Thank you!

    The KML/Collada support in Worldwind is very helpful - however - the "intersect" function does not work. The comment in CollagaMeshShape in the dummy intersect() method is

    * COLLADA shapes do not support intersection tests because the shape may be rendered multiple times with different
    * transform matrices. It's not possible to determine intersection without the transform matrix applied when the
    * shape is rendered.
    *

    Understood, but I really need to to be able to execute intersect() on KMLPlacemark objects that result from importing KML/Collada. For example, I have KML/Collaga for 3D building models. The geometry is all there, and the buildings render on the map, but there is no intersect() functionality.

    Has anyone done this? Code fragments or even suggestions about how to approach writing to code would be VERY MUCH APPRECIATED.

  • #2
    A little more detail. I have tweaked KMLController to recognize instances of KMLAbstractContainer objects (including KMLDocument, which is what I have). The KMLDocument, in tern, contains a KMLPlacemark object. The KMLPlacemark object, contains a KMLModelPlacemarkImpl rederable object. I would like to add the intersect() method to the KMLModelPlacemarkImpl class. That is what I need help with.

    The KMLModelPlacemarkImp objects contains a ColladaRoot object which in turn contains a ColladaScene object which contains a ColladaInstanceVisualScene which contains a ColladaNode which contains a ColladaInstanceGeometry and a ColladaMeshShape. I suspect that the information in the CollagaInstanceGeometry and ColladaMeshShape objects can be combined to implement intersect() but how??

    Thanks!

    Comment


    • #3
      Problem SOlved

      Out of necessity, I have worked out how to do this. I don't know that my implementation is consistent with WorldWind design and coding standards, but it works.

      Along the way, I have found a bug or two in the WW Collada code. One problem is where a rewind is done on a Buffer object where a flip is what is needed. The consequence is that the bounding box for Collada mesh shapes is computed incorrectly for objects that do not enclose the point zero (0,0,0). The Buffer objects in Java are complicated - some have argued that they are coded badly. They are a bit tricky to use reliably, and there is an error in the WW baseline associated with this trickiness.

      I am not clear about how to propose this enhancement for the baseline. If anyone is interested, let me know.

      Comment


      • #4
        Along the way, I have found a bug or two in the WW Collada code. One problem is where a rewind is done on a Buffer object where a flip is what is needed. The consequence is that the bounding box for Collada mesh shapes is computed incorrectly for objects that do not enclose the point zero (0,0,0). The Buffer objects in Java are complicated - some have argued that they are coded badly. They are a bit tricky to use reliably, and there is an error in the WW baseline associated with this trickiness.
        games reviews , funny random facts , Tiger information for kids , elephant facts , Animal fun facts

        Comment


        • #5
          Originally posted by jschatzman View Post
          Out of necessity, I have worked out how to do this. I don't know that my implementation is consistent with WorldWind design and coding standards, but it works.

          Along the way, I have found a bug or two in the WW Collada code. One problem is where a rewind is done on a Buffer object where a flip is what is needed. The consequence is that the bounding box for Collada mesh shapes is computed incorrectly for objects that do not enclose the point zero (0,0,0). The Buffer objects in Java are complicated - some have argued that they are coded badly. They are a bit tricky to use reliably, and there is an error in the WW baseline associated with this trickiness.

          I am not clear about how to propose this enhancement for the baseline. If anyone is interested, let me know.
          Did the bug fix ever get added to the code base, or is the issue still there? Does anyone have anymore details on this issue?

          Comment

          Working...
          X