Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8687931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:14:12+00:00 2026-06-12T23:14:12+00:00

I have an array of quads, each having it’s own position, defines the coordinates

  • 0

I have an array of quads, each having it’s own position, defines the coordinates of the vertices. I have scene’s projection on the plane of the camera. I want to know projection area of ​​each quad’s array element.
In fact, i wont to know by projection pixel which object it belongs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:14:15+00:00Added an answer on June 12, 2026 at 11:14 pm

    You can project each vertex onto the screen with the Viewport.Project method.

    After that you have the quad’s vertices in screen coordinates. All that remains is determining, of the point in question belongs to that polygon. This can be done in different ways.

    One option is to determine the side of the point relative to each polygon edge. This works beacuse the polygon is convex.

    previousSide := 0
    for each edge in polygon
        d1 := edge.p2 - edge.p1 //direction vector of edge
        d2 := pointInQuestion - edge.p1 //direction of first edge point to point in question
        side = d1.x * d2.y - d1.y * d2.x //cross product
        if side * previousSide < 0 then return false //different sides
        previousSide := side
     next
     return true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have array [1,2,1,2,3,4,3,4,1,2] I want to loop it x times, each times moving
We are talking 2D sprites here, so I have 4 vertices for each sprite
I have array d, I want array d2 The rows do not have the
Suppose I have array of points.I want to draw the route of that points
Imagine I have array of values ranging from 1 to 24. I want to
I have an array of thousands of quads; 4-sided 3D polygons. All I know
i have array unknown size i want to transfer to matrix[n][2].Example; D[c]=1,2,3,4,5 D[c/2][2]= 1
I have array INPUTFILES with n files INPUTFILES=( file_0 ... files_n-1 ) And i
I have array of hashes: @array = [{:id => 1, :status=>R}, {:id => 1,
I have array of select tag. <select id='uniqueID' name=status> <option value=1>Present</option> <option value=2>Absent</option> </select>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.