Jump to content
  • Advertisement
Sign in to follow this  
cptrnet

Scaling Question

This topic is 4715 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can you scale a single vertex? I have one point on the screen that is rendering. Can I scale that point? I have some scaling code but I don't know if it works or not.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I would look into point sprites for this.

Share this post


Link to post
Share on other sites
What is a point sprite? All I want to know is if you can scale just a single point. I am working on a collision class and I want to start from points. I need to know if you can scale it so it would accurately test for collision.

Share this post


Link to post
Share on other sites
erm.... what is a scaled point supposed to be? A point has a size of 0 (as far as I know), so even after scaling it would have a size of 0. The only thing scaling a point would do is move the point away from the origin of your world.... but only if you scale it after transforming it to it´s position.

Share this post


Link to post
Share on other sites
You know a vertex (point) has a size of one pixel. It renders on the screen as one pixel. I render it with a PointList. The scale by default is 1.

Share this post


Link to post
Share on other sites
Point Sprites (google has plentiful information, look up "directx point sprite tutorial") are typically what point lists are used for. They can be scaled. You would specify D3DFVF_PSIZE in your FVF structure. You can then size the point based on your current viewport settings. However, there is usually a max size that can be checked with the D3DCAPS or D3DCAPS2 structure. Once you've read up on them and done some tutorials, I think they might interest you. It just depends on how you do your collision detection.

Chris

Share this post


Link to post
Share on other sites
Well I'm checking to see if a point intersects with another point, line, rect, circle, triangle etc.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!