本文整理汇总了C#中Mesh.GetIndices方法的典型用法代码示例。如果您正苦于以下问题:C# Mesh.GetIndices方法的具体用法?C# Mesh.GetIndices怎么用?C# Mesh.GetIndices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mesh
的用法示例。
在下文中一共展示了Mesh.GetIndices方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VertexHelper
public VertexHelper(Mesh m)
{
this.m_Positions.AddRange((IEnumerable<Vector3>) m.vertices);
this.m_Colors.AddRange((IEnumerable<Color32>) m.colors32);
this.m_Uv0S.AddRange((IEnumerable<Vector2>) m.uv);
this.m_Uv1S.AddRange((IEnumerable<Vector2>) m.uv2);
this.m_Normals.AddRange((IEnumerable<Vector3>) m.normals);
this.m_Tangents.AddRange((IEnumerable<Vector4>) m.tangents);
this.m_Indices.AddRange((IEnumerable<int>) m.GetIndices(0));
}
示例2: VertexHelper
public VertexHelper(Mesh m)
{
m_Positions.AddRange(m.vertices);
m_Colors.AddRange(m.colors32);
m_Uv0S.AddRange(m.uv);
m_Uv1S.AddRange(m.uv2);
m_Normals.AddRange(m.normals);
m_Tangents.AddRange(m.tangents);
m_Indices.AddRange(m.GetIndices(0));
}
示例3: AddStaticCollisionMesh
/// <summary>
/// Adds static mesh to phys space.
/// </summary>
/// <param name="mesh"></param>
/// <param name="transform"></param>
void AddStaticCollisionMesh( Mesh mesh, Matrix transform )
{
var indices = mesh.GetIndices();
var vertices = mesh.Vertices
.Select( v1 => Vector3.TransformCoordinate( v1.Position, transform ) )
.Select( v2 => MathConverter.Convert( v2 ) )
.ToArray();
var staticMesh = new StaticMesh( vertices, indices );
staticMesh.Sidedness = BEPUutilities.TriangleSidedness.Clockwise;
physSpace.Add( staticMesh );
}