Added Near/Far clip plane adjustments on WorldForm, made ModelForm and VehicleForm auto adjust clip planes to object being viewed

This commit is contained in:
dexy 2019-11-01 22:51:39 +11:00
parent ec6eefe0e1
commit fe4ff6300e
5 changed files with 184 additions and 54 deletions

View File

@ -381,12 +381,15 @@ namespace CodeWalker.Forms
{ {
//move the camera to a default place where the given sphere is fully visible. //move the camera to a default place where the given sphere is fully visible.
rad = Math.Max(0.5f, rad); rad = Math.Max(0.01f, rad);
camera.FollowEntity.Position = pos; camera.FollowEntity.Position = pos;
camera.TargetDistance = rad * 1.6f; camera.TargetDistance = rad * 1.6f;
camera.CurrentDistance = rad * 1.6f; camera.CurrentDistance = rad * 1.6f;
camera.ZFar = Math.Min(rad * 200.0f, 12000.0f);
camera.ZNear = Math.Min(camera.ZFar * 5e-5f, 0.5f);
camera.UpdateProj = true;
} }
@ -590,6 +593,16 @@ namespace CodeWalker.Forms
Ydd = ydd; Ydd = ydd;
rpfFileEntry = Ydd.RpfFileEntry; rpfFileEntry = Ydd.RpfFileEntry;
if (Ydd.Drawables != null)
{
float maxrad = 0.01f;
foreach (var d in Ydd.Drawables)
{
maxrad = Math.Max(maxrad, d.BoundingSphereRadius);
}
MoveCameraToView(Vector3.Zero, maxrad);
}
UpdateModelsUI(ydd.Dict); UpdateModelsUI(ydd.Dict);
DetailsPropertyGrid.SelectedObject = ydd; DetailsPropertyGrid.SelectedObject = ydd;
@ -633,6 +646,16 @@ namespace CodeWalker.Forms
Ypt = ypt; Ypt = ypt;
rpfFileEntry = Ypt.RpfFileEntry; rpfFileEntry = Ypt.RpfFileEntry;
if (ypt.DrawableDict != null)
{
float maxrad = 0.01f;
foreach (var d in ypt.DrawableDict.Values)
{
maxrad = Math.Max(maxrad, d.BoundingSphereRadius);
}
MoveCameraToView(Vector3.Zero, maxrad);
}
UpdateModelsUI(ypt.DrawableDict); UpdateModelsUI(ypt.DrawableDict);
DetailsPropertyGrid.SelectedObject = ypt;//.PtfxList; DetailsPropertyGrid.SelectedObject = ypt;//.PtfxList;

View File

@ -436,12 +436,16 @@ namespace CodeWalker.Vehicles
{ {
//move the camera to a default place where the given sphere is fully visible. //move the camera to a default place where the given sphere is fully visible.
rad = Math.Max(0.5f, rad); rad = Math.Max(0.01f, rad);
camera.FollowEntity.Position = pos; camera.FollowEntity.Position = pos;
camera.TargetDistance = rad * 1.6f; camera.TargetDistance = rad * 1.6f;
camera.CurrentDistance = rad * 1.6f; camera.CurrentDistance = rad * 1.6f;
camera.ZFar = Math.Min(rad * 200.0f, 12000.0f);
camera.ZNear = Math.Min(camera.ZFar * 5e-5f, 0.5f);
camera.UpdateProj = true;
} }

147
WorldForm.Designer.cs generated
View File

