Browse Source

creating a portal mask for portal culling

Asad M. Zaman 21 years ago
parent
commit
387e2e8131
2 changed files with 38 additions and 1 deletions
  1. 2 1
      panda/src/putil/Sources.pp
  2. 36 0
      panda/src/putil/portalMask.h

+ 2 - 1
panda/src/putil/Sources.pp

@@ -14,6 +14,7 @@
     buttonHandle.I \
     buttonHandle.h buttonRegistry.I buttonRegistry.h \
     collideMask.h \
+    portalMask.h \
     compareTo.I compareTo.h \
     config_util.N config_util.h configurable.h \
     cycleData.h cycleData.I \
@@ -82,7 +83,7 @@
     bam.h bamReader.I bamReader.h bamReaderParam.I bamReaderParam.h \
     bamWriter.I bamWriter.h bitMask.I bitMask.h \
     buttonHandle.I buttonHandle.h buttonRegistry.I \
-    buttonRegistry.h collideMask.h \
+    buttonRegistry.h collideMask.h portalMask.h \
     compareTo.I compareTo.h \
     config_util.h configurable.h factory.I factory.h \
     cycleData.h cycleData.I \

+ 36 - 0
panda/src/putil/portalMask.h

@@ -0,0 +1,36 @@
+// Filename: portalMask.h
+// Created by:  masad (13May04)
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001 - 2004, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://etc.cmu.edu/panda3d/docs/license/ .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+#ifndef PORTALMASK_H
+#define PORTALMASK_H
+
+#include "pandabase.h"
+
+#include "bitMask.h"
+
+// This is the data type of the collision mask: the set of bits that
+// every CollisionNode has, and that any two nodes must have some in
+// common in order to be tested for a mutual intersection.
+
+// This file is templated from collideMask.h, hence it is here
+
+
+typedef BitMask32 PortalMask;
+
+#endif
+