Loading...
Searching...
No Matches
sf Namespace Reference

Namespaces

namespace  Style

Classes

class  CircleShape
 Specialized shape representing a circle. More...
class  Clock
 Utility class that measures the elapsed time. More...
class  Color
 Utility class for manpulating RGBA colors. More...
class  Context
 Class holding a valid drawing context. More...
class  ContextSettings
 Structure defining the settings of the OpenGL context attached to a window. More...
class  ConvexShape
 Specialized shape representing a convex polygon. More...
class  Drawable
 Abstract base class for objects that can be drawn to a render target. More...
class  Event
 Defines a system event and its parameters. More...
class  Font
 Class for loading and manipulating character fonts. More...
class  Ftp
 A FTP client. More...
class  GlResource
 Base class for classes that require an OpenGL context. More...
class  Glyph
 Structure describing a glyph. More...
class  Http
 A HTTP client. More...
class  Image
 Class for loading, manipulating and saving images. More...
class  InputStream
 Abstract class for custom file input streams. More...
class  IpAddress
 Encapsulate an IPv4 network address. More...
class  Joystick
 Give access to the real-time state of the joysticks. More...
class  Keyboard
 Give access to the real-time state of the keyboard. More...
class  Listener
 The audio listener is the point in the scene from where all the sounds are heard. More...
class  Lock
 Automatic wrapper for locking and unlocking mutexes. More...
class  Mouse
 Give access to the real-time state of the mouse. More...
class  Music
 Streamed music played from an audio file. More...
class  Mutex
 Blocks concurrent access to shared resources from multiple threads. More...
class  NonCopyable
 Utility class that makes any derived class non-copyable. More...
class  Packet
 Utility class to build blocks of data to transfer over the network. More...
class  Rect
 Utility class for manipulating 2D axis aligned rectangles. More...
class  RectangleShape
 Specialized shape representing a rectangle. More...
class  RenderStates
 Define the states used for drawing to a RenderTarget. More...
class  RenderTarget
 Base class for all render targets (window, texture, ...). More...
class  RenderTexture
 Target for off-screen 2D rendering into a texture. More...
class  RenderWindow
 Window that can serve as a target for 2D drawing. More...
class  Shader
 Shader class (vertex and fragment). More...
class  Shape
 Base class for textured shapes with outline. More...
class  Socket
 Base class for all the socket types. More...
class  SocketSelector
 Multiplexer that allows to read from multiple sockets. More...
class  Sound
 Regular sound that can be played in the audio environment. More...
class  SoundBuffer
 Storage for audio samples defining a sound. More...
class  SoundBufferRecorder
 Specialized SoundRecorder which stores the captured audio data into a sound buffer. More...
class  SoundRecorder
 Abstract base class for capturing sound data. More...
class  SoundSource
 Base class defining a sound's properties. More...
class  SoundStream
 Abstract base class for streamed audio sources. More...
class  Sprite
 Drawable representation of a texture, with its own transformations, color, etc. More...
class  String
 Utility string class that automatically handles conversions between types and encodings. More...
class  TcpListener
 Socket that listens to new TCP connections. More...
class  TcpSocket
 Specialized socket using the TCP protocol. More...
class  Text
 Graphical text that can be drawn to a render target. More...
class  Texture
 Image living on the graphics card that can be used for drawing. More...
class  Thread
 Utility class to manipulate threads. More...
class  ThreadLocal
 Defines variables with thread-local storage. More...
class  ThreadLocalPtr
 Pointer to a thread-local variable. More...
class  Time
 Represents a time value. More...
class  Transform
 Define a 3x3 transform matrix. More...
class  Transformable
 Decomposed transform defined by a position, a rotation and a scale. More...
class  UdpSocket
 Specialized socket using the UDP protocol. More...
class  Utf
 Utility class providing generic functions for UTF conversions. More...
class  Utf< 16 >
 Specialization of the Utf template for UTF-16. More...
class  Utf< 32 >
 Specialization of the Utf template for UTF-32. More...
class  Utf< 8 >
 Specialization of the Utf template for UTF-8. More...
class  Vector2
 Utility template class for manipulating 2-dimensional vectors. More...
class  Vector3
 Utility template class for manipulating 3-dimensional vectors. More...
class  Vertex
 Define a point with color and texture coordinates. More...
class  VertexArray
 Define a set of one or more 2D primitives. More...
class  VideoMode
 VideoMode defines a video mode (width, height, bpp). More...
class  View
 2D camera that defines what region is shown on screen More...
class  Window
 Window that serves as a target for OpenGL rendering. More...

Typedefs

typedef signed char Int8
typedef unsigned char Uint8
typedef signed short Int16
typedef unsigned short Uint16
typedef signed int Int32
typedef unsigned int Uint32
typedef signed long long Int64
typedef unsigned long long Uint64
typedef Rect< int > IntRect
typedef Rect< float > FloatRect
typedef int SocketHandle
typedef Utf< 8 > Utf8
typedef Utf< 16 > Utf16
typedef Utf< 32 > Utf32
typedef Vector2< int > Vector2i
typedef Vector2< unsigned int > Vector2u
typedef Vector2< float > Vector2f
typedef Vector3< int > Vector3i
typedef Vector3< float > Vector3f

Enumerations

enum  BlendMode { BlendAlpha , BlendAdd , BlendMultiply , BlendNone }
 Available blending modes for drawing. More...
enum  PrimitiveType {
  Points , Lines , LinesStrip , Triangles ,
  TrianglesStrip , TrianglesFan , Quads
}
 Types of primitives that a sf::VertexArray can render. More...

Functions

bool operator== (const IpAddress &left, const IpAddress &right)
 Overload of == operator to compare two IP addresses.
bool operator!= (const IpAddress &left, const IpAddress &right)
 Overload of != operator to compare two IP addresses.
bool operator< (const IpAddress &left, const IpAddress &right)
 Overload of < operator to compare two IP addresses.
bool operator> (const IpAddress &left, const IpAddress &right)
 Overload of > operator to compare two IP addresses.
bool operator<= (const IpAddress &left, const IpAddress &right)
 Overload of <= operator to compare two IP addresses.
bool operator>= (const IpAddress &left, const IpAddress &right)
 Overload of >= operator to compare two IP addresses.
std::istream & operator>> (std::istream &stream, IpAddress &address)
 Overload of >> operator to extract an IP address from an input stream.
std::ostream & operator<< (std::ostream &stream, const IpAddress &address)
 Overload of << operator to print an IP address to an output stream.
std::ostream & err ()
 Standard stream used by SFML to output warnings and errors.
void sleep (Time duration)
 Make the current thread sleep for a given duration.
bool operator== (const Color &left, const Color &right)
 Overload of the == operator.
bool operator!= (const Color &left, const Color &right)
 Overload of the != operator.
Color operator+ (const Color &left, const Color &right)
 Overload of the binary + operator.
Color operator* (const Color &left, const Color &right)
 Overload of the binary * operator.
Color & operator+= (Color &left, const Color &right)
 Overload of the binary += operator.
Color & operator*= (Color &left, const Color &right)
 Overload of the binary *= operator.
template<typename T>
bool operator== (const Rect< T > &left, const Rect< T > &right)
 Overload of binary operator ==.
template<typename T>
bool operator!= (const Rect< T > &left, const Rect< T > &right)
 Overload of binary operator !=.
Transform operator* (const Transform &left, const Transform &right)
 Overload of binary operator * to combine two transforms.
Transform & operator*= (Transform &left, const Transform &right)
 Overload of binary operator *= to combine two transforms.
Vector2f operator* (const Transform &left, const Vector2f &right)
 Overload of binary operator * to transform a point.
bool operator== (const String &left, const String &right)
 Overload of == operator to compare two UTF-32 strings.
bool operator!= (const String &left, const String &right)
 Overload of != operator to compare two UTF-32 strings.
bool operator< (const String &left, const String &right)
 Overload of < operator to compare two UTF-32 strings.
bool operator> (const String &left, const String &right)
 Overload of > operator to compare two UTF-32 strings.
bool operator<= (const String &left, const String &right)
 Overload of <= operator to compare two UTF-32 strings.
bool operator>= (const String &left, const String &right)
 Overload of >= operator to compare two UTF-32 strings.
String operator+ (const String &left, const String &right)
 Overload of binary + operator to concatenate two strings.
Time seconds (float amount)
 Construct a time value from a number of seconds.
Time milliseconds (Int32 amount)
 Construct a time value from a number of milliseconds.
Time microseconds (Int64 amount)
 Construct a time value from a number of microseconds.
bool operator== (Time left, Time right)
 Overload of == operator to compare two time values.
bool operator!= (Time left, Time right)
 Overload of != operator to compare two time values.
bool operator< (Time left, Time right)
 Overload of < operator to compare two time values.
bool operator> (Time left, Time right)
 Overload of > operator to compare two time values.
bool operator<= (Time left, Time right)
 Overload of <= operator to compare two time values.
bool operator>= (Time left, Time right)
 Overload of >= operator to compare two time values.
