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

src.gov.nasa.worldwind.ogc.collada.ColladaInstanceMaterial 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 java.util.*;

/**
 * Represents the COLLADA instance_material element and provides access to its contents.
 *
 * @author pabercrombie
 * @version $Id: ColladaInstanceMaterial.java 654 2012-06-25 04:15:52Z pabercrombie $
 */
public class ColladaInstanceMaterial extends ColladaAbstractInstance
{
    protected List bindVertexInputs = new ArrayList();

    public ColladaInstanceMaterial(String ns)
    {
        super(ns);
    }

    public String getTarget()
    {
        return (String) this.getField("target");
    }

    public String getSymbol()
    {
        return (String) this.getField("symbol");
    }

    /** Instance_material uses a "target" attribute instead of the "url" attribute used by other instance elements. */
    @Override
    public String getUrl()
    {
        return this.getTarget();
    }

    /**
     * Indicates the bind_vertex_input element.
     *
     * @return The bind_vertex_input elements, if present. Otherwise null.
     */
    public List getBindVertexInputs()
    {
        return this.bindVertexInputs;
    }

    /** {@inheritDoc} */
    @Override
    public void setField(String keyName, Object value)
    {
        if ("bind_vertex_input".equals(keyName))
        {
            this.bindVertexInputs.add((ColladaBindVertexInput) value);
        }
        else
        {
            super.setField(keyName, value);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy