Skip to content

PointPlacemark & PointPlacemarkAttributes Pitch #151

Open
@mainstringargs

Description

@mainstringargs

Description

Setting the Pitch on PointPlacemarkAttributes does not seem to work correctly

Steps to Reproduce

This simple example attempts to set a pitch on the PointPlacemark through the PointPlacemarkAttributes. (Uncomment the setPitch line to duplicate screenshots)

package gov.nasa.worldwindx.examples;

import gov.nasa.worldwind.WorldWind;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.geom.Position;
import gov.nasa.worldwind.layers.RenderableLayer;
import gov.nasa.worldwind.render.Offset;
import gov.nasa.worldwind.render.PointPlacemark;
import gov.nasa.worldwind.render.PointPlacemarkAttributes;

public class Placemarks extends ApplicationTemplate {
	public static class AppFrame extends ApplicationTemplate.AppFrame {
		public AppFrame() {
			super(true, true, false);

			final RenderableLayer layer = new RenderableLayer();

			PointPlacemark pp = new PointPlacemark(Position.fromDegrees(28, -102, 30000));
			pp.setLabelText("PointPlacemark");
			pp.setLineEnabled(false);
			pp.setAltitudeMode(WorldWind.ABSOLUTE);
			PointPlacemarkAttributes attrs = new PointPlacemarkAttributes();
            attrs.setImageAddress("gov/nasa/worldwindx/examples/images/georss.png");
			attrs.setScale(1.0);
			attrs.setImageOffset(Offset.CENTER);
			
//			attrs.setPitch(10.0);
//			attrs.setPitch(45.0);
			
			pp.setAttributes(attrs);
			layer.addRenderable(pp);

			// Add the layer to the model.
			insertBeforeCompass(getWwd(), layer);
		}
	}

	public static void main(String[] args) {
		ApplicationTemplate.start("WorldWind Placemarks", AppFrame.class);
	}
}

Expected behavior: [What you expect to happen]

I'd expect the icons to "tilt", but it seems instead they are being scrunched.

Actual behavior:

setPitch(0.0):

nopitch

setPitch(10.0):

tenpitch

setPitch(45.0):

fortyfivepitch

Reproduces how often: [What percentage of the time does it reproduce?]

N/A

Operating System and Version

Windows 10

Additional Information

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions