mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-04 02:54:08 +02:00
more object convert work
This commit is contained in:
parent
88c6afce95
commit
bdaa8fe6bc
3 changed files with 56 additions and 44 deletions
21
src/lib.rs
21
src/lib.rs
|
|
@ -1,5 +1,5 @@
|
|||
mod bspfile;
|
||||
mod data;
|
||||
pub mod data;
|
||||
mod reader;
|
||||
|
||||
use crate::bspfile::LumpType;
|
||||
|
|
@ -371,6 +371,25 @@ impl<'a> Handle<'a, Face> {
|
|||
EdgeDirection::LastToFirst => edge.end_index,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn is_visible(&self) -> bool {
|
||||
self.texture()
|
||||
.map(|texture| {
|
||||
!texture.flags.intersects(
|
||||
TextureFlags::LIGHT
|
||||
| TextureFlags::SKY2D
|
||||
| TextureFlags::SKY
|
||||
| TextureFlags::WARP
|
||||
| TextureFlags::TRANS
|
||||
| TextureFlags::TRIGGER
|
||||
| TextureFlags::HINT
|
||||
| TextureFlags::SKIP
|
||||
| TextureFlags::NODRAW
|
||||
| TextureFlags::HITBOX,
|
||||
)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
impl Handle<'_, Node> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue