/*
//*****************************************************************************
/*
* @(#) TextureAttributes_Info.java
*
* Project: Java3dTree
* Client: Java 3D Community
*
* Project Information:
* dselman@tornadolabs.com
* http://www.tornadolabs.com
*
* @author Daniel Selman: dselman@tornadolabs.com
*/
//*****************************************************************************
package com.tornadolabs.j3dtree;
import javax.media.j3d.*;
import javax.vecmath.Color4f;
public class TextureAttributes_Info extends ObjectInfo
{
private static final int[] m_kCapabilityArray =
{
TextureAttributes.ALLOW_BLEND_COLOR_READ,
TextureAttributes.ALLOW_MODE_READ,
TextureAttributes.ALLOW_TRANSFORM_READ
};
public TextureAttributes_Info()
{
}
java.util.Enumeration getChildren( Object obj )
{
return super.getChildren( obj );
}
public int[] getCapabilityBits()
{
return createCompoundArray( m_kCapabilityArray, super.getCapabilityBits() );
}
public String getInfo( Object obj )
{
String szText = super.getInfo( obj );
szText = insertSectionBreak( szText );
szText += "Texture Attributes\r\n";
TextureAttributes textureAttribs = (TextureAttributes) obj;
szText += "Perspective Correction Mode: " + textureAttribs.getPerspectiveCorrectionMode() + "\r\n";
Color4f color = new Color4f();
textureAttribs.getTextureBlendColor( color );
szText += "Blend Color: " + color + "\r\n";
szText += "Mode: " + textureAttribs.getTextureMode() + "\r\n";
Transform3D t3d = new Transform3D();
textureAttribs.getTextureTransform( t3d );
szText += "Transform -> \r\n";
szText += t3d + "\r\n";
return szText;
}
} |