Show / Hide Table of Contents

Class ParallelTransportTubeMesh

Methods for creating a tube like mesh using the parallel transport algorithm.

Inheritance
System.Object
ParallelTransportTubeMesh
Implements
ITubeMesh
Namespace: VRSketchingGeometry.Meshing
Assembly: VRSketchingGeometry.dll
Syntax
public class ParallelTransportTubeMesh : ITubeMesh
Remarks

Original author: tterpi

Constructors

ParallelTransportTubeMesh(CrossSection, Boolean)

Contructor.

Declaration
public ParallelTransportTubeMesh(CrossSection crossSection, bool generateCaps = true)
Parameters
Type Name Description
CrossSection crossSection

Cross section to be used for the tube mesh.

System.Boolean generateCaps

Should the ends of the tube be closed?

Methods

GenerateMesh(List<Vector3>)

Generate a mesh for all points.

Declaration
public Mesh GenerateMesh(List<Vector3> points)
Parameters
Type Name Description
System.Collections.Generic.List<UnityEngine.Vector3> points
Returns
Type Description
UnityEngine.Mesh

GetCrossSection()

Get a copy of the cross section used.

Declaration
public CrossSection GetCrossSection()
Returns
Type Description
CrossSection

GetMesh(List<Vector3>, List<Vector3>, List<Vector3>, Vector3, Boolean)

Generate a mesh for a spline according to the parallel transport algorithm.

Declaration
public static Mesh GetMesh(List<Vector3> points, List<Vector3> crossSectionShape, List<Vector3> crossSectionNormals, Vector3 crossSectionScale, bool generateCaps)
Parameters
Type Name Description
System.Collections.Generic.List<UnityEngine.Vector3> points

Points of the spline.

System.Collections.Generic.List<UnityEngine.Vector3> crossSectionShape

Vertices of the mesh cross section to be placed at each point.

System.Collections.Generic.List<UnityEngine.Vector3> crossSectionNormals

Normals of the cross section.

UnityEngine.Vector3 crossSectionScale

Vector to scale the cross section by. Can be used to control the diameter of the tube mesh.

System.Boolean generateCaps

Should the ends of the mesh be closed with planar meshes?

Returns
Type Description
UnityEngine.Mesh

ReplacePoints(List<Vector3>, Int32, Int32, Int32)

The parameters except points are ignored. This recalculates the whole mesh just like GenerateMesh(List<Vector3>).

Declaration
public Mesh ReplacePoints(List<Vector3> points, int index, int addCount, int removeCount)
Parameters
Type Name Description
System.Collections.Generic.List<UnityEngine.Vector3> points

All points of the complete line.

System.Int32 index

ignored

System.Int32 addCount

ignored

System.Int32 removeCount

ignored

Returns
Type Description
UnityEngine.Mesh

SetCrossSection(List<Vector3>, CrossSection)

Set the cross section and recalculate the mesh for all points.

Declaration
public Mesh SetCrossSection(List<Vector3> points, CrossSection crossSection)
Parameters
Type Name Description
System.Collections.Generic.List<UnityEngine.Vector3> points
CrossSection crossSection
Returns
Type Description
UnityEngine.Mesh

Implements

ITubeMesh
In This Article
Back to top Generated by DocFX