Exemple #1
0
 public void releaseBuildingMeshData()
 {
     if (m_bdata != null)
     {
         m_bdata.m_triangles = null;
         m_bdata.m_vertices  = null;
         m_bdata             = null;
     }
 }
Exemple #2
0
 public Mesh(bool forbuild)
 {
     if (forbuild)
     {
         m_bdata = new MeshBuildingData();
     }
     m_obb       = new Vector3(0.5f, 0.5f, 0.5f);
     m_obboffset = Vector3.Zero;
 }
Exemple #3
0
        public Mesh()
        {
            vertexcomp vcomp = new vertexcomp();

            m_bdata               = new MeshBuildingData();
            m_bdata.m_vertices    = new Dictionary <Vertex, int>(vcomp);
            m_bdata.m_triangles   = new List <Triangle>();
            m_bdata.m_centroid    = Vector3.Zero;
            m_bdata.m_centroidDiv = 0;
            m_bdata.m_obbXmin     = float.MaxValue;
            m_bdata.m_obbXmax     = float.MinValue;
            m_bdata.m_obbYmin     = float.MaxValue;
            m_bdata.m_obbYmax     = float.MinValue;
            m_bdata.m_obbZmin     = float.MaxValue;
            m_bdata.m_obbZmax     = float.MinValue;
            m_obb       = new Vector3(0.5f, 0.5f, 0.5f);
            m_obboffset = Vector3.Zero;
        }