Beispiel #1
0
        private void TestCreate()
        {
            List <Vector3> points  = new List <Vector3>();
            float          every_t = 1.0f / (float)pointnum;

            for (int i = 0; i < pointnum; ++i)
            {
                Vector3 pos = CalculateCubicBezierPoint(every_t * i, this.transform.position, point1.position,
                                                        point2.position, endpoint.position);
                points.Add(pos);
            }
            RenderModel.SetLength(0.1f);
            RenderModel.SetWidth(0.1f);
            RenderModel.SetDepth(10);

            RenderModel.CreateMesh(points.ToArray(), null);

            m_SelfMaterial = RenderModel.GetMeshMaterial();
        }
Beispiel #2
0
        public override void CreateMesh(Vector3[] points, Vector3[] normals = null)
        {
            RenderModel.CreateMesh(points, normals);

            m_SelfMaterial = RenderModel.GetMeshMaterial();
        }