dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Questioning Two Triangles that don't have Height Values

  1. #1
    Join Date
    Apr 2019
    Posts
    3

    Questioning Two Triangles that don't have Height Values

    Hello. I am trying to understand if I am getting proper data for mesh of triangles related to the one height of my mapping array:

    Code:
    void addHillsManually()
    {
    	
    	heightMapFromArray[20][20] = .5;
    }

    I am calling a for loop that gives me the data for all the triangles with any vertices having a value not equal to zero. I have attached an image of the hill in the mesh and also a diagram of the data I collected. The letter X on the two triangles are the triangles that had no data for any height value not equal to zero. The diagram is probably correct, but it is a different shape then what I expected and I am questioning if it is right, mainly the two triangles without any height. A1 through A3 are left triangles and B1 through B3 are right triangles. Across are the x values and upward are the Z (depth) coordinates.


    Thank you, because this is mostly conceptual I did not feel the code is needed, yet.


    JoshuaEir
    Attached Images Attached Images   

  2. #2
    Join Date
    Apr 2019
    Posts
    3

    Re: Questioning Two Triangles that don't have Height Values

    - Oh, the dot in the middle of the diagram is the height value of .5 -

  3. #3
    Join Date
    Apr 2019
    Posts
    3

    Re: Questioning Two Triangles that don't have Height Values

    The rendering is done with OpenGL.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)