Пример #1
0
        public CubeFace(JsonFace face, Vector3 from, Vector3 to, Box parentBox)
        {
            _orientation = face.Orientation;
            _textureName = face.TextureName;
            _visible     = face.Visible;
            CullFace     = face.CullFace;
            _rotation    = face.Rotation;
            TintIndex    = face.TintIndex;
            _uV          = face.UV;
            _parentBox   = parentBox;
            _treeNode    = new TreeNodeFace(this);

            SetVertices(from, to);
            SetIndices();

            SetVertexBuffer(_vertices);
            SetIndexBuffer(_indices);
        }
Пример #2
0
        public CubeFace(Vector3 from, Vector3 to, FaceOrientation orientation, Vector4 uV, string textureName, bool visible, Box parentBox)
        {
            _orientation = orientation;
            _textureName = textureName;
            _visible     = visible;
            CullFace     = CullFace.none;
            _rotation    = 0;
            TintIndex    = -1;
            _uV          = uV;
            _parentBox   = parentBox;
            _treeNode    = new TreeNodeFace(this);

            SetVertices(from, to);
            SetIndices();

            SetVertexBuffer(_vertices);
            SetIndexBuffer(_indices);
        }