All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.micromata.opengis.kml.v_2_2_0.Orientation Maven / Gradle / Ivy

Go to download

This is JavaAPIforKMml, Micromata's library for use with applications that want to parse, generate and operate on KML. It is an implementation of the OGC KML 2.2 standard. It is written entirely in Java and makes heavy use of JAXB.

There is a newer version: 3.0.4
Show newest version

package de.micromata.opengis.kml.v_2_2_0;

import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;
import jakarta.xml.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;


/**
 * {@code }
 * 

* Describes rotation of a 3D model's coordinate system to position the object in Google * Earth. See diagram below. {@code 45.0 10.0 * 0.0 } *

* * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "OrientationType", propOrder = { "heading", "tilt", "roll", "orientationSimpleExtension", "orientationObjectExtension" }) @XmlRootElement(name = "Orientation", namespace = "http://www.opengis.net/kml/2.2") public class Orientation extends AbstractObject implements Cloneable { /** * {@code } *

* Direction (azimuth) of the camera, in degrees. Default=0 (true North). (See diagram.) * Values range from 0 to 360 degrees. *

*

* Direction (that is, North, South, East, West), in degrees. Default=0 (North). (See * diagram below.) Values range from 0 to 360 degrees. *

*

* Direction (that is, North, South, East, West), in degrees. Default=0 (North). (See * diagram.) Values range from 0 to 360 degrees. *

*

* Rotation about the z axis (normal to the Earth's surface). A value of 0 (the default) * equals North. A positive rotation is clockwise around the z axis and specified in * degrees from 0 to 360. *

* * * */ @XmlElement(defaultValue = "0.0") protected double heading; /** * {@code } *

* Angle between the direction of the LookAt position and the normal to the surface * of the earth. (See diagram below.) Values range from 0 to 90 degrees. Values for * {@code } cannot be negative. A {@code } value of 0 degrees indicates viewing from directly * above. A {@code } value of 90 degrees indicates viewing along the horizon. *

*

* Rotation about the x axis. A positive rotation is clockwise around the x axis and * specified in degrees from 0 to 360. *

*

* Rotation, in degrees, of the camera around the X axis. A value of 0 indicates that * the view is aimed straight down toward the earth (the most common case). A value * for 90 for {@code } indicates that the view is aimed toward the horizon. Values greater * than 90 indicate that the view is pointed up into the sky. Values for {@code } are * clamped at +180 degrees. *

* * * */ @XmlElement(defaultValue = "0.0") protected double tilt; /** * {@code } *

* {@code } Rotation about the z axis (normal to the Earth's surface). A value of * 0 (the default) equals North. A positive rotation is clockwise around the z axis * and specified in degrees from 0 to 360. {@code } Rotation about the x axis. A positive * rotation is clockwise around the x axis and specified in degrees from 0 to 360. * {@code } Rotation about the y axis. A positive rotation is clockwise around the y * axis and specified in degrees from 0 to 360. This diagram illustrates the typical * orientation of a model's axes: *

*

* Rotation about the y axis. A positive rotation is clockwise around the y axis and * specified in degrees from 0 to 360. *

*

* Rotation, in degrees, of the camera around the Z axis. Values range from −180 to * +180 degrees. *

*

* This diagram illustrates the typical orientation of a model's axes: *

* * * */ @XmlElement(defaultValue = "0.0") protected double roll; @XmlElement(name = "OrientationSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List orientationSimpleExtension; /** * {@code } *

* This is an abstract base class and cannot be used directly in a KML file. It provides * the id attribute, which allows unique identification of a KML element, and the targetId * attribute, which is used to reference objects that have already been loaded into * Google Earth. The id attribute must be assigned if the Update mechanism is to * be used. *

* * Syntax: *
<!-- abstract element; do not create -->
     * <!-- Object id="ID" targetId="NCName" -->
     * <!-- /Object> -->
* * * */ @XmlElement(name = "OrientationObjectExtensionGroup") protected List orientationObjectExtension; public Orientation() { super(); } /** * * * @return * possible object is * {@link Double} * */ public double getHeading() { return heading; } /** * * * @param value * allowed object is * {@link Double} * */ public void setHeading(double value) { this.heading = value; } /** * * * @return * possible object is * {@link Double} * */ public double getTilt() { return tilt; } /** * * * @param value * allowed object is * {@link Double} * */ public void setTilt(double value) { this.tilt = value; } /** * * * @return * possible object is * {@link Double} * */ public double getRoll() { return roll; } /** * * * @param value * allowed object is * {@link Double} * */ public void setRoll(double value) { this.roll = value; } /** * * */ public List getOrientationSimpleExtension() { if (orientationSimpleExtension == null) { orientationSimpleExtension = new ArrayList(); } return this.orientationSimpleExtension; } /** * * */ public List getOrientationObjectExtension() { if (orientationObjectExtension == null) { orientationObjectExtension = new ArrayList(); } return this.orientationObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp; temp = Double.doubleToLongBits(heading); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(tilt); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(roll); result = ((prime*result)+((int)(temp^(temp >>>(32))))); result = ((prime*result)+((orientationSimpleExtension == null)? 0 :orientationSimpleExtension.hashCode())); result = ((prime*result)+((orientationObjectExtension == null)? 0 :orientationObjectExtension.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (super.equals(obj) == false) { return false; } if ((obj instanceof Orientation) == false) { return false; } Orientation other = ((Orientation) obj); if (heading!= other.heading) { return false; } if (tilt!= other.tilt) { return false; } if (roll!= other.roll) { return false; } if (orientationSimpleExtension == null) { if (other.orientationSimpleExtension!= null) { return false; } } else { if (orientationSimpleExtension.equals(other.orientationSimpleExtension) == false) { return false; } } if (orientationObjectExtension == null) { if (other.orientationObjectExtension!= null) { return false; } } else { if (orientationObjectExtension.equals(other.orientationObjectExtension) == false) { return false; } } return true; } /** * * * @param orientationSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setOrientationSimpleExtension(final List orientationSimpleExtension) { this.orientationSimpleExtension = orientationSimpleExtension; } /** * add a value to the orientationSimpleExtension property collection * * @param orientationSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public Orientation addToOrientationSimpleExtension(final Object orientationSimpleExtension) { this.getOrientationSimpleExtension().add(orientationSimpleExtension); return this; } /** * * * @param orientationObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setOrientationObjectExtension(final List orientationObjectExtension) { this.orientationObjectExtension = orientationObjectExtension; } /** * add a value to the orientationObjectExtension property collection * * @param orientationObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public Orientation addToOrientationObjectExtension(final AbstractObject orientationObjectExtension) { this.getOrientationObjectExtension().add(orientationObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public Orientation addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * fluent setter * * * @param heading * required parameter */ public Orientation withHeading(final double heading) { this.setHeading(heading); return this; } /** * fluent setter * * * @param tilt * required parameter */ public Orientation withTilt(final double tilt) { this.setTilt(tilt); return this; } /** * fluent setter * * * @param roll * required parameter */ public Orientation withRoll(final double roll) { this.setRoll(roll); return this; } /** * fluent setter * * * @param orientationSimpleExtension * required parameter */ public Orientation withOrientationSimpleExtension(final List orientationSimpleExtension) { this.setOrientationSimpleExtension(orientationSimpleExtension); return this; } /** * fluent setter * * * @param orientationObjectExtension * required parameter */ public Orientation withOrientationObjectExtension(final List orientationObjectExtension) { this.setOrientationObjectExtension(orientationObjectExtension); return this; } @Obvious @Override public Orientation withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public Orientation withId(final String id) { super.withId(id); return this; } @Obvious @Override public Orientation withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Override public Orientation clone() { Orientation copy; copy = ((Orientation) super.clone()); copy.orientationSimpleExtension = new ArrayList((getOrientationSimpleExtension().size())); for (Object iter: orientationSimpleExtension) { copy.orientationSimpleExtension.add(iter); } copy.orientationObjectExtension = new ArrayList((getOrientationObjectExtension().size())); for (AbstractObject iter: orientationObjectExtension) { copy.orientationObjectExtension.add(iter.clone()); } return copy; } }