NasNas
An intuitive and beginner friendly 2D game framework for C++
Namespaces | Classes | Typedefs | Functions | Variables
ns Namespace Reference

Namespaces

 tm
 
 ui
 
 utils
 

Classes

class  Anim
 
class  AnimFrame
 
class  AnimPlayer
 
class  App
 
class  AppAccess
 
struct  AppConfig
 
struct  AppState
 
struct  AppStateInterface
 
class  AppWindow
 
class  Arial
 
class  BitmapFont
 A font that can be created from a texture. More...
 
struct  BitmapGlyph
 
class  BitmapText
 A BitmapText is a Drawable that uses a BitmapFont to display text. More...
 
class  Camera
 
class  DebugText
 DebugText evaluates a variable or a method and display the value on the AppWindow. More...
 
class  DebugTextInterface
 Base class of all DebugText classes. More...
 
class  Dir
 
struct  easing
 
class  EllipseShape
 
class  EntityObject
 
class  Inputs
 
class  Layer
 
class  LineShape
 
class  Logger
 Console Logger can log a variable number of variables to the console. More...
 
class  MultiTween
 
struct  Particle
 
class  ParticleSystem
 
class  Rect
 Extending sf::Rect with customized properties. More...
 
class  Renderable
 
class  ResourceManager
 
class  Scene
 
class  Settings
 
class  ShaderHolder
 
class  Sprite
 
class  SpriteBatch
 
class  SpriteSheet
 
class  StateMachineApp
 
class  StateStackApp
 
class  Transformable
 
class  Transition
 
class  Tween
 
class  VertexArray
 

Typedefs

typedef Rect< int > IntRect
 
typedef Rect< float > FloatRect
 
typedef ResourceManager Res
 

Functions

auto to_degree (float value) -> float
 Converts a radian angle to degree. More...
 
auto to_radian (float value) -> float
 Converts a degree angle to radian. More...
 
template<typename T >
auto norm (const sf::Vector2< T > &vector) -> float
 Calculates the norm of a vector (its length) More...
 
template<typename T >
auto normal (const sf::Vector2< T > &vector) -> sf::Vector2f
 Calculates the normal of a vector. More...
 
template<typename T , typename S >
auto distance (const sf::Vector2< T > &point1, const sf::Vector2< S > &point2) -> float
 Calculates the distance between two points. More...
 
template<typename T >
auto dot_product (const sf::Vector2< T > &v1, const sf::Vector2< T > &v2) -> T
 
template<typename T >
auto cross_product (const sf::Vector2< T > &v1, const sf::Vector2< T > &v2) -> T
 
template<typename T >
auto angle (const sf::Vector2< T > &vector) -> float
 Returns the clockwise positive angle of a vector. More...
 
template<typename T >
auto angle (const sf::Vector2< T > &v1, const sf::Vector2< T > &v2) -> float
 Returns the clockwise positive angle between two vectors. More...
 
template<typename T >
auto operator* (const sf::Vector2< T > &v1, const sf::Vector2< T > &v2) -> sf::Vector2< T >
 Does element wise multiplication between two vectors. More...
 

Variables

constexpr float PI = 3.14159265359f
 
ecs::detail::Registry< ecs::Entity > Ecs
 

Detailed Description

Created by Modar Nasser on 15/04/2020.

Created by Modar Nasser on 20/04/2020.

Created by Modar Nasser on 28/06/2020.

Created by Modar Nasser on 23/06/2020.

Created by Modar Nasser on 25/07/2020.

Created by Modar Nasser on 26/08/2020.

Created by Modar Nasser on 01/05/2020.

Created by Modar Nasser on 25/04/2020.

Created by Modar Nasser on 24/08/2020.

Created by Modar Nasser on 06/10/2020.

Created by Modar Nasser on 19/12/2020.

Created by Modar Nasser on 19/04/2020.

Created by Modar Nasser on 22/04/2020.

Created by Modar Nasser on 23/04/2020.

Function Documentation

◆ angle() [1/2]

template<typename T >
auto ns::angle ( const sf::Vector2< T > &  vector) -> float
inline

Returns the clockwise positive angle of a vector.

Template Parameters
TVector type
Parameters
vector
Returns
The angle between (-PI; PI]

Definition at line 85 of file Maths.hpp.

◆ angle() [2/2]

template<typename T >
auto ns::angle ( const sf::Vector2< T > &  v1,
const sf::Vector2< T > &  v2 
) -> float
inline

Returns the clockwise positive angle between two vectors.

Template Parameters
TVector type
Parameters
v1
v2
Returns
The angle between (-PI; PI]

Definition at line 97 of file Maths.hpp.

◆ distance()

template<typename T , typename S >
auto ns::distance ( const sf::Vector2< T > &  point1,
const sf::Vector2< S > &  point2 
) -> float
inline

Calculates the distance between two points.

Template Parameters
TFirst point coordinates type (int, float or unsigned)
SSecond point coordinates type (int, float or unsigned)
Parameters
point1
point2
Returns
The distance between the two points

Definition at line 64 of file Maths.hpp.

◆ norm()

template<typename T >
auto ns::norm ( const sf::Vector2< T > &  vector) -> float
inline

Calculates the norm of a vector (its length)

Template Parameters
TVector type
Parameters
vector
Returns
Norm of the vector

Definition at line 40 of file Maths.hpp.

◆ normal()

template<typename T >
auto ns::normal ( const sf::Vector2< T > &  vector) -> sf::Vector2f
inline

Calculates the normal of a vector.

Template Parameters
TVector type
Parameters
vector
Returns
The normal of the vector

Definition at line 51 of file Maths.hpp.

◆ operator*()

template<typename T >
auto ns::operator* ( const sf::Vector2< T > &  v1,
const sf::Vector2< T > &  v2 
) -> sf::Vector2<T>
inline

Does element wise multiplication between two vectors.

Template Parameters
TVector type (int, float or unsigned)
Parameters
v1
v2
Returns
Returns {v1.x * v2.x, v1.y * v2.y}

Definition at line 110 of file Maths.hpp.

◆ to_degree()

auto ns::to_degree ( float  value) -> float
inline

Converts a radian angle to degree.

Parameters
valueRadian angle value
Returns
Equivalent degree angle

Definition at line 20 of file Maths.hpp.

◆ to_radian()

auto ns::to_radian ( float  value) -> float
inline

Converts a degree angle to radian.

Parameters
valueDegree angle value
Returns
Equivalent radian angle

Definition at line 29 of file Maths.hpp.