Table of Contents

Wiki > TV3D65 Index

TVLandscape

DESCRIPTION

This class is used to generate and render vast landscapes.

USAGE

VB6

//todo

VB.NET

 
' TV Variables
Public TV As TVEngine
Public Land As TVLandscape
 
' Declare new TV Object.
TV = New TVEngine
' The land generation
' *Note: Land = New TVLandscape is not the correct usage in TV6.5 use:
Land = Scene.CreateLandscape("Landscape")
 

Delphi

procedure Init;
var
    TV : TVEngine;
    Scene : TVScene;
    Landscape : TVLandscape;
begin
  // Create the TV Interface first:
  TV := CoTVEngine.Create;
 
  // Now after we are done initializing the TVEngine component lets continue:
  // Create any other components after TV init.
 
  Scene := CoTVScene.Create;
 
  Landscape := Scene.CreateLandscape('Landscape');
end;

C#

 
// TV Variables
TVEngine TV;
TVScene Scene;
TVLandscape Land;
 
// Declare new TV Object
TV = new TVEngine();
// Set the scene
Scene = new TVScene();
// The land generation
Land = Scene.CreateLandscape("Landscape");
 

C++

CTVEngine* pTV;
CTVScene* pScene;
CTVLandscape* pLand;
 
pTV = new CTVEngine();
pScene = new CTVScene();
pLand = new CTVLandscape();
 
pLand = pScene->CreateLandscape( "Landscape" );

NOTES

 VB.NET
'Use an OpenFileDialog in an application. 
'Creating a new landscape, 2048 x 2048 based on heightmap file
Dim land As TVLandscape
Dim d As New OpenFileDialog()
d.CheckFileExists = True
d.DefaultExt = "jpg"
d.Filter = "Supported image files (*.dds, *.jpg, *.png, *.bmp)|*.dds;*.jpg;*.png;*.bmp"
If d.ShowDialog = Windows.Forms.DialogResult.OK Then
            Land = Scene.CreateLandscape
            Land.SetAffineLevel(MTV3D65.CONST_TV_LANDSCAPE_AFFINE.TV_AFFINE_LOW)
            Land.GenerateTerrain(d.FileName, MTV3D65.CONST_TV_LANDSCAPE_PRECISION.TV_PRECISION_BEST, 8, 8, 0, 0, 0, True)
End If

METHODS

