Loading...
Searching...
No Matches
Vector3.hpp
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#ifndef SFML_VECTOR3_HPP
26#define SFML_VECTOR3_HPP
27
28
29namespace sf
30{
36template <typename T>
38{
39public :
40
46
55 Vector3(T X, T Y, T Z);
56
58 // Member data
60 T x;
61 T y;
62 T z;
63};
64
73template <typename T>
75
85template <typename T>
87
97template <typename T>
99
109template <typename T>
111
121template <typename T>
123
133template <typename T>
135
145template <typename T>
147
157template <typename T>
159
169template <typename T>
171
181template <typename T>
183
193template <typename T>
194bool operator ==(const Vector3<T>& V1, const Vector3<T>& V2);
195
205template <typename T>
206bool operator !=(const Vector3<T>& V1, const Vector3<T>& V2);
207
208#include <SFML/System/Vector3.inl>
209
210// Define the most common types
213
214} // namespace sf
215
216
217#endif // SFML_VECTOR3_HPP
Vector3 is an utility class for manipulating 3 dimensional vectors.
Definition Vector3.hpp:38
Vector3(T X, T Y, T Z)
Construct the vector from its coordinates.
Vector3()
Default constructor.
bool operator==(const Vector2< T > &V1, const Vector2< T > &V2)
Operator == overload ; compares the equality of two vectors.
Color operator*(const Color &Color1, const Color &Color2)
Operator * overload to modulate two colors.
Vector2< T > & operator/=(Vector2< T > &V, T X)
Operator /= overload ; divide-assign a vector by a scalar value.
Color operator+(const Color &Color1, const Color &Color2)
Operator + overload to add two colors.
Vector2< T > operator-(const Vector2< T > &V)
Operator - overload ; returns the opposite of a vector.
Vector2< T > & operator*=(Vector2< T > &V, T X)
Operator *= overload ; multiply-assign a vector by a scalar value.
Vector2< T > operator/(const Vector2< T > &V, T X)
Operator / overload ; divide a vector by a scalar value.
Vector2< T > & operator+=(Vector2< T > &V1, const Vector2< T > &V2)
Operator += overload ; add two vectors and assign to the first op.
bool operator!=(const Vector2< T > &V1, const Vector2< T > &V2)
Operator != overload ; compares the difference of two vectors.
Vector3< int > Vector3i
Definition Vector3.hpp:211
Vector2< T > & operator-=(Vector2< T > &V1, const Vector2< T > &V2)
Operator -= overload ; subtract two vectors and assign to the first op.
Vector3< float > Vector3f
Definition Vector3.hpp:212