In UnrealED 1 (Oh god.) There was a SphereBuilder tool (Similar to the Cube builder and such) but in UnrealED 2 it was replaced with the Tetrahedron builder. Thanks to the lack of BrushBuilder classes in any version other than 227, it's difficult for me to recreate this for 227.
I have the base of the class set up. Variables were copied from UnrealED 1. The comments are the gaps I need to fill![Frown :( :(](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
So can someone help me finish this?
I have the base of the class set up. Variables were copied from UnrealED 1. The comments are the gaps I need to fill
Code:
//=============================================================================
// SphereBuilder.
// A Sphere Builder from UnrealED 1
//=============================================================================
class SphereBuilder expands BrushBuilder;
Var() Float OuterRadius, InnerRadius;
Var() Int RadialSides, VerticalStripes;
Var() Name GroupName;
Var() Bool Hollow;
Function BuildSphere( /*Some stuff needs to go here*/ )
{
// Maths junk here?
}
Function bool Build()
{
// Validity checks on the Sphere.
if ( OuterRadius <=0 )
return BadParameters("OuterRadius must be larger than 0.");
if ( InnerRadius <=0 )
Return BadParameters("InnerRadius must be larger than 0.");
if ( RadialSides < 3 )
Return BadParameters ("Sphere must have at least 3 Radial Sides.");
if ( VerticalStripes < 2 )
Return BadParameters ("Sphere must have at least 2 Vertical Stripes.");
if ( Hollow && InnerRadius >= OuterRadius )
Return BadParameters ("The OuterRadius must be greater than InnerRadius.");
// BeginBrush( false, GroupName );
// BuildSphere( /*Probably need more stuff here*/ );
// if ( Hollow )
// Stuff to build a hollow sphere here
// Else
// Some more stuff.
return EndBrush();
}
So can someone help me finish this?