public void SetData(BufferData1D <T> data, BufferData1D <ushort> indicies = null) { _Data = data; VertexCount = data == null ? 0 : data.Length; Indicies = indicies; IndiciesCount = indicies == null ? 0 : indicies.Length; }
public void SetData(Mesh mesh) { _Data = new BufferData1D <T>(mesh.GetVertexArray <T>()); VertexCount = _Data.Length; var indiciesArray = mesh.GetIndiciesArray <ushort>(); if (indiciesArray.Length > 0) { Indicies = new BufferData1D <ushort>(indiciesArray); IndiciesCount = Indicies.Length; } }
public MeshData(Type layoutDefinitionType, BufferData1D <T> data, BufferData1D <ushort> indicies = null, AxPrimitiveType primitiveType = AxPrimitiveType.Triangles) { Layout = VertexLayoutDefinition.CreateDefinitionFromVertexStruct(layoutDefinitionType); SetData(data, indicies); PrimitiveType = primitiveType; }
public MeshData(BufferData1D <T> data, BufferData1D <ushort> indicies = null, AxPrimitiveType primitiveType = AxPrimitiveType.Triangles) : this() { SetData(data, indicies); PrimitiveType = primitiveType; }
public MeshData(VertexLayoutDefinition layoutDefinition, BufferData1D <T> data, BufferData1D <ushort> indicies = null, AxPrimitiveType primitiveType = AxPrimitiveType.Triangles) { Layout = layoutDefinition; SetData(data, indicies); PrimitiveType = primitiveType; }