Show / Hide Table of Contents

Class PatchSketchObject

Patch surface sketch object using a grid of control points.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
SelectableObject
SketchObject
PatchSketchObject
Implements
ISelectable
IHighlightable
IGroupable
IBrushable
Inherited Members
SketchObject.Defaults
SketchObject.ParentGroup
SketchObject.meshRenderer
SketchObject.originalMaterial
SketchObject.highlightMaterial
SketchObject.Awake()
SketchObject.resetToParentGroup()
SketchObject.setUpOriginalMaterialAndMeshRenderer()
SketchObject.highlight()
SketchObject.revertHighlight()
Namespace: VRSketchingGeometry.SketchObjectManagement
Assembly: VRSketchingGeometry.dll
Syntax
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer), typeof(MeshCollider))]
public class PatchSketchObject : SketchObject, ISelectable, IHighlightable, ISerializableComponent, IGroupable, IBrushable
Remarks

Original author: tterpi

Fields

Height

Declaration
public int Height
Field Value
Type Description
System.Int32

MinimumDistanceToLastSegment

Declaration
public float MinimumDistanceToLastSegment
Field Value
Type Description
System.Single

ResolutionHeight

Declaration
public int ResolutionHeight
Field Value
Type Description
System.Int32

ResolutionWidth

Declaration
public int ResolutionWidth
Field Value
Type Description
System.Int32

Width

Declaration
public int Width
Field Value
Type Description
System.Int32

Methods

GetBrush()

Declaration
public Brush GetBrush()
Returns
Type Description
Brush

GetControlPoints()

Returns a copy of the control points in local space.

Declaration
public List<Vector3> GetControlPoints()
Returns
Type Description
System.Collections.Generic.List<UnityEngine.Vector3>

GetControlPointsCount()

Declaration
public int GetControlPointsCount()
Returns
Type Description
System.Int32

GetLastSegment()

Get the last segment of control points of length width. Points are in local space.

Declaration
public List<Vector3> GetLastSegment()
Returns
Type Description
System.Collections.Generic.List<UnityEngine.Vector3>

GetSegment(Int32)

Get a segment of control points of length Width. Points are in local space.

Declaration
public List<Vector3> GetSegment(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
System.Collections.Generic.List<UnityEngine.Vector3>

SetBrush(Brush)

Declaration
public void SetBrush(Brush brush)
Parameters
Type Name Description
Brush brush

SetControlPoints(List<Vector3>, Int32)

Sets the control points. Control points have to be at least 3x3. Control points are expected to be in world space.

Declaration
public void SetControlPoints(List<Vector3> controlPoints, int width)
Parameters
Type Name Description
System.Collections.Generic.List<UnityEngine.Vector3> controlPoints
System.Int32 width

SetControlPointsLocalSpace(List<Vector3>, Int32)

Sets the control points. Control points have to be at least 3x3. Control points are expected to be in local space.

Declaration
public void SetControlPointsLocalSpace(List<Vector3> controlPoints, int width)
Parameters
Type Name Description
System.Collections.Generic.List<UnityEngine.Vector3> controlPoints
System.Int32 width

UpdatePatchMesh()

Regenerates the mesh from the currently set control points.

Declaration
public void UpdatePatchMesh()

Implements

ISelectable
IHighlightable
IGroupable
IBrushable
In This Article
Back to top Generated by DocFX