コード例 #1
0
ファイル: Pyramid.cs プロジェクト: Smoothstep/VRChat
        // Token: 0x06004233 RID: 16947 RVA: 0x001506B8 File Offset: 0x0014EAB8
        public override void GenerateColliderGeometry()
        {
            Mesh colliderMesh = base.GetColliderMesh();

            if (colliderMesh)
            {
                colliderMesh.Clear();
                PyramidPrimitive.GenerateGeometry(colliderMesh, this.width, this.height, this.depth, this.widthSegments, this.heightSegments, this.depthSegments, this.pyramidMap, this.pivotPosition);
                base.RefreshMeshCollider();
            }
            base.GenerateColliderGeometry();
        }
コード例 #2
0
ファイル: Pyramid.cs プロジェクト: Smoothstep/VRChat
        // Token: 0x06004231 RID: 16945 RVA: 0x001505D8 File Offset: 0x0014E9D8
        public void GenerateGeometry(float width, float height, float depth, int widthSegments, int heightSegments, int depthSegments, bool pyramidMap, PivotPosition pivotPosition)
        {
            MeshFilter component = base.GetComponent <MeshFilter>();

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

            base.GenerationTimeMS = PyramidPrimitive.GenerateGeometry(sharedMesh, width, height, depth, widthSegments, heightSegments, depthSegments, pyramidMap, pivotPosition);
            this.width            = width;
            this.height           = height;
            this.depth            = depth;
            this.widthSegments    = widthSegments;
            this.heightSegments   = heightSegments;
            this.depthSegments    = depthSegments;
            this.flipNormals      = false;
            this.pyramidMap       = pyramidMap;
            this.pivotPosition    = pivotPosition;
        }