FileDocCategorySizeDatePackage
PolygonAttributes_Info.javaAPI DocExample1654Fri Dec 10 13:00:40 GMT 1999com.tornadolabs.j3dtree

PolygonAttributes_Info.java

/*
//*****************************************************************************
/*
*	@(#) PolygonAttributes_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.*;

public class PolygonAttributes_Info extends ObjectInfo
{

	private static final int[] 		m_kCapabilityArray = 
												{
													PolygonAttributes.ALLOW_CULL_FACE_READ,
													PolygonAttributes.ALLOW_MODE_READ,
													PolygonAttributes.ALLOW_NORMAL_FLIP_READ,
													PolygonAttributes.ALLOW_OFFSET_READ
												};

	public PolygonAttributes_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 += "Polygon Attributes\r\n";
		
		PolygonAttributes polygonAttribs = (PolygonAttributes) obj;
				
		szText += "Back Face Normal Flip: " + polygonAttribs.getBackFaceNormalFlip() + "\r\n";
		szText += "Cull Face: " + polygonAttribs.getCullFace() + "\r\n";
		szText += "Mode: " + polygonAttribs.getPolygonMode() + "\r\n";
		szText += "Offset: " + polygonAttribs.getPolygonOffset() + "\r\n";

		return szText;
	}
}