72 lines
1.8 KiB
C#
72 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace ProBuilder2.Common
|
|
{
|
|
// Token: 0x02000007 RID: 7
|
|
[AddComponentMenu("")]
|
|
[DisallowMultipleComponent]
|
|
public class pb_BezierShape : MonoBehaviour
|
|
{
|
|
// Token: 0x17000004 RID: 4
|
|
// (get) Token: 0x06000037 RID: 55 RVA: 0x00002E7C File Offset: 0x0000127C
|
|
// (set) Token: 0x06000038 RID: 56 RVA: 0x00002EA1 File Offset: 0x000012A1
|
|
public pb_Object mesh
|
|
{
|
|
get
|
|
{
|
|
if (this.m_Mesh == null)
|
|
{
|
|
this.m_Mesh = base.GetComponent<pb_Object>();
|
|
}
|
|
return this.m_Mesh;
|
|
}
|
|
set
|
|
{
|
|
this.m_Mesh = value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000039 RID: 57 RVA: 0x00002EAC File Offset: 0x000012AC
|
|
public void Init()
|
|
{
|
|
Vector3 vector = new Vector3(0f, 0f, 2f);
|
|
Vector3 vector2 = new Vector3(3f, 0f, 0f);
|
|
this.m_Points.Add(new pb_BezierPoint(Vector3.zero, -vector, vector, Quaternion.identity));
|
|
this.m_Points.Add(new pb_BezierPoint(vector2, vector2 + vector, vector2 + -vector, Quaternion.identity));
|
|
}
|
|
|
|
// Token: 0x0600003A RID: 58 RVA: 0x00002F30 File Offset: 0x00001330
|
|
public void Refresh()
|
|
{
|
|
pb_Object mesh = this.mesh;
|
|
pb_Spline.Extrude(this.m_Points, this.m_Radius, this.m_Columns, this.m_Rows, this.m_CloseLoop, this.m_Smooth, ref mesh);
|
|
}
|
|
|
|
// Token: 0x0400000B RID: 11
|
|
public List<pb_BezierPoint> m_Points = new List<pb_BezierPoint>();
|
|
|
|
// Token: 0x0400000C RID: 12
|
|
public bool m_CloseLoop;
|
|
|
|
// Token: 0x0400000D RID: 13
|
|
public float m_Radius = 0.5f;
|
|
|
|
// Token: 0x0400000E RID: 14
|
|
public int m_Rows = 8;
|
|
|
|
// Token: 0x0400000F RID: 15
|
|
public int m_Columns = 16;
|
|
|
|
// Token: 0x04000010 RID: 16
|
|
public bool m_Smooth = true;
|
|
|
|
// Token: 0x04000011 RID: 17
|
|
public bool m_IsEditing;
|
|
|
|
// Token: 0x04000012 RID: 18
|
|
private pb_Object m_Mesh;
|
|
}
|
|
}
|