Click here to Skip to main content
15,917,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: a threading question Pin
ns15-Jul-04 3:59
ns15-Jul-04 3:59 
GeneralRe: a threading question Pin
V.15-Jul-04 4:13
professionalV.15-Jul-04 4:13 
GeneralRe: a threading question Pin
David Crow15-Jul-04 4:19
David Crow15-Jul-04 4:19 
GeneralRe: a threading question Pin
ns15-Jul-04 6:31
ns15-Jul-04 6:31 
GeneralCSplitterWnd inside another Pin
John Oliver15-Jul-04 1:50
John Oliver15-Jul-04 1:50 
GeneralRe: CSplitterWnd inside another Pin
John Oliver15-Jul-04 2:11
John Oliver15-Jul-04 2:11 
GeneralMath “expert” wanted… Algorithm for finding line of two crossing areas Pin
anderslundsgard15-Jul-04 1:46
anderslundsgard15-Jul-04 1:46 
GeneralRe: Math “expert” wanted… Algorithm for finding line of two crossing areas Pin
vmaltsev15-Jul-04 3:25
vmaltsev15-Jul-04 3:25 
Well, hail there again.
Why don't you stick to one thread?
Anyway, you sholdn't be a math "expert" to solve this one, but you have to know basics of geometry at least.
I'll give you solution for intersection bitween line and plane, the rest you can do yourself.
We have three points and a normal vector (N). The equation of a plane is Ax+By+Cz+D=0.
We have two points P1 and P2. The equation of a line is P(t)=P1+t*Pd where Pd=(P2-P1), t>0.
To determine if there is an intersection with the plane, substitute for P(t) into the plane equation and get A(P1x+t*Pdx)+B(P1y+t*Pdy)+C(P1z+t*Pdz)+D=0, which yields t = -(Dot(N,P1)+D)/Dot(N,Pd). Now find divisor Vd=Dot(N, Pd), if Vd=0 then the line is parallel to the plane and if Vd>0 then the normal N of the plane is pointing away from the ray (that can be useful for one-sided faces). Now we can find t, if t<0 then the line intersects the plane behind origin, i.e. no intersection of interest, otherwise we can put t in the equation of a line to find intersection point.

Enjoy.
GeneralRe: Math &#8220;expert&#8221; wanted&#8230; Algorithm for finding line of two crossing areas Pin
anderslundsgard15-Jul-04 3:40
anderslundsgard15-Jul-04 3:40 
Questionhow to extract non ascii charachters from a text. Pin
ananttrivedi15-Jul-04 1:20
ananttrivedi15-Jul-04 1:20 
AnswerRe: how to extract non ascii charachters from a text. Pin
vmaltsev15-Jul-04 12:01
vmaltsev15-Jul-04 12:01 
QuestionHow to Enumerate threads in Process? Pin
vgrigor115-Jul-04 1:18
vgrigor115-Jul-04 1:18 
AnswerRe: How to Enumerate threads in Process? Pin
ThatsAlok15-Jul-04 1:55
ThatsAlok15-Jul-04 1:55 
AnswerRe: How to Enumerate threads in Process? Pin
David Crow15-Jul-04 4:22
David Crow15-Jul-04 4:22 
QuestionHow to make screenShot to file? Pin
vgrigor115-Jul-04 1:15
vgrigor115-Jul-04 1:15 
AnswerRe: How to make screenShot to file? Pin
ThatsAlok15-Jul-04 1:38
ThatsAlok15-Jul-04 1:38 
GeneralRe: How to make screenShot to file? Pin
vgrigor115-Jul-04 1:58
vgrigor115-Jul-04 1:58 
GeneralLoad Bitmap from a specified path Pin
S.DARWIN PAUL RAJ15-Jul-04 0:57
S.DARWIN PAUL RAJ15-Jul-04 0:57 
GeneralRe: Load Bitmap from a specified path Pin
ThatsAlok15-Jul-04 1:12
ThatsAlok15-Jul-04 1:12 
GeneralRe: Load Bitmap from a specified path Pin
David Crow15-Jul-04 4:03
David Crow15-Jul-04 4:03 
GeneralRe: Load Bitmap from a specified path Pin
S.DARWIN PAUL RAJ15-Jul-04 15:08
S.DARWIN PAUL RAJ15-Jul-04 15:08 
GeneralCEdit text justification using ModifyStyle Pin
srev15-Jul-04 0:56
srev15-Jul-04 0:56 
GeneralRe: CEdit text justification using ModifyStyle Pin
David Crow15-Jul-04 4:06
David Crow15-Jul-04 4:06 
GeneralEvents from the back/forward buttons in a 5-button mouse Pin
Franc Morales15-Jul-04 0:51
Franc Morales15-Jul-04 0:51 
GeneralDoes anyone has experiences on processing gigabyte image with C++ Pin
swandream15-Jul-04 0:30
swandream15-Jul-04 0:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.