Ejemplo n.º 1
0
        public LinearBindModel(TriangleData triangle, LinearController controller, LinearBindModel parent)
        {
            IsSet       = false;
            _triangle   = triangle;
            _controller = controller;
            _pool       = controller.Pool;
            _parent     = parent;

            _currentVertices = _targetVertices = new TriangleVertices(_triangle);

            _hasChildren = _controller.IsAbleToHaveChildren(_currentVertices);
            if (_hasChildren)
            {
                SetChildren();
            }
        }
Ejemplo n.º 2
0
        public LinearBreakModel(TriangleData triangle, LinearController controller, LinearBreakModel parent)
        {
            IsSet       = false;
            _triangle   = triangle;
            _controller = controller;
            _pool       = controller.Pool;
            _parent     = parent;

            _currentVertices = new TriangleVertices(_triangle);

            _centroidVector = _currentVertices.GetCentroid();

            _hasChildren = _controller.IsAbleToHaveChildren(_currentVertices);

            if (_hasChildren)
            {
                SetChildren();
            }

            if (_parent == null)
            {
                SetVertices(_currentVertices);
            }
        }