summaryrefslogtreecommitdiffstats
path: root/src/rw/VisibilityPlugins.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-07-01 18:03:39 +0200
committeraap <aap@papnet.eu>2020-07-01 18:04:02 +0200
commit2141247e0829baec36c9011f0c660ad7d8e40dd8 (patch)
treef413928cb6dd07e5447113cac0b84e32d45b1318 /src/rw/VisibilityPlugins.cpp
parentfix (diff)
downloadre3-2141247e0829baec36c9011f0c660ad7d8e40dd8.tar
re3-2141247e0829baec36c9011f0c660ad7d8e40dd8.tar.gz
re3-2141247e0829baec36c9011f0c660ad7d8e40dd8.tar.bz2
re3-2141247e0829baec36c9011f0c660ad7d8e40dd8.tar.lz
re3-2141247e0829baec36c9011f0c660ad7d8e40dd8.tar.xz
re3-2141247e0829baec36c9011f0c660ad7d8e40dd8.tar.zst
re3-2141247e0829baec36c9011f0c660ad7d8e40dd8.zip
Diffstat (limited to '')
-rw-r--r--src/rw/VisibilityPlugins.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index cff1ff16..25dffb4e 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -626,6 +626,14 @@ CVisibilityPlugins::RenderPedCB(RpAtomic *atomic)
}
float
+CVisibilityPlugins::GetDistanceSquaredFromCamera(RwV3d *pos)
+{
+ RwV3d dist;
+ RwV3dSub(&dist, pos, ms_pCameraPosn);
+ return RwV3dDotProduct(&dist, &dist);
+}
+
+float
CVisibilityPlugins::GetDistanceSquaredFromCamera(RwFrame *frame)
{
RwMatrix *m;