| TerrainRoadLayerCreateMesh Method |
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static void CreateMesh(
GraphicsDevice graphicsDevice,
Path3F path,
float defaultWidth,
int maxNumberOfIterations,
float tolerance,
out Submesh submesh,
out Aabb aabb,
out float roadLength
)
Public Shared Sub CreateMesh (
graphicsDevice As GraphicsDevice,
path As Path3F,
defaultWidth As Single,
maxNumberOfIterations As Integer,
tolerance As Single,
<OutAttribute> ByRef submesh As Submesh,
<OutAttribute> ByRef aabb As Aabb,
<OutAttribute> ByRef roadLength As Single
)
public:
static void CreateMesh(
GraphicsDevice^ graphicsDevice,
Path3F^ path,
float defaultWidth,
int maxNumberOfIterations,
float tolerance,
[OutAttribute] Submesh^% submesh,
[OutAttribute] Aabb% aabb,
[OutAttribute] float% roadLength
)
static member CreateMesh :
graphicsDevice : GraphicsDevice *
path : Path3F *
defaultWidth : float32 *
maxNumberOfIterations : int *
tolerance : float32 *
submesh : Submesh byref *
aabb : Aabb byref *
roadLength : float32 byref -> unit
Parameters
- graphicsDevice
- Type: GraphicsDevice
The graphics device. - path
- Type: DigitalRune.Mathematics.InterpolationPath3F
The path that represents the road. - defaultWidth
- Type: SystemSingle
The default road width. - maxNumberOfIterations
- Type: SystemInt32
The maximum number of iterations (used when tessellating the path).
- tolerance
- Type: SystemSingle
The tolerance in world space units (used when tessellating the path).
- submesh
- Type: DigitalRune.GraphicsSubmesh
The resulting road mesh - or if path is empty.
- aabb
- Type: DigitalRune.Geometry.ShapesAabb
The axis-aligned bounding box of the road mesh. - roadLength
- Type: SystemSingle
The length of the road.
Exceptions Remarks
A road is defined by the specified 3D path. The path keys can be of type
TerrainRoadPathKey. This allows to add additional information to the path,
like varying road Width. If the path keys are of any
other PathKey3F type, the defaultWidth is used.
To create the road mesh, the path is tessellated. maxNumberOfIterations
and tolerance define how detailed the tessellation will be.
Limitations:
-
The path should not have any gaps.
See Also