Time operator- (Time right)
 Overload of unary - operator to negate a time value.
Time operator+ (Time left, Time right)
 Overload of binary + operator to add two time values.
Time & operator+= (Time &left, Time right)
 Overload of binary += operator to add/assign two time values.
Time operator- (Time left, Time right)
 Overload of binary - operator to subtract two time values.
Time & operator-= (Time &left, Time right)
 Overload of binary -= operator to subtract/assign two time values.
Time operator* (Time left, float right)
 Overload of binary * operator to scale a time value.
Time operator* (Time left, Int64 right)
 Overload of binary * operator to scale a time value.
Time operator* (float left, Time right)
 Overload of binary * operator to scale a time value.
Time operator* (Int64 left, Time right)
 Overload of binary * operator to scale a time value.
Time & operator*= (Time &left, float right)
 Overload of binary *= operator to scale/assign a time value.
Time & operator*= (Time &left, Int64 right)
 Overload of binary *= operator to scale/assign a time value.
Time operator/ (Time left, float right)
 Overload of binary / operator to scale a time value.
Time operator/ (Time left, Int64 right)
 Overload of binary / operator to scale a time value.
Time & operator/= (Time &left, float right)
 Overload of binary /= operator to scale/assign a time value.
Time & operator/= (Time &left, Int64 right)
 Overload of binary /= operator to scale/assign a time value.
template<typename T>
Vector2< T > operator- (const Vector2< T > &right)
 Overload of unary operator -.
template<typename T>
Vector2< T > & operator+= (Vector2< T > &left, const Vector2< T > &right)
 Overload of binary operator +=.
template<typename T>
Vector2< T > & operator-= (Vector2< T > &left, const Vector2< T > &right)
 Overload of binary operator -=.
template<typename T>
Vector2< T > operator+ (const Vector2< T > &left, const Vector2< T > &right)
 Overload of binary operator +.
template<typename T>
Vector2< T > operator- (const Vector2< T > &left, const Vector2< T > &right)
 Overload of binary operator -.
template<typename T>
Vector2< T > operator* (const Vector2< T > &left, T right)
 Overload of binary operator *.
template<typename T>
Vector2< T > operator* (T left, const Vector2< T > &right)
 Overload of binary operator *.
template<typename T>
Vector2< T > & operator*= (Vector2< T > &left, T right)
 Overload of binary operator *=.
template<typename T>
Vector2< T > operator/ (const Vector2< T > &left, T right)
 Overload of binary operator /.
template<typename T>
Vector2< T > & operator/= (Vector2< T > &left, T right)
 Overload of binary operator /=.
template<typename T>
bool operator== (const Vector2< T > &left, const Vector2< T > &right)
 Overload of binary operator ==.
template<typename T>
bool operator!= (const Vector2< T > &left, const Vector2< T > &right)
 Overload of binary operator !=.
template<typename T>
Vector3< T > operator- (const Vector3< T > &left)
 Overload of unary operator -.
template<typename T>
Vector3< T > & operator+= (Vector3< T > &left, const Vector3< T > &right)
 Overload of binary operator +=.
template<typename T>
Vector3< T > & operator-= (Vector3< T > &left, const Vector3< T > &right)
 Overload of binary operator -=.
template<typename T>
Vector3< T > operator+ (const Vector3< T > &left, const Vector3< T > &right)
 Overload of binary operator +.
template<typename T>
Vector3< T > operator- (const Vector3< T > &left, const Vector3< T > &right)
 Overload of binary operator -.
template<typename T>
Vector3< T > operator* (const Vector3< T > &left, T right)
 Overload of binary operator *.
template<typename T>
Vector3< T > operator* (T left, const Vector3< T > &right)
 Overload of binary operator *.
template<typename T>
Vector3< T > & operator*= (Vector3< T > &left, T right)
 Overload of binary operator *=.
template<typename T>
Vector3< T > operator/ (const Vector3< T > &left, T right)
 Overload of binary operator /.
template<typename T>
Vector3< T > & operator/= (Vector3< T > &left, T right)
 Overload of binary operator /=.
template<typename T>
bool operator== (const Vector3< T > &left, const Vector3< T > &right)
 Overload of binary operator ==.
template<typename T>
bool operator!= (const Vector3< T > &left, const Vector3< T > &right)
 Overload of binary operator !=.
bool operator== (const VideoMode &left, const VideoMode &right)
 Overload of == operator to compare two video modes.
bool operator!= (const VideoMode &left, const VideoMode &right)
 Overload of != operator to compare two video modes.
bool operator< (const VideoMode &left, const VideoMode &right)
 Overload of < operator to compare video modes.
bool operator> (const VideoMode &left, const VideoMode &right)
 Overload of > operator to compare video modes.
bool operator<= (const VideoMode &left, const VideoMode &right)
 Overload of <= operator to compare video modes.
bool operator>= (const VideoMode &left, const VideoMode &right)
 Overload of >= operator to compare video modes.

Typedef Documentation

◆ FloatRect

typedef Rect<float> sf::FloatRect

Definition at line 191 of file Rect.hpp.

◆ Int16

typedef signed short sf::Int16

Definition at line 140 of file Config.hpp.

◆ Int32

typedef signed int sf::Int32

Definition at line 144 of file Config.hpp.

◆ Int64

typedef signed long long sf::Int64

Definition at line 152 of file Config.hpp.

◆ Int8

typedef signed char sf::Int8

Definition at line 136 of file Config.hpp.

◆ IntRect

typedef Rect<int> sf::IntRect

Definition at line 190 of file Rect.hpp.

◆ SocketHandle

typedef int sf::SocketHandle

Definition at line 50 of file SocketHandle.hpp.

◆ Uint16

typedef unsigned short sf::Uint16

Definition at line 141 of file Config.hpp.

◆ Uint32

typedef unsigned int sf::Uint32

Definition at line 145 of file Config.hpp.

◆ Uint64

typedef unsigned long long sf::Uint64

Definition at line 153 of file Config.hpp.

◆ Uint8

typedef unsigned char sf::Uint8

Definition at line 137 of file Config.hpp.

◆ Utf16

typedef Utf<16> sf::Utf16

Definition at line 735 of file Utf.hpp.

◆ Utf32

typedef Utf<32> sf::Utf32

Definition at line 736 of file Utf.hpp.

◆ Utf8

typedef Utf<8> sf::Utf8

Definition at line 734 of file Utf.hpp.

◆ Vector2f

typedef Vector2<float> sf::Vector2f

Definition at line 255 of file Vector2.hpp.

◆ Vector2i

typedef Vector2<int> sf::Vector2i

Definition at line 253 of file Vector2.hpp.

◆ Vector2u

typedef Vector2<unsigned int> sf::Vector2u

Definition at line 254 of file Vector2.hpp.

◆ Vector3f

typedef Vector3<float> sf::Vector3f

Definition at line 256 of file Vector3.hpp.

◆ Vector3i

typedef Vector3<int> sf::Vector3i

Definition at line 255 of file Vector3.hpp.

Function Documentation

◆ operator!=() [1/8]

bool sf::operator!= ( const IpAddress & left,
const IpAddress & right )

Overload of != operator to compare two IP addresses.

Parameters
leftLeft operand (a IP address)
rightRight operand (a IP address)
Returns
True if both addresses are different

◆ operator<() [1/4]

bool sf::operator< ( const IpAddress & left,
const IpAddress & right )

Overload of < operator to compare two IP addresses.

Parameters
leftLeft operand (a IP address)
rightRight operand (a IP address)
Returns
True if left is lesser than right

◆ operator<<()

std::ostream & sf::operator<< ( std::ostream & stream,
const IpAddress & address )

Overload of << operator to print an IP address to an output stream.

Parameters
streamOutput stream
addressIP address to print
Returns
Reference to the output stream

◆ operator<=() [1/4]

bool sf::operator<= ( const IpAddress & left,
const IpAddress & right )

Overload of <= operator to compare two IP addresses.

Parameters
leftLeft operand (a IP address)
rightRight operand (a IP address)
Returns
True if left is lesser or equal than right

◆ operator==() [1/8]

bool sf::operator== ( const IpAddress & left,
const IpAddress & right )

Overload of == operator to compare two IP addresses.

Parameters
leftLeft operand (a IP address)
rightRight operand (a IP address)
Returns
True if both addresses are equal

◆ operator>() [1/4]

bool sf::operator> ( const IpAddress & left,
const IpAddress & right )

Overload of > operator to compare two IP addresses.

Parameters
leftLeft operand (a IP address)
rightRight operand (a IP address)
Returns
True if left is greater than right

◆ operator>=() [1/4]

bool sf::operator>= ( const IpAddress & left,
const IpAddress & right )

Overload of >= operator to compare two IP addresses.

Parameters
leftLeft operand (a IP address)
rightRight operand (a IP address)
Returns
True if left is greater or equal than right

◆ operator>>()

std::istream & sf::operator>> ( std::istream & stream,
IpAddress & address )

Overload of >> operator to extract an IP address from an input stream.

Parameters
streamInput stream
addressIP address to extract
Returns
Reference to the input stream