Example #1
0
        internal MxStdModel Clone()
        {
            var model = new MxStdModel(VertCount, FaceCount);

            Clone(model);
            return(model);
        }
Example #2
0
        internal MxStdSlim(MxStdModel model)
        {
            heap = new MxHeap(64);
            this.model = model;
            PlacementPolicy = MxPlacement.Optimal;
            WeightingPolicy = MxWeighting.Area;
            BoundaryWeight = 1000.0;
            CompactnessRatio = 0.0;
            MeshingPenalty = 1.0;
            LocalValidityThreshold = 0.0;
            VertexDegreeLimit = 24;
            WillJoinOnly = false;

            ValidFaces = 0;
            ValidVerts = 0;
            IsInitialized = false;

            for (var faceId = 0; faceId < model.FaceCount; faceId++)
            {
                if (!model.FaceIsValid(faceId)) continue;
                ValidFaces++;
            }

            for (var vertId = 0; vertId < model.VertCount; vertId++)
            {
                if (!model.VertexIsValid(vertId)) continue;
                ValidVerts++;
            }
        }
Example #3
0
        internal MxStdSlim(MxStdModel model)
        {
            heap                   = new MxHeap(64);
            this.model             = model;
            PlacementPolicy        = MxPlacement.Optimal;
            WeightingPolicy        = MxWeighting.Area;
            BoundaryWeight         = 1000.0;
            CompactnessRatio       = 0.0;
            MeshingPenalty         = 1.0;
            LocalValidityThreshold = 0.0;
            VertexDegreeLimit      = 24;
            WillJoinOnly           = false;

            ValidFaces    = 0;
            ValidVerts    = 0;
            IsInitialized = false;

            for (var faceId = 0; faceId < model.FaceCount; faceId++)
            {
                if (!model.FaceIsValid(faceId))
                {
                    continue;
                }
                ValidFaces++;
            }

            for (var vertId = 0; vertId < model.VertCount; vertId++)
            {
                if (!model.VertexIsValid(vertId))
                {
                    continue;
                }
                ValidVerts++;
            }
        }
Example #4
0
 internal MxFaceQSlim(MxStdModel model) : base(model)
 {
     faceInfo = new MxBlock <TriInfo>(model.FaceCount);
 }
Example #5
0
 internal MxStdModel Clone()
 {
     var model = new MxStdModel(VertCount, FaceCount);
     Clone(model);
     return model;
 }
Example #6
0
 internal MxEdgeQSlim(MxStdModel model)
     : base(model)
 {
     edgeLinks = new MxBlock<List<MxQSlimEdge>>(model.VertCount);
     Contracted += ContractionCallback;
 }
Example #7
0
        private void InitBaseModel()
        {
            baseModel = new MxStdModel(inputVertices.Count, inputIndices.Count/3)
            {
                ColorBinding = MxBinding.UnBound,
                NormalBinding = MxBinding.UnBound
            };

            foreach(var vec in inputVertices)
            {
                baseModel.AddVertex(vec.X, vec.Y, vec.Z);
            }

            for (var i = 0; i < inputIndices.Count; )
            {
                baseModel.AddFace(inputIndices[i++], inputIndices[i++], inputIndices[i++]);
            }
        }
Example #8
0
 internal MxEdgeQSlim(MxStdModel model)
     : base(model)
 {
     edgeLinks   = new MxBlock <List <MxQSlimEdge> >(model.VertCount);
     Contracted += ContractionCallback;
 }
Example #9
0
 internal MxFaceQSlim(MxStdModel model)
     : base(model)
 {
     faceInfo = new MxBlock<TriInfo>(model.FaceCount);
 }
Example #10
0
 internal MxQSlim(MxStdModel model)
     : base(model)
 {
     quadrics        = new MxBlock <MxQuadric3>(model.VertCount);
     ObjectTransform = null;
 }
Example #11
0
 internal MxQSlim(MxStdModel model)
     : base(model)
 {
     quadrics = new MxBlock<MxQuadric3>(model.VertCount);
     ObjectTransform = null;
 }