Core.Object | +--Editor.BrushBuilder | +--Editor.SheetBuilder
enum
ESheetAxis
name
GroupName
Height,
Width
00001 //============================================================================= 00002 // SheetBuilder: Builds a simple sheet. 00003 //============================================================================= 00004 class SheetBuilder 00005 extends BrushBuilder; 00006 00007 var() float Height, Width; 00008 var() enum ESheetAxis 00009 { 00010 AX_Horizontal, 00011 AX_XAxis, 00012 AX_YAxis, 00013 } Axis; 00014 var() name GroupName; 00015 00016 event bool Build() 00017 { 00018 if( Height<=0 || Width<=0 ) 00019 return BadParameters(); 00020 00021 BeginBrush( false, GroupName ); 00022 if( Axis==AX_Horizontal ) 00023 { 00024 Vertex3f( Width/2, Height/2, 0 ); 00025 Vertex3f( Width/2, -Height/2, 0 ); 00026 Vertex3f( -Width/2, -Height/2, 0 ); 00027 Vertex3f( -Width/2, Height/2, 0 ); 00028 } 00029 else if( Axis==AX_XAxis ) 00030 { 00031 Vertex3f( 0, Width/2, Height/2 ); 00032 Vertex3f( 0, Width/2, -Height/2 ); 00033 Vertex3f( 0, -Width/2, -Height/2 ); 00034 Vertex3f( 0, -Width/2, Height/2 ); 00035 } 00036 else 00037 { 00038 Vertex3f( Width/2, 0, Height/2 ); 00039 Vertex3f( -Width/2, 0, Height/2 ); 00040 Vertex3f( -Width/2, 0, -Height/2 ); 00041 Vertex3f( Width/2, 0, -Height/2 ); 00042 } 00043 Poly4i(+1,0,1,2,3,'Sheet',0x00000108); // PF_TwoSided|PF_NotSolid. 00044 return EndBrush(); 00045 } 00046 00047 defaultproperties 00048 { 00049 Height=256.000000 00050 Width=256.000000 00051 GroupName=Sheet 00052 BitmapFilename="BBSheet" 00053 ToolTip="Sheet" 00054 }