Example usage for javax.media.j3d TexCoordGeneration TexCoordGeneration

List of usage examples for javax.media.j3d TexCoordGeneration TexCoordGeneration

Introduction

In this page you can find the example usage for javax.media.j3d TexCoordGeneration TexCoordGeneration.

Prototype

public TexCoordGeneration() 

Source Link

Document

Constructs a TexCoordGeneration object with default parameters.

Usage

From source file:TexCoordTest.java

public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("EYE_LINEAR") != false)
        m_TexGen.setGenMode(TexCoordGeneration.EYE_LINEAR);

    else if (event.getActionCommand().equals("OBJECT_LINEAR") != false)
        m_TexGen.setGenMode(TexCoordGeneration.OBJECT_LINEAR);

    else if (event.getActionCommand().equals("SPHERE_MAP") != false)
        m_TexGen.setGenMode(TexCoordGeneration.SPHERE_MAP);

    else if (event.getActionCommand().equals("Rotate") != false)
        m_RotationInterpolator.setEnable(!m_RotationInterpolator.getEnable());

    else if (event.getActionCommand().equals("Translate") != false)
        m_PositionInterpolator.setEnable(!m_PositionInterpolator.getEnable());

    // apply any changes to the TexCoordGeneration and copy into the
    // appearance
    TexCoordGeneration texCoordGeneration = new TexCoordGeneration();
    texCoordGeneration = (TexCoordGeneration) m_TexGen.cloneNodeComponent(true);
    m_Appearance.setTexCoordGeneration(texCoordGeneration);
}

From source file:AppearanceTest.java

protected void assignToAppearance() {
    m_TexCoordGeneration = new TexCoordGeneration();
    m_TexCoordGeneration.duplicateNodeComponent(m_NodeComponent);
    m_Appearance.setTexCoordGeneration(m_TexCoordGeneration);
}