~ubuntu-branches/debian/sid/coin2/sid

« back to all changes in this revision

Viewing changes to src/base/SbPlane.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-06-28 02:38:17 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080628023817-lgrh0u677j1gcqgf
Tags: 2.5.0-2
* debian/control: Change suggests from libopenal0 to libopenal0a.
  Closes: #488001.  Change ${Source-Version} to ${binary:Version}.
  Update to standards version 3.8.0.

* debian/rules: Do not ignore errors in clean rule.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**************************************************************************\
2
2
 *
3
3
 *  This file is part of the Coin 3D visualization library.
4
 
 *  Copyright (C) 1998-2006 by Systems in Motion.  All rights reserved.
 
4
 *  Copyright (C) 1998-2007 by Systems in Motion.  All rights reserved.
5
5
 *
6
6
 *  This library is free software; you can redistribute it and/or
7
7
 *  modify it under the terms of the GNU General Public License
228
228
SbBool
229
229
SbPlane::isInHalfSpace(const SbVec3f& point) const
230
230
{
231
 
  // This one is dead easy, we just take the dot product of the normal
232
 
  // vector and the vector going from the plane base point to the
233
 
  // point we're checking against, and see if the angle between the
234
 
  // vectors are within 90� (which is the same as checking the sign
235
 
  // of the dot product).
236
 
  //                                                    19980816 mortene.
237
 
#if 0 // not very efficient code, disabled 19991012 pederb
238
 
  SbVec3f pointToPlaneBase = point - (this->normal * this->distance);
239
 
  float dotWithNormal = this->normal.dot(pointToPlaneBase);
240
 
  if(dotWithNormal >= 0.0f) return TRUE;
241
 
  return FALSE;
242
 
#else // this code uses distance to plane instead
243
231
  return this->getDistance(point) >= 0.0f;
244
 
#endif // new code
245
232
}
246
233
 
247
234
/*!