Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-09-18 16:39:20 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-09-18 16:39:20 +0400
commit3e0e8aa60eaf1194d1ed30f3984adc03e6e3597c (patch)
treed165e6eff7f6e490047211e3b01258fd414c6bb9 /src/SubPic/CoordGeom.h
parent1fe2425f5a96ca68778e9d2a787979f39b3d956a (diff)
Subtitles, SubPic: applied astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2585 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/SubPic/CoordGeom.h')
-rw-r--r--src/SubPic/CoordGeom.h54
1 files changed, 29 insertions, 25 deletions
diff --git a/src/SubPic/CoordGeom.h b/src/SubPic/CoordGeom.h
index 1e84acfa0..4b2bf9e48 100644
--- a/src/SubPic/CoordGeom.h
+++ b/src/SubPic/CoordGeom.h
@@ -1,17 +1,19 @@
-/*
- * Copyright (C) 2003-2006 Gabest
- * http://www.gabest.org
+/*
+ * $Id$
+ *
+ * (C) 2003-2006 Gabest
+ * (C) 2006-2010 see AUTHORS
*
* This Program 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, or (at your option)
* any later version.
- *
+ *
* This Program 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.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Make; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -19,7 +21,7 @@
*
*/
-#pragma once
+#pragma once
#ifndef PI
#define PI (3.141592654f)
@@ -35,22 +37,24 @@ class Vector
public:
float x, y, z;
- Vector() {x = y = z = 0;}
+ Vector() {
+ x = y = z = 0;
+ }
Vector(float x, float y, float z);
void Set(float x, float y, float z);
Vector Normal(Vector& a, Vector& b);
float Angle(Vector& a, Vector& b);
float Angle(Vector& a);
- void Angle(float& u, float& v); // returns spherical coords in radian, -PI/2 <= u <= PI/2, -PI <= v <= PI
- Vector Angle(); // does like prev., returns 'u' in 'ret.x', and 'v' in 'ret.y'
+ void Angle(float& u, float& v); // returns spherical coords in radian, -PI/2 <= u <= PI/2, -PI <= v <= PI
+ Vector Angle(); // does like prev., returns 'u' in 'ret.x', and 'v' in 'ret.y'
Vector Unit();
Vector& Unitalize();
float Length();
- float Sum(); // x + y + z
- float CrossSum(); // xy + xz + yz
- Vector Cross(); // xy, xz, yz
+ float Sum(); // x + y + z
+ float CrossSum(); // xy + xz + yz
+ Vector Cross(); // xy, xz, yz
Vector Pow(float exp);
Vector& Min(Vector& a);
@@ -64,8 +68,8 @@ public:
Vector operator - ();
float& operator [] (size_t i);
- float operator | (Vector& v); // dot
- Vector operator % (Vector& v); // cross
+ float operator | (Vector& v); // dot
+ Vector operator % (Vector& v); // cross
bool operator == (const Vector& v) const;
bool operator != (const Vector& v) const;
@@ -97,8 +101,8 @@ public:
Ray(Vector& p, Vector& d);
void Set(Vector& p, Vector& d);
- float GetDistanceFrom(Ray& r); // r = plane
- float GetDistanceFrom(Vector& v); // v = point
+ float GetDistanceFrom(Ray& r); // r = plane
+ float GetDistanceFrom(Vector& v); // v = point
Vector operator [] (float t);
};
@@ -126,16 +130,16 @@ public:
void Initalize();
void Initalize(Ray& r, Vector& s, bool isWorldToLocal = true);
- void operator *= (Vector& s); // scale
- void operator += (Vector& t); // translate
- void operator <<= (Vector& r); // rotate
+ void operator *= (Vector& s); // scale
+ void operator += (Vector& t); // translate
+ void operator <<= (Vector& r); // rotate
- void operator /= (Vector& s); // scale
- void operator -= (Vector& t); // translate
- void operator >>= (Vector& r); // rotate
+ void operator /= (Vector& s); // scale
+ void operator -= (Vector& t); // translate
+ void operator >>= (Vector& r); // rotate
// transformations
- Vector operator < (Vector& n); // normal
- Vector operator << (Vector& v); // vector
- Ray operator << (Ray& r); // ray
+ Vector operator < (Vector& n); // normal
+ Vector operator << (Vector& v); // vector
+ Ray operator << (Ray& r); // ray
};