Exemplo n.º 1
0
        // Token: 0x06004281 RID: 17025 RVA: 0x00151E64 File Offset: 0x00150264
        public override void GenerateColliderGeometry()
        {
            Mesh colliderMesh = base.GetColliderMesh();

            if (colliderMesh)
            {
                colliderMesh.Clear();
                TubePrimitive.GenerateGeometry(colliderMesh, this.radius0, this.radius1, this.height, this.sides, this.heightSegments, this.slice, this.radialMapping, this.normalsType, this.pivotPosition);
                base.RefreshMeshCollider();
            }
            base.GenerateColliderGeometry();
        }
Exemplo n.º 2
0
        // Token: 0x0600427F RID: 17023 RVA: 0x00151D7C File Offset: 0x0015017C
        public void GenerateGeometry(float radius0, float radius1, float height, int sides, int heightSegments, float slice, bool radialMapping, NormalsType normalsType, PivotPosition pivotPosition)
        {
            MeshFilter component = base.GetComponent <MeshFilter>();

            if (component.sharedMesh == null)
            {
                component.sharedMesh = new Mesh();
            }
            Mesh sharedMesh = component.sharedMesh;

            base.GenerationTimeMS = TubePrimitive.GenerateGeometry(sharedMesh, radius0, radius1, height, sides, heightSegments, slice, radialMapping, normalsType, pivotPosition);
            this.radius0          = radius0;
            this.radius1          = radius1;
            this.height           = height;
            this.sides            = sides;
            this.heightSegments   = heightSegments;
            this.slice            = slice;
            this.radialMapping    = radialMapping;
            this.normalsType      = normalsType;
            this.flipNormals      = false;
        }