示例#1
0
    /// <summary>
    /// Should be called on each transform position/rotation update.
    /// Updates the normals, positions and the isDirty flag.
    /// </summary>
    public void UpdateVertices(Vector3 raySource)
    {
        RelevantVertices.Clear();

        Vector3[] normals  = meshContainer.GetNormals();
        Vector3[] vertices = meshContainer.GetVertices();

        for (int i = 0; i < normals.Length; i++)
        {
            VerticeData[i].Position = vertices[i];
            VerticeData[i].isDirty  = false;

            if (IsNormalRelevant(normals[i], VerticeData[i].Position, raySource))
            {
                RelevantVertices.Add(i);
            }
        }
    }
示例#2
0
    public void GetNormalsReturnsNotNull_Test(string mockName)
    {
        SetUp(mockName);

        Assert.IsNotNull(container.GetNormals());
    }