Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vertices or pixel counter function in DX8??

This topic is 5126 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

IS there any function in directX8 in which suppose if i give first pixel/vertex number and then second pixel/vertex, in return i''ll get the array of all vertices/pixels who are between them. I know i can make this function by my self but it would be so slow so i am wondering if directx8 has this utility function or not? Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Actully no i am not asking for line stuff, i am asking if there is any kind of function which can tell how many points comes between 2 points ...
suppose if i have two point on a screen
1)point1 (x1,y1,z1)
2)point2 (x10,y10,z10)

now between these points there would be a big distance , just i want the middle points of array between them....for sure distance between them have different point as well

point1 (-------------------------------) point2
i want these points between them

is there any function which can perform this calculation , i dont wana make mine cuz it would be slow.


Share this post


Link to post
Share on other sites
The only function I can immediately think of (for finding points between two endpoints) is the D3DXVec3Lerp function. It will perform the interpolation for you and you will have to store the intermediary values in an array yourself. Alternatively you could write your own interpolation routine (which I believe you don''t want to do!) The parameters (and more information) for the D3DXVec3Lerp function are in the SDK documentation. I hope this helps...

---
< SharkyUK.com & Sharky''s Coding Corner >
< Professional Engine Programmer - Strangelite Studio >
---

Share this post


Link to post
Share on other sites
Hmmm,

I am not sure if this helps, but you could move Point1 to the origin and get a direction vector pointing to point 2 starting at point 1. Then you could go in that direction by a unitized amount.

PointBetween = Point1 + Direction*UnitValue;

Unit value could be obtained by the smallest number
your willing to use. For example. If you willing to do 1,000 operations:

UnitValue = Distance between points/1000


But I think there are nearly infinite amounts of "points". I think it is best to compute UnitValue based on the number of iterations you are willing to do.

2 points miles away polling at the resolution of millimeters would be horribly slow I think



quote:
Original post by farhanx
Actully no i am not asking for line stuff, i am asking if there is any kind of function which can tell how many points comes between 2 points ...
suppose if i have two point on a screen
1)point1 (x1,y1,z1)
2)point2 (x10,y10,z10)

now between these points there would be a big distance , just i want the middle points of array between them....for sure distance between them have different point as well

point1 (-------------------------------) point2
i want these points between them

is there any function which can perform this calculation , i dont wana make mine cuz it would be slow.





Share this post


Link to post
Share on other sites

  • 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!