Skip to main content
GameDev.net gamedev.net
🔒 Locked

Clipping Plane

Started by noaktree Aug 7, 2005 at 12:36 AM 3 replies 2.9k views
Original Post
noaktree
noaktree
I want to clip everything under Position(0, 25, 0) with DirectX 9c.
  • How do I create a user defined clipping plane to do this?
  • The clipping plane is flat along x and z. Normal(0, 1, 0)
  • The clipping plane can be moved up and down along the y axis. Position(0, ?, 0)
game development is liek a state of mind man.. it's liek when you liek... think... and then you liek make it fun++

- Yes I'm drunk.
Mezz
Mezz
Is IDirect3DDevice9::SetClipPlane() what you want? You just need to create the plane equation and pass it in, the docs explain it pretty well.

-Mezz
Muhammad Haggag
Muhammad Haggag
Use D3DXPlaneFromPointNormal to create the plane, SetClipPlane, then SetRenderState(D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0)

noaktree
noaktree
Quote:
Is IDirect3DDevice9::SetClipPlane() what you want? You just need to create the plane equation and pass it in, the docs explain it pretty well.
Yes this is what I need. Just couldn't figure out what function to create the plane equation with.
Quote:
Use D3DXPlaneFromPointNormal to create the plane, SetClipPlane, then SetRenderState(D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0)
Thanks again Muhammad! [smile] I feel like a "retard" having never done this before. Oh well...Ask and learn. This thing won't let me rate you any higher. [sad]
game development is liek a state of mind man.. it's liek when you liek... think... and then you liek make it fun++

- Yes I'm drunk.
Mezz
Mezz
I'll rate him for you then (can't believe I hadn't already heh).

-Mezz

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.