public FighterGeometry() { var nose = new Nose(0.5f, 0.6f, 26, 0.4f); var cockpitFuselage = new CockpitFuselage(nose, 1.2f, 1.2f, 3f); var mainFuselage = new MainFuselage(cockpitFuselage); var intake = new EngineIntake(cockpitFuselage); var underside = new Underside(intake); var canopy = new Canopy(0.65f, 0.5f, 3f, 16); var wing = new Wing(4.5f, 4.5f); var rear = new Rear(mainFuselage, underside); var tailFin = new TailFin(); var stabilizer = new Stabilizer(); var exhaust = new Exhaust(rear, 0.6f); var bottomFin = new BottomFin(); var path = exhaust.FlangeEndXSection; var graySlide = new Vec3(1f).Interpolate(new Vec3(0f), path.Vertices.Length); path.Vertices.Color(graySlide); Paths = EnumerableExt.Enumerate(path); Fighter = Composite.Create(Stacking.StackBackward(cockpitFuselage.Fuselage, mainFuselage.Fuselage) .Concat(EnumerableExt.Enumerate(intake.Intake, intake.Belly, underside.Geometry, canopy.Geometry, wing.Geometry, wing.Geometry.ReflectX(), rear.Geometry, exhaust.Geometry, exhaust.StabilizerFlange, exhaust.StabilizerFlange.ReflectX(), tailFin.Geometry, stabilizer.Geometry, stabilizer.Geometry.ReflectX(), bottomFin.Geometry, bottomFin.Geometry.ReflectX()))) .Smoothen(0.85f) .Center(); }
public static Geometry <EntityVertex> Hammer() { var cube1 = Extrusion.Cube <EntityVertex> (1f, 1.5f, 2f).RotateY(MathHelper.PiOver2); var cube2 = Extrusion.Cube <EntityVertex> (1f, 1f, 1f).Scale(0.8f, 0.8f, 0.8f); var cube3 = Extrusion.Cube <EntityVertex> (1f, 1f, 2f); return(Composite.Create(Stacking.StackRight(cube1, cube2, cube3) .Align(Alignment.None, Alignment.Center, Alignment.Center)).Center()); }
public object ConvertBack(object value, Type targetType, object parameter, string language) { Stacking s = (Stacking)value; if (s == Stacking.Stacked) { return(true); } return(false); }
private static Geometry <EntityVertex> Roof(out Vec3 tag) { var trapezoid = Quadrilateral <EntityVertex> .Trapezoid(20f, 1f, 0f, 1f); tag = trapezoid.Vertices.Furthest(Dir3D.Down).Furthest(Dir3D.Right).Single().position; var leftPane = trapezoid.Extrude(30f).RotateZ(MathHelper.PiOver4); var rightPane = leftPane.ReflectX(); return(Composite.Create(Stacking.StackRight(leftPane, rightPane))); }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { Stacking s = (Stacking)value; if (s == Stacking.Stacked) { return(true); } return(false); }
private static Geometry <EntityVertex> WallsAndGables(Geometry <EntityVertex> roof, Geometry <EntityVertex> gables, Vec3 roofSnapTag, Vec3 gableTopTag) { var walls = Quadrilateral <EntityVertex> .Rectangle(gables.BoundingBox.Size.X, gables.BoundingBox.Size.Z) .Extrude(12f, false).RotateX(MathHelper.PiOver2); var wallsAndGables = Composite.Create(Stacking.StackUp(walls, gables) .Align(Alignment.Center, Alignment.None, Alignment.Center)); return(wallsAndGables.SnapTo(gableTopTag, roofSnapTag, Axes.All)); }
public override int GetHashCode() { var hashCode = -2145328967; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PowerFullName); hashCode = hashCode * -1521134295 + UniqueId.GetHashCode(); hashCode = hashCode * -1521134295 + EffectClass.GetHashCode(); hashCode = hashCode * -1521134295 + EffectType.GetHashCode(); hashCode = hashCode * -1521134295 + DamageType.GetHashCode(); hashCode = hashCode * -1521134295 + MezmorizeType.GetHashCode(); hashCode = hashCode * -1521134295 + EffectModifiers.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Summon); hashCode = hashCode * -1521134295 + DelayedTime.GetHashCode(); hashCode = hashCode * -1521134295 + Ticks.GetHashCode(); hashCode = hashCode * -1521134295 + Stacking.GetHashCode(); hashCode = hashCode * -1521134295 + BaseProbability.GetHashCode(); hashCode = hashCode * -1521134295 + Suppression.GetHashCode(); hashCode = hashCode * -1521134295 + Buffable.GetHashCode(); hashCode = hashCode * -1521134295 + Resistible.GetHashCode(); hashCode = hashCode * -1521134295 + SpecialCase.GetHashCode(); hashCode = hashCode * -1521134295 + VariableModifiedOverride.GetHashCode(); hashCode = hashCode * -1521134295 + PlayerVersusMode.GetHashCode(); hashCode = hashCode * -1521134295 + ToWho.GetHashCode(); hashCode = hashCode * -1521134295 + DisplayPercentageOverride.GetHashCode(); hashCode = hashCode * -1521134295 + Scale.GetHashCode(); hashCode = hashCode * -1521134295 + Magnitude.GetHashCode(); hashCode = hashCode * -1521134295 + Duration.GetHashCode(); hashCode = hashCode * -1521134295 + AttribType.GetHashCode(); hashCode = hashCode * -1521134295 + Aspect.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ModifierTable); hashCode = hashCode * -1521134295 + NearGround.GetHashCode(); hashCode = hashCode * -1521134295 + CancelOnMiss.GetHashCode(); hashCode = hashCode * -1521134295 + RequiresToHitCheck.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(UidClassName); hashCode = hashCode * -1521134295 + IdClassName.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MagnitudeExpression); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Reward); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(EffectId); hashCode = hashCode * -1521134295 + IgnoreEnhancementDiversification.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Override); hashCode = hashCode * -1521134295 + ProcsPerMinute.GetHashCode(); return(hashCode); }
public Wing(float width, float length) { var botHalf = Quadrilateral <V> .Trapezoid(length, width, length * 0.75f, 0f) .ExtrudeToScale( depth: 0.1f, targetScale: 0.5f, steepness: 3f, numSteps: 5, includeFrontFace: false, scaleAround: new Vec3(length / 4f, -width / 2f, 0f)) .FilterVertices(v => !v.Facing(Dir3D.Down)); Geometry = Composite.Create( Stacking.StackForward(botHalf, botHalf.ReflectZ())) .RotateX(-MathHelper.PiOver2) .RotateY(MathHelper.PiOver2) .Translate(-2.7f, -0.25f, -7f) .Color(_color); }
public CockpitFuselage(Nose nose, float length, float baseScale, float bend) { Fuselage = Extrusion.Extrude <V, P> (false, false, nose.XSection, nose.XSection.Transform(Mat.Translation <Mat4> (0f, 0, -length) * Mat.Scaling <Mat4> (1f, baseScale, baseScale))); Fuselage = Composite.Create(Stacking.StackBackward(nose.Cone, Fuselage)); XSection = Path <P, Vec3> .FromVecs( from v in Fuselage.Vertices.Furthest (Dir3D.Back) where v.position.Y >= -0.2f select v.position).Close(); var pivotPoint = XSection.Vertices.Furthest(Dir3D.Up).First().position; Fuselage = Fuselage.ManipulateVertices( Manipulators.Transform <V> (Mat.RotationX <Mat4> (bend.Radians()).RelativeTo(pivotPoint)) .Where(v => v.position.Z > pivotPoint.Z), true) .Color(_color); XSectionStart = XSection.Vertices.Furthest(Dir3D.Down + Dir3D.Left).Single(); XSection = XSection.RenumberNodes(XSection.Vertices.IndexOf(XSectionStart)).Open(); }
public Stabilizer() { var half = Polygon <V> .FromVec2s( new Vec2 (-2f, 0.5f), new Vec2 (0f, 2f), new Vec2 (0f, -0.5f), new Vec2 (-1.75f, -0.5f), new Vec2 (-2f, -0.25f)) .ExtrudeToScale( depth: 0.07f, targetScale: 0.5f, steepness: 3f, numSteps: 5, includeFrontFace: false); Geometry = Composite.Create( Stacking.StackForward(half, half.ReflectZ())) .RotateX(MathHelper.PiOver2) .RotateZ(5f.Radians()) .Translate(-1.1f, -0.1f, -12.8f) .Color(_color); }
public TailFin() { var half = Polygon <V> .FromVec2s( new Vec2 (-4f, 0f), new Vec2 (-1.75f, 0.5f), new Vec2 (0f, 3f), new Vec2 (1.25f, 3f), new Vec2 (0.5f, 0.5f), new Vec2 (0.5f, 0f)) .ExtrudeToScale( depth: 0.1f, targetScale: 0.5f, steepness: 3f, numSteps: 5, includeFrontFace: false); Geometry = Composite.Create( Stacking.StackForward(half, half.ReflectZ())) .RotateY(MathHelper.PiOver2) .Translate(0f, 0.9f, -12.5f) .Color(_color); }
public BottomFin() { var half = Polygon <V> .FromVec2s( new Vec2 (-0.8f, 0f), new Vec2 (0.8f, 0f), new Vec2 (0.6f, -0.5f), new Vec2 (-0f, -0.6f)) .ExtrudeToScale( depth: 0.05f, targetScale: 0.7f, steepness: 3f, numSteps: 2, includeFrontFace: false) .FilterVertices(v => !v.Facing(Dir3D.Up)); Geometry = Composite.Create( Stacking.StackForward(half, half.ReflectZ())) .RotateY(MathHelper.PiOver2) .RotateZ(15f.Radians()) .RotateX(6f.Radians()) .Translate(0.5f, -0.6f, -10.25f) .Color(_color); }
public static void AddEffect(ItemIndex itemIndex, ProcEffect procEffect, float value, float stackAmount, Stacking stacking = Stacking.Linear) { BetterUI.ProcItemsCatalog.AddEffect(itemIndex, (BetterUI.ProcItemsCatalog.ProcEffect)procEffect, value, stackAmount, (BetterUI.ProcItemsCatalog.Stacking)stacking); }