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

de.micromata.opengis.kml.v_2_2_0.ViewVolume 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 }
 * 

* Defines how much of the current scene is visible. Specifying the field of view is * analogous to specifying the lens opening in a physical camera. A small field of * view, like a telephoto lens, focuses on a small part of the scene. A large field * of view, like a wide-angle lens, focuses on a large part of the scene. *

* * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ViewVolumeType", propOrder = { "leftFov", "rightFov", "bottomFov", "topFov", "near", "viewVolumeSimpleExtension", "viewVolumeObjectExtension" }) @XmlRootElement(name = "ViewVolume", namespace = "http://www.opengis.net/kml/2.2") public class ViewVolume extends AbstractObject implements Cloneable { /** * {@code } *

* Angle, in degrees, between the camera's viewing direction and the left side of the * view volume. *

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

* Angle, in degrees, between the camera's viewing direction and the right side of * the view volume. *

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

* Angle, in degrees, between the camera's viewing direction and the bottom side of * the view volume. *

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

* Angle, in degrees, between the camera's viewing direction and the top side of the * view volume. *

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

* {@code } Angle, in degrees, between the camera's viewing direction and the left * side of the view volume. {@code } Angle, in degrees, between the camera's viewing * direction and the right side of the view volume. {@code } Angle, in degrees, * between the camera's viewing direction and the bottom side of the view volume. {@code } * Angle, in degrees, between the camera's viewing direction and the top side of the * view volume. {@code } Measurement in meters along the viewing direction from the camera * viewpoint to the PhotoOverlay shape. *

*

* Measurement in meters along the viewing direction from the camera viewpoint to the * PhotoOverlay shape. *

*

* The field of view for a PhotoOverlay is defined by four planes, each of which is * specified by an angle relative to the view vector. These four planes define the * top, bottom, left, and right sides of the field of view, which has the shape of * a truncated pyramid, as shown here: *

*

* The following diagrams show the four field-of-view angles within this pyramid: *

*

* The following diagrams show the four field-of-view angles within this pyramid: *

