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

src.gov.nasa.worldwind.ogc.collada.ColladaUnit Maven / Gradle / Ivy

Go to download

World Wind is a collection of components that interactively display 3D geographic information within Java applications or applets.

There is a newer version: 2.0.0-986
Show newest version
/*
 * Copyright (C) 2012 United States Government as represented by the Administrator of the
 * National Aeronautics and Space Administration.
 * All Rights Reserved.
 */

package gov.nasa.worldwind.ogc.collada;

import gov.nasa.worldwind.util.WWUtil;

/**
 * Represents the COLLADA Unit element and provides access to its contents.
 *
 * @author pabercrombie
 * @version $Id: ColladaUnit.java 654 2012-06-25 04:15:52Z pabercrombie $
 */
public class ColladaUnit extends ColladaAbstractObject
{
    /**
     * Construct an instance.
     *
     * @param ns the qualifying namespace URI. May be null to indicate no namespace qualification.
     */
    public ColladaUnit(String ns)
    {
        super(ns);
    }

    /**
     * Indicates the value of the "meter" attribute of the unit. This attribute is a scaling factor that converts length
     * units in the COLLADA document to meters (1.0 for meters, 1000 for kilometers, etc.) See COLLADA spec pg. 5-18.
     *
     * @return The scaling factor, or null if none is defined.
     */
    public Double getMeter()
    {
        String s = (String) this.getField("meter");
        return WWUtil.makeDouble(s);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy