Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Model"/> class.
        /// </summary>
        /// <param name="availableAnimations">
        /// The available animations.
        /// </param>
        /// <param name="rootBone">
        /// The root bone, or null if there's no skeletal information.
        /// </param>
        /// <param name="vertexes">
        /// The vertexes associated with this model.
        /// </param>
        /// <param name="indices">
        /// The indices associated with the model.
        /// </param>
        public Model(
            IModelRenderConfiguration[] modelRenderConfigurations,
            IRenderBatcher renderBatcher,
            string name,
            IAnimationCollection availableAnimations,
            IMaterial material,
            IModelBone rootBone,
            ModelVertex[] vertexes,
            int[] indices)
        {
            Name = name;
            AvailableAnimations = availableAnimations;
            Root = rootBone;
            Vertexes = vertexes;
            Indices = indices;
            Material = material;

            _cachedVertexBuffers = new Dictionary<object, VertexBuffer>();
            _modelRenderConfigurations = modelRenderConfigurations;
            _renderBatcher = renderBatcher;

            if (Root != null)
            {
                _flattenedBones = Root.Flatten();
                Bones = _flattenedBones.ToDictionary(k => k.Name, v => v);
            }
        }
 public ModelSerializerVersion3(
     IModelRenderConfiguration[] modelRenderConfigurations,
     IRenderBatcher renderBatcher)
 {
     _modelRenderConfigurations = modelRenderConfigurations;
     _renderBatcher = renderBatcher;
 }
Пример #3
0
 public AssimpReader(IModelRenderConfiguration[] modelRenderConfigurations, IRenderBatcher renderBatcher)
 {
     _modelRenderConfigurations = modelRenderConfigurations;
     _renderBatcher = renderBatcher;
 }