## Editor
Class BrushBuilder

source: C:\XIII\Editor\Classes\BrushBuilder.uc

    Core.Object
       |
       +--Editor.BrushBuilder

Direct Known Subclasses:ConeBuilder, CubeBuilder, CurvedStairBuilder, CylinderBuilder, LinearStairBuilder, SheetBuilder, SpiralStairBuilder, TerrainBuilder, TetrahedronBuilder, VolumetricBuilder

class BrushBuilder
extends Core.Object

    //=============================================================================
    // BrushBuilder: Base class of UnrealEd brush builders.
    //
    // Tips for writing brush builders:
    //
    // * Always validate the user-specified and call BadParameters function
    //   if anything is wrong, instead of actually building geometry.
    //   If you build an invalid brush due to bad user parameters, you'll
    //   cause an extraordinary amount of pain for the poor user.
    //
    // * When generating polygons with more than 3 vertices, BE SURE all the
    //   polygon's vertices are coplanar!  Out-of-plane polygons will cause
    //   geometry to be corrupted.
    //=============================================================================

Variables
`name` | `Group`
`bool` | `MergeCoplanars`
`array` | `Polys`
`array` | `Vertices`

Function Summary
`bool` | `BadParameters(optional string)`
`void` | `BeginBrush(bool MergeCoplanars, name Group)`
    // Native support.
`bool` | `EndBrush()`
`int` | `GetPolyCount()`
`vector` | `GetVertex(int i)`
`int` | `GetVertexCount()`
`void` | `Poly3i(int Direction, int i, int j, int k, optional name, optional int)`
`void` | `Poly4i(int Direction, int i, int j, int k, int l, optional name, optional int)`
`void` | `PolyBegin(int Direction, optional name, optional int)`
`void` | `PolyEnd()`
`void` | `Polyi(int i)`
`int` | `Vertex3f(float x, float y, float z)`
`int` | `Vertexv(vector v)`

Source Code

    00001	//=============================================================================
    00002	// BrushBuilder: Base class of UnrealEd brush builders.
    00003	//
    00004	// Tips for writing brush builders:
    00005	//
    00006	// * Always validate the user-specified and call BadParameters function
    00007	//   if anything is wrong, instead of actually building geometry.
    00008	//   If you build an invalid brush due to bad user parameters, you'll
    00009	//   cause an extraordinary amount of pain for the poor user.
    00010	//
    00011	// * When generating polygons with more than 3 vertices, BE SURE all the
    00012	//   polygon's vertices are coplanar!  Out-of-plane polygons will cause
    00013	//   geometry to be corrupted.
    00014	//=============================================================================
    00015	class BrushBuilder
    00016		extends Object
    00017		abstract
    00018		native;
    00019
    00020	var(BrushBuilder) string BitmapFilename;
    00021	var(BrushBuilder) string ToolTip;
    00022
    00023	// Internal state, not accessible to script.
    00024	struct BuilderPoly
    00025	{
    00026		var array<int> VertexIndices;
    00027		var int Direction;
    00028		var name Item;
    00029		var int PolyFlags;
    00030	};
    00031	var private array<vector> Vertices;
    00032	var private array<BuilderPoly> Polys;
    00033	var private name Group;
    00034	var private bool MergeCoplanars;
    00035
    00036	// Native support.
    00037	native function BeginBrush( bool MergeCoplanars, name Group );
    00038	native function bool EndBrush();
    00039	native function int GetVertexCount();
    00040	native function vector GetVertex( int i );
    00041	native function int GetPolyCount();
    00042	native function bool BadParameters( optional string msg );
    00043	native function int Vertexv( vector v );
    00044	native function int Vertex3f( float x, float y, float z );
    00045	native function Poly3i( int Direction, int i, int j, int k, optional name ItemName, optional int PolyFlags );
    00046	native function Poly4i( int Direction, int i, int j, int k, int l, optional name ItemName, optional int PolyFlags );
    00047	native function PolyBegin( int Direction, optional name ItemName, optional int PolyFlags );
    00048	native function Polyi( int i );
    00049	native function PolyEnd();
    00050
    00051	// Build interface.
    00052	event bool Build();
    00053
    00054	defaultproperties
    00055	{
    00056	     BitmapFilename="BBGeneric"
    00057	     ToolTip="Generic Builder"
    00058	}

End Source Code