Giter Club home page Giter Club logo

Comments (4)

x1244 avatar x1244 commented on June 13, 2024

when use setURL() method,get the model displayed.

#if 0
    mp->setNode(model);
#else
    mp->setURL("axes.osgt.1000000.scale");
#endif

from osgearth.

x1244 avatar x1244 commented on June 13, 2024

When I put the model under the GeoTransform node and make the location, the model is displayed in the specified location.
At the same time, whether or not the setLocation() of the ModelLayer is set, it does not affect the display position of the model under the GeoTransform node.

    //this is OK
    GeoPoint gp(srs, -90.8, 0.33);
    GeoTransform* gt = new GeoTransform;
    gt->setPosition(gp);
    gt->addChild(model);
    mp->setNode(gt);
    mp->setLocation(GeoPoint(srs, -100.0, 5.0)); //has no effect

The model set via setURL() is affected by setLocation() and adjusts position. Is this the result of the design, or is it a bug?

from osgearth.

gwaldron avatar gwaldron commented on June 13, 2024

Sounds like a bug - I will tag it and we'll take a look when we get a chance.
Thanks.

from osgearth.

x1244 avatar x1244 commented on June 13, 2024

And the methord setOrientation() has no effect either.

    mp->setLocation(GeoPoint(srs, -100.0, 5.0));
    mp->setOrientation(osg::Vec3(120.0, 22.0, 48.0));

The .earth file config by orientation also has no effect.

	<Model name="axes in sea" paged="true" max_rang="50000">
        <url>axes.osgt.1000.scale.osgearth_shadergen</url>
        <location lat="-2.3717" long="-85.018" alt="200.2"/>
	<orientation>78.0, 35.6, 163.2</orientation>
    </Model>

I use a PAT node to make it.

    GeoTransform* gt = new GeoTransform;
    gt->setPosition(gp);
    osg::PositionAttitudeTransform* pta = new osg::PositionAttitudeTransform;
    pta->setAttitude(osg::Quat(45.0, osg::Z_AXIS));
    pta->addChild(model);
    gt->addChild(pta);
    mp->setNode(gt);

from osgearth.

Related Issues (20)

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.