游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1548|回复: 2

clip 的问题

[复制链接]

9

主题

21

帖子

23

积分

注册会员

Rank: 2

积分
23
发表于 2008-2-21 21:33:00 | 显示全部楼层 |阅读模式
        pd3dDevice->SetClipPlane(0, (float*)f);              //clip by plane
        pd3dDevice->SetRenderState(D3DRS_CLIPPLANEENABLE, 1);

A point with homogeneous coordinates (x, y, z, w) is visible in the half space of the plane if Ax + By + Cz + Dw >= 0. Points that exist behind the clipping plane are clipped from the scene.

就是裁剪面上面的点会显示,下面的点被拆掉。

我想要相反的效果怎么作呢?
比如我要保留 y=0 平面以下的点,裁掉以上的点,这个状态怎么设呢?

11

主题

27

帖子

27

积分

注册会员

Rank: 2

积分
27
发表于 2008-2-22 21:29:00 | 显示全部楼层

Re:clip 的问题

改变平面的法向量方向
例如y=0 平面的法向量本来是向上,你改成向下的不就行了

9

主题

21

帖子

23

积分

注册会员

Rank: 2

积分
23
 楼主| 发表于 2008-2-25 09:04:00 | 显示全部楼层

Re:clip 的问题

0_0
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-20 09:23

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表