El Octavio  1.0
This is a video game about adventures.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Vector3.hpp
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
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
48
57 Vector3(T X, T Y, T Z);
58
70 template <typename U>
71 explicit Vector3(const Vector3<U>& vector);
72
74 // Member data
76 T x;
77 T y;
78 T z;
79};
80
90template <typename T>
92
106template <typename T>
108
122template <typename T>
124
135template <typename T>
136Vector3<T> operator +(const Vector3<T>& left, const Vector3<T>& right);
137
148template <typename T>
149Vector3<T> operator -(const Vector3<T>& left, const Vector3<T>& right);
150
161template <typename T>
162Vector3<T> operator *(const Vector3<T>& left, T right);
163
174template <typename T>
175Vector3<T> operator *(T left, const Vector3<T>& right);
176
190template <typename T>
192
203template <typename T>
204Vector3<T> operator /(const Vector3<T>& left, T right);
205
219template <typename T>
221
234template <typename T>
235bool operator ==(const Vector3<T>& left, const Vector3<T>& right);
236
249template <typename T>
250bool operator !=(const Vector3<T>& left, const Vector3<T>& right);
251
253
254// Define the most common types
257
258} // namespace sf
259
260
261#endif // SFML_VECTOR3_HPP
262
263
Vector2< T > & operator-=(Vector2< T > &left, const Vector2< T > &right)
Definition: Vector2.inl:77
Vector2< T > operator-(const Vector2< T > &right)
Definition: Vector2.inl:58
Vector2< T > operator*(const Vector2< T > &left, T right)
Definition: Vector2.inl:104
Vector2< T > operator+(const Vector2< T > &left, const Vector2< T > &right)
Definition: Vector2.inl:88
Vector2< T > operator/(const Vector2< T > &left, T right)
Definition: Vector2.inl:131
Vector2< T > & operator*=(Vector2< T > &left, T right)
Definition: Vector2.inl:120
Vector2< T > & operator/=(Vector2< T > &left, T right)
Definition: Vector2.inl:139
Vector2< T > & operator+=(Vector2< T > &left, const Vector2< T > &right)
Definition: Vector2.inl:66
Utility template class for manipulating 3-dimensional vectors.
Definition: Vector3.hpp:38
T z
Z coordinate of the vector.
Definition: Vector3.hpp:78
T x
X coordinate of the vector.
Definition: Vector3.hpp:76
T y
Y coordinate of the vector.
Definition: Vector3.hpp:77
Vector3(T X, T Y, T Z)
Construct the vector from its coordinates.
Vector3(const Vector3< U > &vector)
Construct the vector from another type of vector.
Vector3()
Default constructor.
SFML_NETWORK_API bool operator==(const IpAddress &left, const IpAddress &right)
Overload of == operator to compare two IP addresses.
Vector3< int > Vector3i
Definition: Vector3.hpp:255
SFML_NETWORK_API bool operator!=(const IpAddress &left, const IpAddress &right)
Overload of != operator to compare two IP addresses.
Vector3< float > Vector3f
Definition: Vector3.hpp:256