~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/include/osg/Plane

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-07-29 04:34:38 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080729043438-no1h9h0dpsrlzp1y
* Non-maintainer upload.
* No longer try to detect (using /proc/cpuinfo when available) how many
  CPUs are available, fixing the FTBFS (due to -j0) on various platforms
  (Closes: #477353). The right way to do it is to support parallel=n in
  DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
  been implemented.
* Add patch to fix FTBFS due to the build system now refusing to handle
  whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
  provided it (Closes: #482239):
   - debian/patches/fix-cmp0004-build-failure.dpatch
* Remove myself from Uploaders, as requested a while ago, done by Luk in
  his 2.2.0-2.1 NMU, which was never acknowledged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
            return 1 if the bs is completely above plane,
190
190
            return 0 if the bs intersects the plane,
191
191
            return -1 if the bs is completely below the plane.*/
192
 
        inline int intersect(const std::vector<Vec3>& vertices) const
 
192
        inline int intersect(const std::vector<Vec3f>& vertices) const
193
193
        {
194
194
            if (vertices.empty()) return -1;
195
195
 
196
196
            int noAbove = 0;
197
197
            int noBelow = 0;
198
198
            int noOn = 0;
199
 
            for(std::vector<Vec3>::const_iterator itr=vertices.begin();
 
199
            for(std::vector<Vec3f>::const_iterator itr=vertices.begin();
200
200
                itr != vertices.end();
201
201
                ++itr)
202
202
            {
229
229
                itr != vertices.end();
230
230
                ++itr)
231
231
            {
232
 
                float d = distance(*itr);
233
 
                if (d>0.0f) ++noAbove;
234
 
                else if (d<0.0f) ++noBelow;
 
232
                double d = distance(*itr);
 
233
                if (d>0.0) ++noAbove;
 
234
                else if (d<0.0) ++noBelow;
235
235
                else ++noOn;
236
236
            }
237
237
 
301
301
 
302
302
    protected:
303
303
 
304
 
        /** Vec member varaible. */
 
304
        /** Vec member variable. */
305
305
        value_type _fv[4];
306
306
 
307
307
        // variables cached to optimize calcs against bounding boxes.