-
-
Notifications
You must be signed in to change notification settings - Fork 909
/
InstancingUserBuffer.cs
40 lines (34 loc) · 1.23 KB
/
InstancingUserBuffer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) Stride contributors (https://stride3d.net) and Tebjan Halm
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using Stride.Core;
using Stride.Core.Mathematics;
using Stride.Graphics;
namespace Stride.Engine
{
[DataContract("InstancingUserBuffer")]
[Display("UserBuffer")]
public class InstancingUserBuffer : IInstancing
{
[DataMember(10)]
[Display("Model Transformation Usage")]
public virtual ModelTransformUsage ModelTransformUsage { get; set; }
/// <summary>
/// The instance count
/// </summary>
[DataMemberIgnore]
public virtual int InstanceCount { get; set; }
/// <summary>
/// The bounding box of the world matrices, updated automatically by the <see cref="InstancingProcessor"/>.
/// </summary>
[DataMemberIgnore]
public virtual BoundingBox BoundingBox { get; set; } = BoundingBox.Empty;
[DataMemberIgnore]
public Buffer InstanceWorldBuffer;
[DataMemberIgnore]
public Buffer InstanceWorldInverseBuffer;
public void Update()
{
// No op, Assumes the user has done everything.
}
}
}