From Maria Ten, "The constructor method of the EllipsoidLocator of osgTerrain assumes
that the terrain is always the Earth planet. I changed the constructor method to accept the Equator radius and the Polar radius like parameters. By default, it assumes the Earth radius for the EllipsoidLocator. I added a setEllipsoidModel method, too. Now, we are developing some libraries for a GIS applicacion, and our libraries can visualize terrains of planets like Mars. I think that is a interesting change."
This commit is contained in:
@@ -80,13 +80,12 @@ bool Locator::computeLocalBounds(Locator& source, osg::Vec3d& bottomLeft, osg::V
|
||||
//
|
||||
// EllipsoidLocator
|
||||
//
|
||||
EllipsoidLocator::EllipsoidLocator(double longitude, double latitude, double deltaLongitude, double deltaLatitude, double height, double heightScale)
|
||||
EllipsoidLocator::EllipsoidLocator(double longitude, double latitude, double deltaLongitude, double deltaLatitude, double height, double heightScale, double radiusEquator, double radiusPolar)
|
||||
{
|
||||
setExtents(longitude, latitude, deltaLongitude, deltaLatitude, height, heightScale);
|
||||
_em = new osg::EllipsoidModel;
|
||||
_em = new osg::EllipsoidModel(radiusEquator, radiusPolar);
|
||||
}
|
||||
|
||||
|
||||
void EllipsoidLocator::setExtents(double longitude, double latitude, double deltaLongitude, double deltaLatitude, double height, double heightScale)
|
||||
{
|
||||
_longitude = longitude;
|
||||
|
||||
Reference in New Issue
Block a user