Comments (5)
when use setURL() method,get the model displayed.
#if 0
mp->setNode(model);
#else
mp->setURL("axes.osgt.1000000.scale");
#endif
from osgearth.
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.
Sounds like a bug - I will tag it and we'll take a look when we get a chance.
Thanks.
from osgearth.
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.
Bottom line, this layer needs a re-design. The original purpose was only to load models from an earth file. The set/get functions will configure the options, but they do nothing at runtime.
After 3.5 we will look at reworking this layer entirely. For now I will close this issue and open a new feature issue.
from osgearth.
Related Issues (20)
- ObjectWrapperManager::addWrapper(): '' already exists. HOT 1
- how to use osgEarthCesium as an static lib? HOT 2
- [HELP] Update vertexarray through nodevisitor, then can't see mode in some view, and pagelod doesn't work HOT 1
- GDALImageLayer - doesn't work in Debug configuration HOT 8
- i used those example programs ,but i'm having some issues (i built the project using vcpkg) HOT 1
- osgEarthCesium: build error with MacOS HOT 1
- jobs::dispatch - won't build on C++20
- TexEnv not supported HOT 5
- disable or default to no gltf and lerc
- SamplerBindings are not pruned when Shared Layer is Removed from REX Engine HOT 4
- The close() and open() methods of layers crash HOT 2
- no matching function for call to ‘CesiumIonClient::Connection::Connection(CesiumAsync::AsyncSystem&, std::shared_ptr<osgEarth::Cesium::AssetAccessor>&, std::string)' HOT 1
- build failed with Cesium-native HOT 1
- featuremodelayer ignore light. HOT 2
- get image texture in contour map HOT 5
- why crash when show 2D map? HOT 1
- ModelLayer displays osgb model shader errors in Qt5 HOT 6
- Build problem with osgEarth HOT 2
- Dependencies problems HOT 3
- osgearth_version started complaining about fontconfig-1.dll entry point FT_Get_BDF_Property HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osgearth.