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); }
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); }