* * * */ @XmlElement(defaultValue = "0.0") protected double near; @XmlElement(name = "ViewVolumeSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List viewVolumeSimpleExtension; /** * {@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 = "ViewVolumeObjectExtensionGroup") protected List viewVolumeObjectExtension; public ViewVolume() { super(); } /** * * * @return * possible object is * {@link Double} * */ public double getLeftFov() { return leftFov; } /** * * * @param value * allowed object is * {@link Double} * */ public void setLeftFov(double value) { this.leftFov = value; } /** * * * @return * possible object is * {@link Double} * */ public double getRightFov() { return rightFov; } /** * * * @param value * allowed object is * {@link Double} * */ public void setRightFov(double value) { this.rightFov = value; } /** * * * @return * possible object is * {@link Double} * */ public double getBottomFov() { return bottomFov; } /** * * * @param value * allowed object is * {@link Double} * */ public void setBottomFov(double value) { this.bottomFov = value; } /** * * * @return * possible object is * {@link Double} * */ public double getTopFov() { return topFov; } /** * * * @param value * allowed object is * {@link Double} * */ public void setTopFov(double value) { this.topFov = value; } /** * * * @return * possible object is * {@link Double} * */ public double getNear() { return near; } /** * * * @param value * allowed object is * {@link Double} * */ public void setNear(double value) { this.near = value; } /** * * */ public List getViewVolumeSimpleExtension() { if (viewVolumeSimpleExtension == null) { viewVolumeSimpleExtension = new ArrayList(); } return this.viewVolumeSimpleExtension; } /** * * */ public List getViewVolumeObjectExtension() { if (viewVolumeObjectExtension == null) { viewVolumeObjectExtension = new ArrayList(); } return this.viewVolumeObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp; temp = Double.doubleToLongBits(leftFov); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(rightFov); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(bottomFov); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(topFov); result = ((prime*result)+((int)(temp^(temp >>>(32))))); temp = Double.doubleToLongBits(near); result = ((prime*result)+((int)(temp^(temp >>>(32))))); result = ((prime*result)+((viewVolumeSimpleExtension == null)? 0 :viewVolumeSimpleExtension.hashCode())); result = ((prime*result)+((viewVolumeObjectExtension == null)? 0 :viewVolumeObjectExtension.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 ViewVolume) == false) { return false; } ViewVolume other = ((ViewVolume) obj); if (leftFov!= other.leftFov) { return false; } if (rightFov!= other.rightFov) { return false; } if (bottomFov!= other.bottomFov) { return false; } if (topFov!= other.topFov) { return false; } if (near!= other.near) { return false; } if (viewVolumeSimpleExtension == null) { if (other.viewVolumeSimpleExtension!= null) { return false; } } else { if (viewVolumeSimpleExtension.equals(other.viewVolumeSimpleExtension) == false) { return false; } } if (viewVolumeObjectExtension == null) { if (other.viewVolumeObjectExtension!= null) { return false; } } else { if (viewVolumeObjectExtension.equals(other.viewVolumeObjectExtension) == false) { return false; } } return true; } /** * * * @param viewVolumeSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setViewVolumeSimpleExtension(final List viewVolumeSimpleExtension) { this.viewVolumeSimpleExtension = viewVolumeSimpleExtension; } /** * add a value to the viewVolumeSimpleExtension property collection * * @param viewVolumeSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public ViewVolume addToViewVolumeSimpleExtension(final Object viewVolumeSimpleExtension) { this.getViewVolumeSimpleExtension().add(viewVolumeSimpleExtension); return this; } /** * * * @param viewVolumeObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setViewVolumeObjectExtension(final List viewVolumeObjectExtension) { this.viewVolumeObjectExtension = viewVolumeObjectExtension; } /** * add a value to the viewVolumeObjectExtension property collection * * @param viewVolumeObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public ViewVolume addToViewVolumeObjectExtension(final AbstractObject viewVolumeObjectExtension) { this.getViewVolumeObjectExtension().add(viewVolumeObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public ViewVolume addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * fluent setter * * * @param leftFov * required parameter */ public ViewVolume withLeftFov(final double leftFov) { this.setLeftFov(leftFov); return this; } /** * fluent setter * * * @param rightFov * required parameter */ public ViewVolume withRightFov(final double rightFov) { this.setRightFov(rightFov); return this; } /** * fluent setter * * * @param bottomFov * required parameter */ public ViewVolume withBottomFov(final double bottomFov) { this.setBottomFov(bottomFov); return this; } /** * fluent setter * * * @param topFov * required parameter */ public ViewVolume withTopFov(final double topFov) { this.setTopFov(topFov); return this; } /** * fluent setter * * * @param near * required parameter */ public ViewVolume withNear(final double near) { this.setNear(near); return this; } /** * fluent setter * * * @param viewVolumeSimpleExtension * required parameter */ public ViewVolume withViewVolumeSimpleExtension(final List viewVolumeSimpleExtension) { this.setViewVolumeSimpleExtension(viewVolumeSimpleExtension); return this; } /** * fluent setter * * * @param viewVolumeObjectExtension * required parameter */ public ViewVolume withViewVolumeObjectExtension(final List viewVolumeObjectExtension) { this.setViewVolumeObjectExtension(viewVolumeObjectExtension); return this; } @Obvious @Override public ViewVolume withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public ViewVolume withId(final String id) { super.withId(id); return this; } @Obvious @Override public ViewVolume withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Override public ViewVolume clone() { ViewVolume copy; copy = ((ViewVolume) super.clone()); copy.viewVolumeSimpleExtension = new ArrayList((getViewVolumeSimpleExtension().size())); for (Object iter: viewVolumeSimpleExtension) { copy.viewVolumeSimpleExtension.add(iter); } copy.viewVolumeObjectExtension = new ArrayList((getViewVolumeObjectExtension().size())); for (AbstractObject iter: viewVolumeObjectExtension) { copy.viewVolumeObjectExtension.add(iter.clone()); } return copy; } }