/// <summary> /// Resets the render instance's fields to defaults. /// </summary> public virtual void Reset() { VertexBuffer = null; IndexBuffer = null; VertexDeclaration = null; Material = null; MaterialInstanceData = null; Opacity = 1.0f; UTextureAddressMode = TextureAddressMode.Clamp; VTextureAddressMode = TextureAddressMode.Clamp; ObjectTransform = Matrix.Identity; SortPoint = Vector3.Zero; IsSortPointSet = false; VertexSize = 0; PrimitiveType = PrimitiveType.TriangleStrip; BaseVertex = 0; VertexCount = 0; StartIndex = 0; PrimitiveCount = 0; Type = RenderInstanceType.UndefinedType; MaterialSortKey = 0; GeometrySortKey = 0; IsReset = true; }
/// <summary> /// Copies a render instance's fields into this render instance. /// </summary> /// <param name="src">The render instance to copy.</param> public void Copy(RenderInstance src) { VertexBuffer = src.VertexBuffer; IndexBuffer = src.IndexBuffer; VertexDeclaration = src.VertexDeclaration; Material = src.Material; ObjectTransform = src.ObjectTransform; WorldBox = src.WorldBox; UTextureAddressMode = src.UTextureAddressMode; VTextureAddressMode = src.VTextureAddressMode; VertexSize = src.VertexSize; PrimitiveType = src.PrimitiveType; BaseVertex = src.BaseVertex; VertexCount = src.VertexCount; StartIndex = src.StartIndex; PrimitiveCount = src.PrimitiveCount; Type = src.Type; SortPoint = src.SortPoint; IsSortPointSet = src.IsSortPointSet; Opacity = src.Opacity; }