Method Description
AddSplattingTexture Adds a texture to the splatting system.
AdvancedCollide Performs a ray collision with the landscape.
ClearAllSplattingLayers Resets the splatting layers.
ComputeNormals Computes vertex normals.
CreateEmptyTerrain Creates a flat landscape.
DeleteAll Resets the landscape object.
Destroy Destroys the internal landscape object.
Enable Enables or disables the landscape.
EnableLOD Enables or disables the Level-of-Detail System.
EnableTerrainHoles Enables or disables holes in the landscape.
ExpandSplattingTexture Expands specific splatting textures across the landscape.
ExpandTexture Expands a non-splatting texture across the landscape.
FixSeams Fixes seams between adjacent landscape objects.
FlushHeightChanges Applies height changes to the landscape.
GenerateTerrain Generates a landscape from a heightmap.
GetBoundingBox Returns the Axis Aligned Bounding Box of the landscape.
GetChunkBoundingBox Returns the Axis Aligned Bounding Box of a specific landscape chunk.
GetChunkCount Returns the number of chunks.
GetChunkID Returns the ID of a specific chunk.
GetChunkIDFromPosition Returns the ID of a specific chunk based on its position.
GetHeight Returns the height at a specific point.
GetHeightArray Returns multiple heights at once.
GetIndex Returns the internal index of the landscape.
GetInterpolatedNormal Returns the landscape-normal at a specific point.
GetLandHeight Returns the height of the landscape in chunks.
GetLandRealHeight Returns the height of the landscape in units.
GetLandRealWidth Returns the width of the landscape in units.
GetLandWidth Returns the width of the landscape in chunks.
GetMaterial Returns the associated material.
GetMatrix Returns the matrix of the landscape.
GetName Returns the name of the landscape.
GetNormal Returns a vertex normal of the landscape.
GetPosition Returns the position of the landscape.
GetPrecision Returns the precision of the landscape.
GetProgressiveLOD Returns if Progressive-Level-of-Detail is enabled.
GetRotation Returns the rotation of the landscape.
GetScale Returns the scale of the landscape.
GetShader Returns the current shader of the landscape.
GetSlope Returns the slope between two points on the landscape.
GetSlopeAngle Returns the slope between two points on the landscape as angle.
GetTag Returns the user-defined tag information.
GetTerrainHole Returns the type of a terrain-hole.
GetTexture Returns the current texture of the landscape.
GetTextureEx Returns the current texture on a specified layer.
GetUserData Returns the user-defined extra information.
IsActive Returns if the landscape is currently active.
IsChunkVisible Returns if a chunk is visible.
IsVisible Returns if the landscape is visible.
LoadTerrainData Loads terrain data from a file.
MousePick Performs a mouse-pick with the landscape.
OptimizeSplatting Optimizes the landscape-splatting.
RemoveAllSplattingTextures Removes all splatting-textures.
RemoveSplattingLayer Removes a splatting-layer.
RemoveSplattingTexture Removes a splatting-texture.
Render Renders the landscape.
ReplaceSplattingAlpha Replaces a splatting-alphamap by another one.
ReplaceSplattingTexture Replaces a splatting-texture by another one.
SaveTerrainData Saves the terrain data to a file.
SetAffineLevel Sets the affine level of the landscape.
SetAlphaTest Sets the alpha-test and its options.
SetBlendingMode Sets the alpha-blending mode.
SetBlendingModeEx Sets advanced alpha-blending mode.
SetClamping Enables or disables texture clamping.
SetCollisionEnable Enables or disables ray-collision.
SetCullMode Sets the culling-mode.
SetCustomLightmap Sets a custom lightmap.
SetDetailMode Sets the detail blending mode.
SetDetailTexture Sets a detail-texture.
SetDetailTextureScale Sets the scale of the detail texture.
SetHeight Set landscape height at a specific point.
SetHeightArray Sets more heights at once.
SetHeightArrayEx Sets more heights at once.
SetHeightmapMode Sets the color-mode for the heightmap.
SetIndex Sets the internal index (use with caution).
SetLightingMode Sets the lighting mode of the landscape.
SetMaterial Sets the material of the landscape.
SetMatrix Sets the matrix of the landscape.
SetName Sets a name for the landscape.
SetNormal Sets the vertex normal at a specific point.
SetPagingSystem Enables the internal paging system.
SetPosition Sets the landscape position.
SetProgressiveLOD Enables or disables Progressive-Level-of-Detail.
SetRotation Sets the rotation of the landscape.
SetScale Sets the scale of the landscape.
SetShader Sets the shader of the landscape.
SetSplattingEnable Enables or disables texture-splatting.
SetSplattingMode Sets options for texture-splatting.
SetSplattingTexture Sets a splatting-texture.
SetSplattingTextureProperties Sets the properties of a splatting-texture.
SetTag Sets the user-defined tag information.
SetTerrainChunkEnable Enables or disables a specific landscape-chunk.
SetTerrainHole Sets a hole in the landscape.
SetTerrainHoleArray Sets more holes at once.
SetTerrainHoleList Sets more holes at once.
SetTexture Sets a texture.
SetTextureEx Sets a texture at a specific layer.
SetTextureScale Sets the tiling of a texture.
SetUserData Sets the user-defined extra information.
TexGen_AddLayer Adds a layer to the texture generator.
TexGen_ClearLayers Clears all layers of the texture generator.
TexGen_DeleteLayer Delete a specific layer of the texture generator.
TexGen_Generate Generates a new texture using the texture generator.
TexGen_GetCount Returns the texture count of the texture generator.
TexGen_GetLayerSource Returns the texture name of a layer in the texture generator.

 
tv3d65_doc/tvlandscape.txt · Last modified: 2013/11/22 13:31