@ -136,6 +136,7 @@ namespace CodeWalker
this.TimedEntitiesCheckBox = new System.Windows.Forms.CheckBox(); this.TimedEntitiesCheckBox = new System.Windows.Forms.CheckBox();
this.FieldOfViewTrackBar = new System.Windows.Forms.TrackBar(); this.FieldOfViewTrackBar = new System.Windows.Forms.TrackBar();
this.tabPage14 = new System.Windows.Forms.TabPage(); this.tabPage14 = new System.Windows.Forms.TabPage();
this.HDTexturesCheckBox = new System.Windows.Forms.CheckBox();
this.WireframeCheckBox = new System.Windows.Forms.CheckBox(); this.WireframeCheckBox = new System.Windows.Forms.CheckBox();
this.RenderModeComboBox = new System.Windows.Forms.ComboBox(); this.RenderModeComboBox = new System.Windows.Forms.ComboBox();
this.label11 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label();
@ -287,7 +288,10 @@ namespace CodeWalker
this.ToolbarCameraMapViewButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarCameraMapViewButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarCameraOrthographicButton = new System.Windows.Forms.ToolStripMenuItem(); this.ToolbarCameraOrthographicButton = new System.Windows.Forms.ToolStripMenuItem();
this.ToolbarPanel = new System.Windows.Forms.Panel(); this.ToolbarPanel = new System.Windows.Forms.Panel();
this.HDTexturesCheckBox = new System.Windows.Forms.CheckBox(); this.NearClipUpDown = new System.Windows.Forms.NumericUpDown();
this.label31 = new System.Windows.Forms.Label();
this.FarClipUpDown = new System.Windows.Forms.NumericUpDown();
this.label32 = new System.Windows.Forms.Label();
this.StatusStrip.SuspendLayout(); this.StatusStrip.SuspendLayout();
this.ToolsPanel.SuspendLayout(); this.ToolsPanel.SuspendLayout();
this.ToolsTabControl.SuspendLayout(); this.ToolsTabControl.SuspendLayout();
@ -329,6 +333,8 @@ namespace CodeWalker
this.ToolsMenu.SuspendLayout(); this.ToolsMenu.SuspendLayout();
this.Toolbar.SuspendLayout(); this.Toolbar.SuspendLayout();
this.ToolbarPanel.SuspendLayout(); this.ToolbarPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NearClipUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.FarClipUpDown)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// StatusStrip // StatusStrip
@ -1645,6 +1651,10 @@ namespace CodeWalker
// //
// tabPage14 // tabPage14
// //
this.tabPage14.Controls.Add(this.FarClipUpDown);
this.tabPage14.Controls.Add(this.label32);
this.tabPage14.Controls.Add(this.NearClipUpDown);
this.tabPage14.Controls.Add(this.label31);
this.tabPage14.Controls.Add(this.HDTexturesCheckBox); this.tabPage14.Controls.Add(this.HDTexturesCheckBox);
this.tabPage14.Controls.Add(this.WireframeCheckBox); this.tabPage14.Controls.Add(this.WireframeCheckBox);
this.tabPage14.Controls.Add(this.RenderModeComboBox); this.tabPage14.Controls.Add(this.RenderModeComboBox);
@ -1663,6 +1673,19 @@ namespace CodeWalker
this.tabPage14.Text = "Render"; this.tabPage14.Text = "Render";
this.tabPage14.UseVisualStyleBackColor = true; this.tabPage14.UseVisualStyleBackColor = true;
// //
// HDTexturesCheckBox
//
this.HDTexturesCheckBox.AutoSize = true;
this.HDTexturesCheckBox.Checked = true;
this.HDTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.HDTexturesCheckBox.Location = new System.Drawing.Point(10, 231);
this.HDTexturesCheckBox.Name = "HDTexturesCheckBox";
this.HDTexturesCheckBox.Size = new System.Drawing.Size(82, 17);
this.HDTexturesCheckBox.TabIndex = 57;
this.HDTexturesCheckBox.Text = "HD textures";
this.HDTexturesCheckBox.UseVisualStyleBackColor = true;
this.HDTexturesCheckBox.CheckedChanged += new System.EventHandler(this.HDTexturesCheckBox_CheckedChanged);
//
// WireframeCheckBox // WireframeCheckBox
// //
this.WireframeCheckBox.AutoSize = true; this.WireframeCheckBox.AutoSize = true;
@ -2883,112 +2906,112 @@ namespace CodeWalker
this.ToolbarSelectEntityButton.Checked = true; this.ToolbarSelectEntityButton.Checked = true;
this.ToolbarSelectEntityButton.CheckState = System.Windows.Forms.CheckState.Checked; this.ToolbarSelectEntityButton.CheckState = System.Windows.Forms.CheckState.Checked;
this.ToolbarSelectEntityButton.Name = "ToolbarSelectEntityButton"; this.ToolbarSelectEntityButton.Name = "ToolbarSelectEntityButton";
this.ToolbarSelectEntityButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectEntityButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectEntityButton.Text = "Entity"; this.ToolbarSelectEntityButton.Text = "Entity";
this.ToolbarSelectEntityButton.Click += new System.EventHandler(this.ToolbarSelectEntityButton_Click); this.ToolbarSelectEntityButton.Click += new System.EventHandler(this.ToolbarSelectEntityButton_Click);
// //
// ToolbarSelectEntityExtensionButton // ToolbarSelectEntityExtensionButton
// //
this.ToolbarSelectEntityExtensionButton.Name = "ToolbarSelectEntityExtensionButton"; this.ToolbarSelectEntityExtensionButton.Name = "ToolbarSelectEntityExtensionButton";
this.ToolbarSelectEntityExtensionButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectEntityExtensionButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectEntityExtensionButton.Text = "Entity Extension"; this.ToolbarSelectEntityExtensionButton.Text = "Entity Extension";
this.ToolbarSelectEntityExtensionButton.Click += new System.EventHandler(this.ToolbarSelectEntityExtensionButton_Click); this.ToolbarSelectEntityExtensionButton.Click += new System.EventHandler(this.ToolbarSelectEntityExtensionButton_Click);
// //
// ToolbarSelectArchetypeExtensionButton // ToolbarSelectArchetypeExtensionButton
// //
this.ToolbarSelectArchetypeExtensionButton.Name = "ToolbarSelectArchetypeExtensionButton"; this.ToolbarSelectArchetypeExtensionButton.Name = "ToolbarSelectArchetypeExtensionButton";
this.ToolbarSelectArchetypeExtensionButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectArchetypeExtensionButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectArchetypeExtensionButton.Text = "Archetype Extension"; this.ToolbarSelectArchetypeExtensionButton.Text = "Archetype Extension";
this.ToolbarSelectArchetypeExtensionButton.Click += new System.EventHandler(this.ToolbarSelectArchetypeExtensionButton_Click); this.ToolbarSelectArchetypeExtensionButton.Click += new System.EventHandler(this.ToolbarSelectArchetypeExtensionButton_Click);
// //
// ToolbarSelectTimeCycleModifierButton // ToolbarSelectTimeCycleModifierButton
// //
this.ToolbarSelectTimeCycleModifierButton.Name = "ToolbarSelectTimeCycleModifierButton"; this.ToolbarSelectTimeCycleModifierButton.Name = "ToolbarSelectTimeCycleModifierButton";
this.ToolbarSelectTimeCycleModifierButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectTimeCycleModifierButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectTimeCycleModifierButton.Text = "Time Cycle Modifier"; this.ToolbarSelectTimeCycleModifierButton.Text = "Time Cycle Modifier";
this.ToolbarSelectTimeCycleModifierButton.Click += new System.EventHandler(this.ToolbarSelectTimeCycleModifierButton_Click); this.ToolbarSelectTimeCycleModifierButton.Click += new System.EventHandler(this.ToolbarSelectTimeCycleModifierButton_Click);
// //
// ToolbarSelectCarGeneratorButton // ToolbarSelectCarGeneratorButton
// //
this.ToolbarSelectCarGeneratorButton.Name = "ToolbarSelectCarGeneratorButton"; this.ToolbarSelectCarGeneratorButton.Name = "ToolbarSelectCarGeneratorButton";
this.ToolbarSelectCarGeneratorButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectCarGeneratorButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectCarGeneratorButton.Text = "Car Generator"; this.ToolbarSelectCarGeneratorButton.Text = "Car Generator";
this.ToolbarSelectCarGeneratorButton.Click += new System.EventHandler(this.ToolbarSelectCarGeneratorButton_Click); this.ToolbarSelectCarGeneratorButton.Click += new System.EventHandler(this.ToolbarSelectCarGeneratorButton_Click);
// //
// ToolbarSelectGrassButton // ToolbarSelectGrassButton
// //
this.ToolbarSelectGrassButton.Name = "ToolbarSelectGrassButton"; this.ToolbarSelectGrassButton.Name = "ToolbarSelectGrassButton";
this.ToolbarSelectGrassButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectGrassButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectGrassButton.Text = "Grass"; this.ToolbarSelectGrassButton.Text = "Grass";
this.ToolbarSelectGrassButton.Click += new System.EventHandler(this.ToolbarSelectGrassButton_Click); this.ToolbarSelectGrassButton.Click += new System.EventHandler(this.ToolbarSelectGrassButton_Click);
// //
// ToolbarSelectWaterQuadButton // ToolbarSelectWaterQuadButton
// //
this.ToolbarSelectWaterQuadButton.Name = "ToolbarSelectWaterQuadButton"; this.ToolbarSelectWaterQuadButton.Name = "ToolbarSelectWaterQuadButton";
this.ToolbarSelectWaterQuadButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectWaterQuadButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectWaterQuadButton.Text = "Water Quad"; this.ToolbarSelectWaterQuadButton.Text = "Water Quad";
this.ToolbarSelectWaterQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaterQuadButton_Click); this.ToolbarSelectWaterQuadButton.Click += new System.EventHandler(this.ToolbarSelectWaterQuadButton_Click);
// //
// ToolbarSelectCollisionButton // ToolbarSelectCollisionButton
// //
this.ToolbarSelectCollisionButton.Name = "ToolbarSelectCollisionButton"; this.ToolbarSelectCollisionButton.Name = "ToolbarSelectCollisionButton";
this.ToolbarSelectCollisionButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectCollisionButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectCollisionButton.Text = "Collision"; this.ToolbarSelectCollisionButton.Text = "Collision";
this.ToolbarSelectCollisionButton.Click += new System.EventHandler(this.ToolbarSelectCollisionButton_Click); this.ToolbarSelectCollisionButton.Click += new System.EventHandler(this.ToolbarSelectCollisionButton_Click);
// //
// ToolbarSelectNavMeshButton // ToolbarSelectNavMeshButton
// //
this.ToolbarSelectNavMeshButton.Name = "ToolbarSelectNavMeshButton"; this.ToolbarSelectNavMeshButton.Name = "ToolbarSelectNavMeshButton";
this.ToolbarSelectNavMeshButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectNavMeshButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectNavMeshButton.Text = "Nav Mesh"; this.ToolbarSelectNavMeshButton.Text = "Nav Mesh";
this.ToolbarSelectNavMeshButton.Click += new System.EventHandler(this.ToolbarSelectNavMeshButton_Click); this.ToolbarSelectNavMeshButton.Click += new System.EventHandler(this.ToolbarSelectNavMeshButton_Click);
// //
// ToolbarSelectPathButton // ToolbarSelectPathButton
// //
this.ToolbarSelectPathButton.Name = "ToolbarSelectPathButton"; this.ToolbarSelectPathButton.Name = "ToolbarSelectPathButton";
this.ToolbarSelectPathButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectPathButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectPathButton.Text = "Traffic Path"; this.ToolbarSelectPathButton.Text = "Traffic Path";
this.ToolbarSelectPathButton.Click += new System.EventHandler(this.ToolbarSelectPathButton_Click); this.ToolbarSelectPathButton.Click += new System.EventHandler(this.ToolbarSelectPathButton_Click);
// //
// ToolbarSelectTrainTrackButton // ToolbarSelectTrainTrackButton
// //
this.ToolbarSelectTrainTrackButton.Name = "ToolbarSelectTrainTrackButton"; this.ToolbarSelectTrainTrackButton.Name = "ToolbarSelectTrainTrackButton";
this.ToolbarSelectTrainTrackButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectTrainTrackButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectTrainTrackButton.Text = "Train Track"; this.ToolbarSelectTrainTrackButton.Text = "Train Track";
this.ToolbarSelectTrainTrackButton.Click += new System.EventHandler(this.ToolbarSelectTrainTrackButton_Click); this.ToolbarSelectTrainTrackButton.Click += new System.EventHandler(this.ToolbarSelectTrainTrackButton_Click);
// //
// ToolbarSelectDistantLodLightsButton // ToolbarSelectDistantLodLightsButton
// //
this.ToolbarSelectDistantLodLightsButton.Name = "ToolbarSelectDistantLodLightsButton"; this.ToolbarSelectDistantLodLightsButton.Name = "ToolbarSelectDistantLodLightsButton";
this.ToolbarSelectDistantLodLightsButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectDistantLodLightsButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectDistantLodLightsButton.Text = "Distant Lod Lights"; this.ToolbarSelectDistantLodLightsButton.Text = "Distant Lod Lights";
this.ToolbarSelectDistantLodLightsButton.Click += new System.EventHandler(this.ToolbarSelectDistantLodLightsButton_Click); this.ToolbarSelectDistantLodLightsButton.Click += new System.EventHandler(this.ToolbarSelectDistantLodLightsButton_Click);
// //
// ToolbarSelectMloInstanceButton // ToolbarSelectMloInstanceButton
// //
this.ToolbarSelectMloInstanceButton.Name = "ToolbarSelectMloInstanceButton"; this.ToolbarSelectMloInstanceButton.Name = "ToolbarSelectMloInstanceButton";
this.ToolbarSelectMloInstanceButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectMloInstanceButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectMloInstanceButton.Text = "Interior Instance"; this.ToolbarSelectMloInstanceButton.Text = "Interior Instance";
this.ToolbarSelectMloInstanceButton.Click += new System.EventHandler(this.ToolbarSelectMloInstanceButton_Click); this.ToolbarSelectMloInstanceButton.Click += new System.EventHandler(this.ToolbarSelectMloInstanceButton_Click);
// //
// ToolbarSelectScenarioButton // ToolbarSelectScenarioButton
// //
this.ToolbarSelectScenarioButton.Name = "ToolbarSelectScenarioButton"; this.ToolbarSelectScenarioButton.Name = "ToolbarSelectScenarioButton";
this.ToolbarSelectScenarioButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectScenarioButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectScenarioButton.Text = "Scenario"; this.ToolbarSelectScenarioButton.Text = "Scenario";
this.ToolbarSelectScenarioButton.Click += new System.EventHandler(this.ToolbarSelectScenarioButton_Click); this.ToolbarSelectScenarioButton.Click += new System.EventHandler(this.ToolbarSelectScenarioButton_Click);
// //
// ToolbarSelectAudioButton // ToolbarSelectAudioButton
// //
this.ToolbarSelectAudioButton.Name = "ToolbarSelectAudioButton"; this.ToolbarSelectAudioButton.Name = "ToolbarSelectAudioButton";
this.ToolbarSelectAudioButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectAudioButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectAudioButton.Text = "Audio"; this.ToolbarSelectAudioButton.Text = "Audio";
this.ToolbarSelectAudioButton.Click += new System.EventHandler(this.ToolbarSelectAudioButton_Click); this.ToolbarSelectAudioButton.Click += new System.EventHandler(this.ToolbarSelectAudioButton_Click);
// //
// ToolbarSelectOcclusionButton // ToolbarSelectOcclusionButton
// //
this.ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton"; this.ToolbarSelectOcclusionButton.Name = "ToolbarSelectOcclusionButton";
this.ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(181, 22); this.ToolbarSelectOcclusionButton.Size = new System.Drawing.Size(182, 22);
this.ToolbarSelectOcclusionButton.Text = "Occlusion"; this.ToolbarSelectOcclusionButton.Text = "Occlusion";
this.ToolbarSelectOcclusionButton.Click += new System.EventHandler(this.ToolbarSelectOcclusionButton_Click); this.ToolbarSelectOcclusionButton.Click += new System.EventHandler(this.ToolbarSelectOcclusionButton_Click);
// //
@ -3283,18 +3306,80 @@ namespace CodeWalker
this.ToolbarPanel.TabIndex = 7; this.ToolbarPanel.TabIndex = 7;
this.ToolbarPanel.Visible = false; this.ToolbarPanel.Visible = false;
// //
// HDTexturesCheckBox // NearClipUpDown
// //
this.HDTexturesCheckBox.AutoSize = true; this.NearClipUpDown.DecimalPlaces = 3;
this.HDTexturesCheckBox.Checked = true; this.NearClipUpDown.Increment = new decimal(new int[] {
this.HDTexturesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 1,
this.HDTexturesCheckBox.Location = new System.Drawing.Point(10, 231); 0,
this.HDTexturesCheckBox.Name = "HDTexturesCheckBox"; 0,
this.HDTexturesCheckBox.Size = new System.Drawing.Size(82, 17); 65536});
this.HDTexturesCheckBox.TabIndex = 57; this.NearClipUpDown.Location = new System.Drawing.Point(80, 320);
this.HDTexturesCheckBox.Text = "HD textures"; this.NearClipUpDown.Maximum = new decimal(new int[] {
this.HDTexturesCheckBox.UseVisualStyleBackColor = true; 10,
this.HDTexturesCheckBox.CheckedChanged += new System.EventHandler(this.HDTexturesCheckBox_CheckedChanged); 0,
0,
0});
this.NearClipUpDown.Minimum = new decimal(new int[] {
1,
0,
0,
196608});
this.NearClipUpDown.Name = "NearClipUpDown";
this.NearClipUpDown.Size = new System.Drawing.Size(114, 20);
this.NearClipUpDown.TabIndex = 59;
this.NearClipUpDown.Value = new decimal(new int[] {
5,
0,
0,
65536});
this.NearClipUpDown.ValueChanged += new System.EventHandler(this.NearClipUpDown_ValueChanged);
//
// label31
//
this.label31.AutoSize = true;
this.label31.Location = new System.Drawing.Point(4, 322);
this.label31.Name = "label31";
this.label31.Size = new System.Drawing.Size(53, 13);
this.label31.TabIndex = 58;
this.label31.Text = "Near Clip:";
//
// FarClipUpDown
//
this.FarClipUpDown.Increment = new decimal(new int[] {
100,
0,
0,
0});
this.FarClipUpDown.Location = new System.Drawing.Point(80, 346);
this.FarClipUpDown.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.FarClipUpDown.Minimum = new decimal(new int[] {
100,
0,
0,
0});
this.FarClipUpDown.Name = "FarClipUpDown";
this.FarClipUpDown.Size = new System.Drawing.Size(114, 20);
this.FarClipUpDown.TabIndex = 61;
this.FarClipUpDown.Value = new decimal(new int[] {
12000,
0,
0,
0});
this.FarClipUpDown.ValueChanged += new System.EventHandler(this.FarClipUpDown_ValueChanged);
//
// label32
//
this.label32.AutoSize = true;
this.label32.Location = new System.Drawing.Point(4, 348);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(45, 13);
this.label32.TabIndex = 60;
this.label32.Text = "Far Clip:";
// //
// WorldForm // WorldForm
// //
@ -3377,6 +3462,8 @@ namespace CodeWalker
this.Toolbar.PerformLayout(); this.Toolbar.PerformLayout();
this.ToolbarPanel.ResumeLayout(false); this.ToolbarPanel.ResumeLayout(false);
this.ToolbarPanel.PerformLayout(); this.ToolbarPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NearClipUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.FarClipUpDown)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -3640,5 +3727,9 @@ namespace CodeWalker
private System.Windows.Forms.ToolStripMenuItem ToolbarSelectOcclusionButton; private System.Windows.Forms.ToolStripMenuItem ToolbarSelectOcclusionButton;
private System.Windows.Forms.CheckBox CarGeneratorsCheckBox; private System.Windows.Forms.CheckBox CarGeneratorsCheckBox;
private System.Windows.Forms.CheckBox HDTexturesCheckBox; private System.Windows.Forms.CheckBox HDTexturesCheckBox;
private System.Windows.Forms.NumericUpDown FarClipUpDown;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.NumericUpDown NearClipUpDown;
private System.Windows.Forms.Label label31;
} }
} }

