Updated libarea with changes from Heeks/libarea
This commit is contained in:
@@ -1,36 +1,12 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 3d geometry classes - implements some 3d stuff
|
||||
//
|
||||
// g.j.hawkesford August 2003
|
||||
//
|
||||
// This program is released under the BSD license. See the file COPYING for details.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*==============================
|
||||
Copyright (c) 2006 g.j.hawkesford
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
==============================*/
|
||||
|
||||
|
||||
#include "geometry.h"
|
||||
using namespace geoff_geometry;
|
||||
|
||||
@@ -418,7 +394,7 @@ namespace geoff_geometry {
|
||||
}
|
||||
|
||||
// divide columns by minus pivot (value of pivot element is contained in biga)
|
||||
if ( fabs ( biga ) < 1.0e-10 )FAILURE(getMessage(L"Singular Matrix - Inversion failure",GEOMETRY_ERROR_MESSAGES, -1)); // singular matrix
|
||||
if ( fabs ( biga ) < 1.0e-10 )FAILURE(getMessage(L"Singular Matrix - Inversion failure")); // singular matrix
|
||||
|
||||
for ( i = 0 ; i < n ; i++ ) {
|
||||
if ( i != k ) {
|
||||
@@ -622,7 +598,7 @@ namespace geoff_geometry {
|
||||
void Plane::Mirrored(Matrix* tmMirrored) {
|
||||
// calculates a mirror transformation that mirrors 2d about plane
|
||||
|
||||
//Point3d p1 = this->Near(Point3d(0.,0.,0.));
|
||||
Point3d p1 = this->Near(Point3d(0.,0.,0.));
|
||||
if(tmMirrored->m_unit == false) tmMirrored->Unit();
|
||||
|
||||
double nx = this->normal.getx();
|
||||
|
||||
Reference in New Issue
Block a user