X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FQuaternions.cpp;h=ff1ad7116b90ba2e73561d65047e53854db5de74;hb=47bd467205c41f5c993fb9d3f2b31338989c641c;hp=c5f75456c70488fd11cc27904f5d62ddf8f26a62;hpb=8e94b0e0f79e8fc55ace5699ffe039462d9e155d;p=lugaru.git diff --git a/Source/Quaternions.cpp b/Source/Quaternions.cpp index c5f7545..ff1ad71 100644 --- a/Source/Quaternions.cpp +++ b/Source/Quaternions.cpp @@ -1,22 +1,21 @@ /* Copyright (C) 2003, 2010 - Wolfire Games +Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. -Lugaru is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. +Lugaru is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -This program is distributed in the hope that it will be useful, +Lugaru is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +along with Lugaru. If not, see . */ #include "Quaternions.h" @@ -281,7 +280,7 @@ bool LineFacet(Vector p1, Vector p2, Vector pa, Vector pb, Vector pc, Vector *p) { static float d; static float denom, mu; - static Vector n, pa1, pa2, pa3; + static Vector n; //Calculate the parameters for the plane n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y); @@ -393,7 +392,7 @@ bool LineFacet(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ *p) { static float d; static float denom, mu; - static XYZ n, pa1, pa2, pa3; + static XYZ n; //Calculate the parameters for the plane n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y); @@ -424,7 +423,7 @@ float LineFacetd(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ *p) { static float d; static float denom, mu; - static XYZ n, pa1, pa2, pa3; + static XYZ n; //Calculate the parameters for the plane n.x = (pb.y - pa.y) * (pc.z - pa.z) - (pb.z - pa.z) * (pc.y - pa.y); @@ -455,7 +454,6 @@ float LineFacetd(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ n, XYZ *p) { static float d; static float denom, mu; - static XYZ pa1, pa2, pa3; //Calculate the parameters for the plane d = - n.x * pa.x - n.y * pa.y - n.z * pa.z; @@ -481,7 +479,7 @@ float LineFacetd(XYZ *p1, XYZ *p2, XYZ *pa, XYZ *pb, XYZ *pc, XYZ *p) { static float d; static float denom, mu; - static XYZ pa1, pa2, pa3, n; + static XYZ n; //Calculate the parameters for the plane n.x = (pb->y - pa->y) * (pc->z - pa->z) - (pb->z - pa->z) * (pc->y - pa->y); @@ -512,7 +510,6 @@ float LineFacetd(XYZ *p1, XYZ *p2, XYZ *pa, XYZ *pb, XYZ *pc, XYZ *n, XYZ *p) { static float d; static float denom, mu; - static XYZ pa1, pa2, pa3; //Calculate the parameters for the plane d = - n->x * pa->x - n->y * pa->y - n->z * pa->z;