View File

@ -6649,6 +6649,18 @@ namespace CodeWalker
Renderer.renderhdtextures = HDTexturesCheckBox.Checked; Renderer.renderhdtextures = HDTexturesCheckBox.Checked;
} }
private void NearClipUpDown_ValueChanged(object sender, EventArgs e)
{
camera.ZNear = (float)NearClipUpDown.Value;
camera.UpdateProj = true;
}
private void FarClipUpDown_ValueChanged(object sender, EventArgs e)
{
camera.ZFar = (float)FarClipUpDown.Value;
camera.UpdateProj = true;
}
private void PathsCheckBox_CheckedChanged(object sender, EventArgs e) private void PathsCheckBox_CheckedChanged(object sender, EventArgs e)
{ {
renderpaths = PathsCheckBox.Checked; renderpaths = PathsCheckBox.Checked;

View File

@ -240,6 +240,14 @@ ufo
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB4SURBVDhP3ZC7DcAgDEQZKTMwHOvSIFriS7BlEB+HMic9 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB4SURBVDhP3ZC7DcAgDEQZKTMwHOvSIFriS7BlEB+HMic9
QJbvFThLUkpXzjkSpaeuzMPlEELx3jdsBauyCHBY6UWYPQI93KEljQD3jL6EGzN6x0bASyNYwkKU8Udm QJbvFThLUkpXzjkSpaeuzMPlEELx3jdsBauyCHBY6UWYPQI93KEljQD3jL6EGzN6x0bASyNYwkKU8Udm
gd6TMnIikDJyIqjVNz8T7FgKrAwFX6lVinM3aJ05lWDPRRcAAAAASUVORK5CYII= gd6TMnIikDJyIqjVNz8T7FgKrAwFX6lVinM3aJ05lWDPRRcAAAAASUVORK5CYII=
</value>
</data>
<data name="ToolbarTransformSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB0SURBVDhP7ZNBCoAgEEXnSJ3BqxmetNpaMLhVv5DNRJS2
CxIeuvA9XSjtg5mHEILPxB6U7JyLxphmSkDK1o5x9dst87SUfTXwRsYsA+paT0BGDGsVOJ92hdz3Bz4f
wGPC48uu7w5IGd+gBlpRMgYCnRwyESUj3CsQkYNFDwAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarObjectSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarObjectSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -261,12 +269,13 @@ ufo
WBXYx9R1nV75RuyHKrrnzCcGjE1u9ZyD4BugoZigQ9xrngAAAABJRU5ErkJggg== WBXYx9R1nV75RuyHKrrnzCcGjE1u9ZyD4BugoZigQ9xrngAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarTransformSpaceButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarSnapButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB0SURBVDhP7ZNBCoAgEEXnSJ3BqxmetNpaMLhVv5DNRJS2 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACtSURBVDhPrZBBEsIgEAR5Gy/wFV55T/wHr+KgHuCKNsVY
CxIeuvA9XSjtg5mHEILPxB6U7JyLxphmSkDK1o5x9dst87SUfTXwRsYsA+paT0BGDGsVOJ92hdz3Bz4f ZI2JiU7VVIVlp7OL+1mllIr7cb8Ie++PQwQYITnnM24NWxoBgsQYm/l+gk699bMsRA4h1JTSPsg0Xert
wGPC48uu7w5IGd+gBlpRMgYCnRwyESUj3CsQkYNFDwAAAABJRU5ErkJggg== em/mGwh3vW1Z7MvIABSWqXG3+iZHAEw1m4wD49oVANgVOL/VeSgeDAiX1mpWeKy9BIQiI+OxWQF77tG5
2Fc729BmeElf/3lNhORe+oecewDObEqX49RqCgAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarSnapToGroundButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarSnapToGroundButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -295,15 +304,6 @@ ufo
EcMw2DzPDMEke9AsYBrHs10vN4I1QqImwwDcFyMjQGaBHr5Bo8nEoYCnCQTGzVeI4oj6fIi+KHgoPBhC EcMw2DzPDMEke9AsYBrHs10vN4I1QqImwwDcFyMjQGaBHr5Bo8nEoYCnCQTGzVeI4oj6fIi+KHgoPBhC
4knCjTww9vxfbIUQNDEyiGIZ8t6tW/k0vC/AOpuiueNOLwVkUeylvju9FJCg8E1vM/2PlTv5UoervVTJ 4knCjTww9vxfbIUQNDEyiGIZ8t6tW/k0vC/AOpuiueNOLwVkUeylvju9FJCg8E1vM/2PlTv5UoervVTJ
uQAAAABJRU5ErkJggg== uQAAAABJRU5ErkJggg==
</value>
</data>
<data name="ToolbarSnapButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACtSURBVDhPrZBBEsIgEAR5Gy/wFV55T/wHr+KgHuCKNsVY
ZI2JiU7VVIVlp7OL+1mllIr7cb8Ie++PQwQYITnnM24NWxoBgsQYm/l+gk699bMsRA4h1JTSPsg0Xert
em/mGwh3vW1Z7MvIABSWqXG3+iZHAEw1m4wD49oVANgVOL/VeSgeDAiX1mpWeKy9BIQiI+OxWQF77tG5
2Fc729BmeElf/3lNhORe+oecewDObEqX49RqCgAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="ToolbarUndoButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarUndoButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -389,6 +389,17 @@ ufo
4BJN+IjGo5O8ZJndGVhKxpjWWts551aih0fre+0BLaVchRAezPB2NXSSV/gVwXGYPJiVUt6ns1ghCDjn 4BJN+IjGo5O8ZJndGVhKxpjWWts551aih0fre+0BLaVchRAezPB2NXSSV/gVwXGYPJiVUt6ns1ghCDjn
UQG86w3FToVgDcWCWS9Fvi/Ao0RVAcwUjwpyhzmf4n8BFApS5HZRwRuONGMbrIJ1JIN8O2QAAAAASUVO UQG86w3FToVgDcWCWS9Fvi/Ao0RVAcwUjwpyhzmf4n8BFApS5HZRwRuONGMbrIJ1JIN8O2QAAAAASUVO
RK5CYII= RK5CYII=
</value>
</data>
<data name="ToolbarCameraModeButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhP3dK/K0dRGMfxKxRJopCSEkLya/guUhQRmQwG
WfwIkYySgYUSKUKJlOK/MBoMFMofYLUIsfJ+f3NuF3+A8tRree5zP/fcc070f6oHT/jAPTqQj6WvXvCM
TZQgG3H58gFGcYVLtGIN15jBNDbwiGNUIg4pQx8GsQuHhrCDW8yjHyns4Q0DcCXpykM5bFzgHGPYxw1G
UIVMtMHfWUUj4nIg/KurGIYrSAZYOXDGlbhXcZlegUO8Yxzb+BlQAwNW0G0jVAYK0AwHtnCEOyQDZvGC
ObTbKIIvLMA9WIYDizhFMsDjfsAZptCA9JcdfoVBvryOSbgCe4HPTuCz+BQMKEUvJmCy96ET1ehCuAf2
5ZF+uwdZKEYtmuBGFSIXhtejBe5PHX7dxL+qKPoEppRHcXOtiDsAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="ToolbarCameraPerspectiveButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="ToolbarCameraPerspectiveButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -424,17 +435,6 @@ ufo
rp3fhGJScIRLzKMLFTC9cMIu3nCDVUyjB6WkYA93mEWbAyH9cMImPuA+rWMA31YwBU82kF6BS32Er/aO rp3fhGJScIRLzKMLFTC9cMIu3nCDVUyjB6WkYA93mEWbAyH9cMImPuA+rWMA31YwBU82kF6BS32Er/aO
M8zAh+OEghpcwQ2bg3uwBW8ewFd7xQkm0IA4oaAS7bh2KHjBIZbhV/D6GJkFphrdcIP8lFrAGPwPOjCO M8zAh+OEghpcwQ2bg3uwBW8ewFd7xQkm0IA4oaAS7bh2KHjBIZbhV/D6GJkFphrdcIP8lFrAGPwPOjCO
QdQiTqrAWNICd7gPnUj+xBKaU9dxfhTkjwV/FxU+AbsiGnc46OYIAAAAAElFTkSuQmCC QdQiTqrAWNICd7gPnUj+xBKaU9dxfhTkjwV/FxU+AbsiGnc46OYIAAAAAElFTkSuQmCC
</value>
</data>
<data name="ToolbarCameraModeButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEvSURBVDhP3dK/K0dRGMfxKxRJopCSEkLya/guUhQRmQwG
WfwIkYySgYUSKUKJlOK/MBoMFMofYLUIsfJ+f3NuF3+A8tRree5zP/fcc070f6oHT/jAPTqQj6WvXvCM
TZQgG3H58gFGcYVLtGIN15jBNDbwiGNUIg4pQx8GsQuHhrCDW8yjHyns4Q0DcCXpykM5bFzgHGPYxw1G
UIVMtMHfWUUj4nIg/KurGIYrSAZYOXDGlbhXcZlegUO8Yxzb+BlQAwNW0G0jVAYK0AwHtnCEOyQDZvGC
ObTbKIIvLMA9WIYDizhFMsDjfsAZptCA9JcdfoVBvryOSbgCe4HPTuCz+BQMKEUvJmCy96ET1ehCuAf2
5ZF+uwdZKEYtmuBGFSIXhtejBe5PHX7dxL+qKPoEppRHcXOtiDsAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">