Exemple #1
0
 // To reduce memory usage, when we disconnect a DMeshSO we can
 // discard temporary data structures. Also, when we destroy it,
 // it doesn't necessarily get GC'd right away (and if we make mistakes,
 // maybe never!). But we can manually free the mesh.
 override public void Connect(bool bRestore)
 {
     if (bRestore)
     {
         viewMeshes.ValidateViewMeshes();
     }
 }
Exemple #2
0
 void validate_view_meshes()
 {
     // if view meshes are invalid, and mesh is too big, create piecewise decomp panager
     if ((view_meshes != null) &&
         (view_meshes is TrivialViewMeshManager) &&
         (view_meshes.AreMeshesValid == false) &&
         (Mesh.TriangleCount > mesh_decomp_size_thresh))
     {
         release_view_meshes();
     }
     ViewMeshes.ValidateViewMeshes();
 }
Exemple #3
0
        public virtual DMeshSO Create(DMesh3 mesh, SOMaterial setMaterial)
        {
            AssignSOMaterial(setMaterial);       // need to do this to setup BaseSO material stack
            parentGO = GameObjectFactory.CreateParentGO(UniqueNames.GetNext("DMesh"));

            this.mesh = mesh;

            //viewMeshes = new LinearDecompViewMeshManager(this);
            viewMeshes = new TrivialViewMeshManager(this);

            on_mesh_changed();
            viewMeshes.ValidateViewMeshes();

            return(this);
        }