# D3DXPLANE question

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

## Recommended Posts

quick question: the a,b,c values of a D3DXPLANE are its normal, i got that. but I don't quite understand the d value, which I've read is its distance from the origin.. is that its distance from the origin in the direction of its normal? So if I declare a plane: D3DXPLANE plane=D3DXPLANE(0.0f, 1.0f, 0.0f, 100.0f); would that plane have the position (0,100,0)? (though I know planes don't have a position, just theoretically speaking...)

##### Share on other sites
When a plane is expressed as:

ax+by+cz = d

Or more commonly:

p.n = d

Then d can be viewed as the distance from the origin to the plane, in the direction of the plane normal.

We can also write the equation as ax+by+cz+d = 0, but note that this d is the negative of the d in the first equation. So with this form, -d is the distance to the plane along the normal.

Note that if the plane is not normalized, these distances are scaled by |n|.

In your example, the point (0,-100,0) would be on the plane, which we can show by plugging it into the equation:

0*0-1*100+0*0+100 = -100+100 = 0

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633295
• Total Posts
3011245
• ### Who's Online (See full list)

There are no registered users currently online

×