Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Editor.BrushBuilder


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
//=============================================================================
// 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.
//=============================================================================
class BrushBuilder
    extends Object
    abstract
    native;

var(BrushBuilder) string BitmapFilename;
var(BrushBuilder) string ToolTip;

// Internal state, not accessible to script.
struct BuilderPoly
{
    var array<int> VertexIndices;
    var int Direction;
    var name Item;
    var int PolyFlags;
};
var private array<vector> Vertices;
var private array<BuilderPoly> Polys;
var private name Group;
var private bool MergeCoplanars;

// Native support.
native function BeginBrush( bool MergeCoplanars, name Group );
native function bool EndBrush();
native function int GetVertexCount();
native function vector GetVertex( int i );
native function int GetPolyCount();
native function bool BadParameters( optional string msg );
native function int Vertexv( vector v );
native function int Vertex3f( float x, float y, float z );
native function Poly3i( int Direction, int i, int j, int k, optional name ItemName, optional int PolyFlags );
native function Poly4i( int Direction, int i, int j, int k, int l, optional name ItemName, optional int PolyFlags );
native function PolyBegin( int Direction, optional name ItemName, optional int PolyFlags );
native function Polyi( int i );
native function PolyEnd();

// Build interface.
event bool Build();

defaultproperties
{
     BitmapFilename="BBGeneric"
     ToolTip="Generic Builder"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:34.000 - Creation time: Mo 16.4.2007 11:20:45.156 - Created with UnCodeX