Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt Namespace Reference

As of Nirtcpp 1.6, position2d is a synonym for vector2d. More...

Namespaces

namespace  core
 Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.
 
namespace  gui
 The gui namespace contains useful classes for easy creation of a graphical user interface.
 
namespace  io
 This namespace provides interfaces for input/output: Reading and writing files, accessing zip archives, xml files, ...
 
namespace  scene
 All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees and billboards, ...
 
namespace  video
 The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done here.
 

Classes

class  CProfileScope
 Class where the objects profile their own life-time. More...
 
class  IEventReceiver
 Interface of an object which can receive events. More...
 
class  ILogger
 Interface for logging messages, warnings and errors. More...
 
class  IOSOperator
 The Operating system operator provides operation system specific methods and information. More...
 
class  IProfiler
 Code-profiler. Please check the example in the Nirtcpp examples folder about how to use it. More...
 
class  IRandomizer
 Interface for generating random numbers. More...
 
class  IReferenceCounted
 Base class of most objects of the Nirtcpp Engine. More...
 
class  ITimer
 Interface for getting and manipulating the virtual time. More...
 
class  NirtcppDevice
 The Nirtcpp device. You can create it with createDevice() or createDeviceEx(). More...
 
class  SEvent
 SEvents hold information about an event. See nirt::IEventReceiver for details on event handling. More...
 
class  SJoystickInfo
 Information on a joystick, returned from nirt::NirtcppDevice::activateJoysticks() More...
 
class  SKeyMap
 Struct storing which key belongs to which action. More...
 
class  SNirtcppCreationParameters
 Structure for holding Nirtcpp Device creation parameters. More...
 
class  SProfileData
 Used to store the profile data (and also used for profile group data). More...
 

Typedefs

using funcptr_createDevice = NirtcppDevice *(IRRCALLCONV *)(video::E_DRIVER_TYPE driverType, const core::dimension2d< u32 > &windowSize, u32 bits, bool fullscreen, bool stencilbuffer, bool vsync, IEventReceiver *receiver)
 using type alias for Function Pointer
 
using funcptr_createDeviceEx = NirtcppDevice *(IRRCALLCONV *)(const SNirtcppCreationParameters &parameters)
 using type alias for Function Pointer
 
using u8 = unsigned char
 8 bit unsigned variable.
 
using s8 = signed char
 8 bit signed variable.
 
using c8 = char
 8 bit character variable.
 
using u16 = unsigned short
 16 bit unsigned variable.
 
using s16 = signed short
 16 bit signed variable.
 
using u32 = unsigned int
 32 bit unsigned variable.
 
using s32 = signed int
 32 bit signed variable.
 
using f32 = float
 32 bit floating point variable.
 
using f64 = double
 64 bit floating point variable.
 
using fschar_t = char
 Type name for character type used by the filesystem.
 

Enumerations

enum  EKEY_ACTION {
  EKA_MOVE_FORWARD = 0 , EKA_MOVE_BACKWARD , EKA_STRAFE_LEFT , EKA_STRAFE_RIGHT ,
  EKA_JUMP_UP , EKA_CROUCH , EKA_ROTATE_LEFT , EKA_ROTATE_RIGHT ,
  EKA_COUNT , EKA_FORCE_32BIT = 0x7fffffff
}
 enumeration for key actions. Used for example in the FPS Camera. More...
 
enum  EKEY_CODE {
  KEY_LBUTTON = 0x01 , KEY_RBUTTON = 0x02 , KEY_CANCEL = 0x03 , KEY_MBUTTON = 0x04 ,
  KEY_XBUTTON1 = 0x05 , KEY_XBUTTON2 = 0x06 , KEY_BACK = 0x08 , KEY_TAB = 0x09 ,
  KEY_CLEAR = 0x0C , KEY_RETURN = 0x0D , KEY_SHIFT = 0x10 , KEY_CONTROL = 0x11 ,
  KEY_MENU = 0x12 , KEY_PAUSE = 0x13 , KEY_CAPITAL = 0x14 , KEY_KANA = 0x15 ,
  KEY_HANGUEL = 0x15 , KEY_HANGUL = 0x15 , KEY_JUNJA = 0x17 , KEY_FINAL = 0x18 ,
  KEY_HANJA = 0x19 , KEY_KANJI = 0x19 , KEY_ESCAPE = 0x1B , KEY_CONVERT = 0x1C ,
  KEY_NONCONVERT = 0x1D , KEY_ACCEPT = 0x1E , KEY_MODECHANGE = 0x1F , KEY_SPACE = 0x20 ,
  KEY_PRIOR = 0x21 , KEY_NEXT = 0x22 , KEY_END = 0x23 , KEY_HOME = 0x24 ,
  KEY_LEFT = 0x25 , KEY_UP = 0x26 , KEY_RIGHT = 0x27 , KEY_DOWN = 0x28 ,
  KEY_SELECT = 0x29 , KEY_PRINT = 0x2A , KEY_EXECUT = 0x2B , KEY_SNAPSHOT = 0x2C ,
  KEY_INSERT = 0x2D , KEY_DELETE = 0x2E , KEY_HELP = 0x2F , KEY_KEY_0 = 0x30 ,
  KEY_KEY_1 = 0x31 , KEY_KEY_2 = 0x32 , KEY_KEY_3 = 0x33 , KEY_KEY_4 = 0x34 ,
  KEY_KEY_5 = 0x35 , KEY_KEY_6 = 0x36 , KEY_KEY_7 = 0x37 , KEY_KEY_8 = 0x38 ,
  KEY_KEY_9 = 0x39 , KEY_KEY_A = 0x41 , KEY_KEY_B = 0x42 , KEY_KEY_C = 0x43 ,
  KEY_KEY_D = 0x44 , KEY_KEY_E = 0x45 , KEY_KEY_F = 0x46 , KEY_KEY_G = 0x47 ,
  KEY_KEY_H = 0x48 , KEY_KEY_I = 0x49 , KEY_KEY_J = 0x4A , KEY_KEY_K = 0x4B ,
  KEY_KEY_L = 0x4C , KEY_KEY_M = 0x4D , KEY_KEY_N = 0x4E , KEY_KEY_O = 0x4F ,
  KEY_KEY_P = 0x50 , KEY_KEY_Q = 0x51 , KEY_KEY_R = 0x52 , KEY_KEY_S = 0x53 ,
  KEY_KEY_T = 0x54 , KEY_KEY_U = 0x55 , KEY_KEY_V = 0x56 , KEY_KEY_W = 0x57 ,
  KEY_KEY_X = 0x58 , KEY_KEY_Y = 0x59 , KEY_KEY_Z = 0x5A , KEY_LWIN = 0x5B ,
  KEY_RWIN = 0x5C , KEY_APPS = 0x5D , KEY_SLEEP = 0x5F , KEY_NUMPAD0 = 0x60 ,
  KEY_NUMPAD1 = 0x61 , KEY_NUMPAD2 = 0x62 , KEY_NUMPAD3 = 0x63 , KEY_NUMPAD4 = 0x64 ,
  KEY_NUMPAD5 = 0x65 , KEY_NUMPAD6 = 0x66 , KEY_NUMPAD7 = 0x67 , KEY_NUMPAD8 = 0x68 ,
  KEY_NUMPAD9 = 0x69 , KEY_MULTIPLY = 0x6A , KEY_ADD = 0x6B , KEY_SEPARATOR = 0x6C ,
  KEY_SUBTRACT = 0x6D , KEY_DECIMAL = 0x6E , KEY_DIVIDE = 0x6F , KEY_F1 = 0x70 ,
  KEY_F2 = 0x71 , KEY_F3 = 0x72 , KEY_F4 = 0x73 , KEY_F5 = 0x74 ,
  KEY_F6 = 0x75 , KEY_F7 = 0x76 , KEY_F8 = 0x77 , KEY_F9 = 0x78 ,
  KEY_F10 = 0x79 , KEY_F11 = 0x7A , KEY_F12 = 0x7B , KEY_F13 = 0x7C ,
  KEY_F14 = 0x7D , KEY_F15 = 0x7E , KEY_F16 = 0x7F , KEY_F17 = 0x80 ,
  KEY_F18 = 0x81 , KEY_F19 = 0x82 , KEY_F20 = 0x83 , KEY_F21 = 0x84 ,
  KEY_F22 = 0x85 , KEY_F23 = 0x86 , KEY_F24 = 0x87 , KEY_NUMLOCK = 0x90 ,
  KEY_SCROLL = 0x91 , KEY_LSHIFT = 0xA0 , KEY_RSHIFT = 0xA1 , KEY_LCONTROL = 0xA2 ,
  KEY_RCONTROL = 0xA3 , KEY_LMENU = 0xA4 , KEY_RMENU = 0xA5 , KEY_OEM_1 = 0xBA ,
  KEY_PLUS = 0xBB , KEY_COMMA = 0xBC , KEY_MINUS = 0xBD , KEY_PERIOD = 0xBE ,
  KEY_OEM_2 = 0xBF , KEY_OEM_3 = 0xC0 , KEY_OEM_4 = 0xDB , KEY_OEM_5 = 0xDC ,
  KEY_OEM_6 = 0xDD , KEY_OEM_7 = 0xDE , KEY_OEM_8 = 0xDF , KEY_OEM_AX = 0xE1 ,
  KEY_OEM_102 = 0xE2 , KEY_ATTN = 0xF6 , KEY_CRSEL = 0xF7 , KEY_EXSEL = 0xF8 ,
  KEY_EREOF = 0xF9 , KEY_PLAY = 0xFA , KEY_ZOOM = 0xFB , KEY_PA1 = 0xFD ,
  KEY_OEM_CLEAR = 0xFE , KEY_NONE = 0xFF , KEY_KEY_CODES_COUNT = 0x100
}
 
enum  ELOG_LEVEL {
  ELL_DEBUG , ELL_INFORMATION , ELL_WARNING , ELL_ERROR ,
  ELL_NONE
}
 
enum  EEVENT_TYPE {
  EET_GUI_EVENT = 0 , EET_MOUSE_INPUT_EVENT , EET_KEY_INPUT_EVENT , EET_TOUCH_INPUT_EVENT ,
  EET_JOYSTICK_INPUT_EVENT , EET_LOG_TEXT_EVENT , EET_USER_EVENT , EGUIET_FORCE_32_BIT = 0x7fffffff
}
 Enumeration for all event types there are. More...
 
enum  EMOUSE_INPUT_EVENT {
  EMIE_LMOUSE_PRESSED_DOWN = 0 , EMIE_RMOUSE_PRESSED_DOWN , EMIE_MMOUSE_PRESSED_DOWN , EMIE_LMOUSE_LEFT_UP ,
  EMIE_RMOUSE_LEFT_UP , EMIE_MMOUSE_LEFT_UP , EMIE_MOUSE_MOVED , EMIE_MOUSE_WHEEL ,
  EMIE_LMOUSE_DOUBLE_CLICK , EMIE_RMOUSE_DOUBLE_CLICK , EMIE_MMOUSE_DOUBLE_CLICK , EMIE_LMOUSE_TRIPLE_CLICK ,
  EMIE_RMOUSE_TRIPLE_CLICK , EMIE_MMOUSE_TRIPLE_CLICK , EMIE_COUNT
}
 Enumeration for all mouse input events. More...
 
enum  E_MOUSE_BUTTON_STATE_MASK {
  EMBSM_LEFT = 0x01 , EMBSM_RIGHT = 0x02 , EMBSM_MIDDLE = 0x04 , EMBSM_EXTRA1 = 0x08 ,
  EMBSM_EXTRA2 = 0x10 , EMBSM_FORCE_32_BIT = 0x7fffffff
}
 Masks for mouse button states. More...
 
enum  ETOUCH_INPUT_EVENT { ETIE_PRESSED_DOWN = 0 , ETIE_LEFT_UP , ETIE_MOVED , ETIE_COUNT }
 Enumeration for all touch input events. More...
 
enum  E_DEVICE_TYPE {
  EIDT_WIN32 , EIDT_WINCE , EIDT_X11 , EIDT_OSX ,
  EIDT_SFML , EIDT_FRAMEBUFFER , EIDT_CONSOLE , EIDT_BEST
}
 An enum for the different device types supported by the Nirtcpp Engine. More...
 

Functions

NIRTCPP_API NirtcppDevice *IRRCALLCONV createDevice (video::E_DRIVER_TYPE driverType=video::EDT_SOFTWARE, const core::dimension2d< u32 > &windowSize=(core::dimension2d< u32 >(640, 480)), u32 bits=32, bool fullscreen=false, bool stencilbuffer=true, bool vsync=false, IEventReceiver *receiver=0)
 Creates an Nirtcpp device. The Nirtcpp device is the root object for using the engine.
 
NIRTCPP_API NirtcppDevice *IRRCALLCONV createDeviceEx (const SNirtcppCreationParameters &parameters)
 Creates an Nirtcpp device with the option to specify advanced parameters.
 
NIRTCPP_API IProfiler &IRRCALLCONV getProfiler ()
 Access the Nirtcpp profiler object.
 

Detailed Description

As of Nirtcpp 1.6, position2d is a synonym for vector2d.

Everything in the Nirtcpp Engine can be found in this namespace.

You should consider position2d to be deprecated, and use vector2d by preference.

Typedef Documentation

◆ c8

using nirt::c8 = typedef char

8 bit character variable.

This is a using type alias for char, it ensures portability of the engine.

◆ f32

using nirt::f32 = typedef float

32 bit floating point variable.

This is a using type alias for float, it ensures portability of the engine.

◆ f64

using nirt::f64 = typedef double

64 bit floating point variable.

This is a using type alias for double, it ensures portability of the engine.

◆ fschar_t

using nirt::fschar_t = typedef char

Type name for character type used by the filesystem.

Should the wide character version of the filesystem be used it is a 16 bit character variable. Used for Unicode filesystem and Unicode strings. Else it is a 8 bit character variable. Used for ansi filesystem and non-unicode strings

◆ s16

using nirt::s16 = typedef signed short

16 bit signed variable.

This is a using type alias for signed short, it ensures portability of the engine.

◆ s32

using nirt::s32 = typedef signed int

32 bit signed variable.

This is a using type alias for signed int, it ensures portability of the engine.

◆ s8

using nirt::s8 = typedef signed char

8 bit signed variable.

This is a using type alias for signed char, it ensures portability of the engine.

◆ u16

using nirt::u16 = typedef unsigned short

16 bit unsigned variable.

This is a using type alias for unsigned short, it ensures portability of the engine.

◆ u32

using nirt::u32 = typedef unsigned int

32 bit unsigned variable.

This is a using type alias for unsigned int, it ensures portability of the engine.

◆ u8

using nirt::u8 = typedef unsigned char

8 bit unsigned variable.

This is a using type alias for unsigned char, it ensures portability of the engine.

Enumeration Type Documentation

◆ E_DEVICE_TYPE

An enum for the different device types supported by the Nirtcpp Engine.

Enumerator
EIDT_WIN32 

A device native to Microsoft Windows.

This device uses the Win32 API and works in all versions of Windows.

EIDT_WINCE 

A device native to Windows CE devices.

This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices

EIDT_X11 

A device native to Unix style operating systems.

This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and other operating systems which support X11.

EIDT_OSX 

A device native to Mac OSX.

This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above.

EIDT_SFML 

A device which uses SFML.

The SFML device works under all platforms supported by SFML but first must be compiled in by defining the NIRT_COMPILE_WITH_SFML_DEVICE macro in NirtCompileConfig.hpp

EIDT_FRAMEBUFFER 

A device for raw framebuffer access.

Best used with embedded devices and mobile systems. Does not need X11 or other graphical subsystems. May support hw-acceleration via OpenGL-ES for FBDirect

EIDT_CONSOLE 

A simple text only device supported by all platforms.

This device allows applications to run from the command line without opening a window. It can render the output of the software drivers to the console as ASCII. It only supports mouse and keyboard in Windows operating systems.

EIDT_BEST 

This selection allows Nirtcpp to choose the best device from the ones available.

If this selection is chosen then Nirtcpp will try to use the NirtcppDevice native to your operating system. If this is unavailable then the X11, SFML and then console device will be tried. This ensures that Nirtcpp will run even if your platform is unsupported, although it may not be able to render anything.

◆ E_MOUSE_BUTTON_STATE_MASK

Masks for mouse button states.

Enumerator
EMBSM_EXTRA1 

currently only on windows

EMBSM_EXTRA2 

currently only on windows

◆ EEVENT_TYPE

Enumeration for all event types there are.

Enumerator
EET_GUI_EVENT 

An event of the graphical user interface.

GUI events are created by the GUI environment or the GUI elements in response to mouse or keyboard events. When a GUI element receives an event it will either process it and return true, or pass the event to its parent. If an event is not absorbed before it reaches the root element then it will then be passed to the user receiver.

EET_MOUSE_INPUT_EVENT 

A mouse input event.

Mouse events are created by the device and passed to NirtcppDevice::postEventFromUser in response to mouse input received from the operating system. Mouse events are first passed to the user receiver, then to the GUI environment and its elements, then finally the input receiving scene manager where it is passed to the active camera.

EET_KEY_INPUT_EVENT 

A key input event.

Like mouse events, keyboard events are created by the device and passed to NirtcppDevice::postEventFromUser. They take the same path as mouse events.

EET_TOUCH_INPUT_EVENT 

A touch input event.

EET_JOYSTICK_INPUT_EVENT 

A joystick (joypad, gamepad) input event.

Joystick events are created by polling all connected joysticks once per device run() and then passing the events to NirtcppDevice::postEventFromUser. They take the same path as mouse events. Windows, SFML: Implemented. Linux: Implemented, with POV hat issues. MacOS / Other: Not yet implemented.

EET_LOG_TEXT_EVENT 

A log event.

Log events are only passed to the user receiver if there is one. If they are absorbed by the user receiver then no text will be sent to the console.

EET_USER_EVENT 

A user event with user data.

This is not used by Nirtcpp and can be used to send user specific data though the system. The Nirtcpp 'window handle' can be obtained from NirtcppDevice::getExposedVideoData() The usage and behavior depends on the operating system: Windows: send a WM_USER message to the Nirtcpp Window; the wParam and lParam will be used to populate the UserData1 and UserData2 members of the SUserEvent. Linux: send a ClientMessage via XSendEvent to the Nirtcpp Window; the data.l[0] and data.l[1] members will be cast to s32 and used as UserData1 and UserData2. MacOS: Not yet implemented

EGUIET_FORCE_32_BIT 

This enum is never used, it only forces the compiler to compile these enumeration values to 32 bit.

◆ EKEY_ACTION

enumeration for key actions. Used for example in the FPS Camera.

Enumerator
EKA_FORCE_32BIT 

This value is not used. It only forces this enumeration to compile in 32 bit.

◆ ELOG_LEVEL

Possible log levels. When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing. When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE messages are never filtered and always printed.

Enumerator
ELL_DEBUG 

Used for printing information helpful in debugging.

ELL_INFORMATION 

Useful information to print. For example hardware infos or something started/stopped.

ELL_WARNING 

Warnings that something isn't as expected and can cause oddities.

ELL_ERROR 

Something did go wrong.

ELL_NONE 

Logs with ELL_NONE will never be filtered. And used as filter it will remove all logging except ELL_NONE messages.

◆ EMOUSE_INPUT_EVENT

Enumeration for all mouse input events.

Enumerator
EMIE_LMOUSE_PRESSED_DOWN 

Left mouse button was pressed down.

EMIE_RMOUSE_PRESSED_DOWN 

Right mouse button was pressed down.

EMIE_MMOUSE_PRESSED_DOWN 

Middle mouse button was pressed down.

EMIE_LMOUSE_LEFT_UP 

Left mouse button was left up.

EMIE_RMOUSE_LEFT_UP 

Right mouse button was left up.

EMIE_MMOUSE_LEFT_UP 

Middle mouse button was left up.

EMIE_MOUSE_MOVED 

The mouse cursor changed its position.

EMIE_MOUSE_WHEEL 

The mouse wheel was moved. Use Wheel value in event data to find out in what direction and how fast.

EMIE_LMOUSE_DOUBLE_CLICK 

Left mouse button double click. This event is generated after the second EMIE_LMOUSE_PRESSED_DOWN event.

EMIE_RMOUSE_DOUBLE_CLICK 

Right mouse button double click. This event is generated after the second EMIE_RMOUSE_PRESSED_DOWN event.

EMIE_MMOUSE_DOUBLE_CLICK 

Middle mouse button double click. This event is generated after the second EMIE_MMOUSE_PRESSED_DOWN event.

EMIE_LMOUSE_TRIPLE_CLICK 

Left mouse button triple click. This event is generated after the third EMIE_LMOUSE_PRESSED_DOWN event.

EMIE_RMOUSE_TRIPLE_CLICK 

Right mouse button triple click. This event is generated after the third EMIE_RMOUSE_PRESSED_DOWN event.

EMIE_MMOUSE_TRIPLE_CLICK 

Middle mouse button triple click. This event is generated after the third EMIE_MMOUSE_PRESSED_DOWN event.

EMIE_COUNT 

No real event. Just for convenience to get number of events.

◆ ETOUCH_INPUT_EVENT

Enumeration for all touch input events.

Enumerator
ETIE_PRESSED_DOWN 

Touch was pressed down.

ETIE_LEFT_UP 

Touch was left up.

ETIE_MOVED 

The touch changed its position.

ETIE_COUNT 

No real event. Just for convenience to get number of events.

Function Documentation

◆ createDevice()

NIRTCPP_API NirtcppDevice *IRRCALLCONV nirt::createDevice ( video::E_DRIVER_TYPE  driverType = video::EDT_SOFTWARE,
const core::dimension2d< u32 > &  windowSize = (core::dimension2du32 >(640, 480)),
u32  bits = 32,
bool  fullscreen = false,
bool  stencilbuffer = true,
bool  vsync = false,
IEventReceiver receiver = 0 
)

Creates an Nirtcpp device. The Nirtcpp device is the root object for using the engine.

If you need more parameters to be passed to the creation of the Nirtcpp Engine device, use the createDeviceEx() function.

Parameters
driverTypeType of the video driver to use. This can currently be video::EDT_NULL, video::EDT_SOFTWARE, video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D9 and video::EDT_OPENGL.
windowSizeSize of the window or the video mode in fullscreen mode.
bitsBits per pixel in fullscreen mode. Ignored if windowed mode.
fullscreenShould be set to true if the device should run in fullscreen. Otherwise the device runs in windowed mode.
stencilbufferSpecifies if the stencil buffer should be enabled. Set this to true, if you want the engine be able to draw stencil buffer shadows. Note that not all devices are able to use the stencil buffer. If they don't no shadows will be drawn.
vsyncSpecifies vertical synchronization: If set to true, the driver will wait for the vertical retrace period, otherwise not.
receiverA user created event receiver.
Returns
Returns pointer to the created NirtcppDevice or null if the device could not be created.

◆ createDeviceEx()

NIRTCPP_API NirtcppDevice *IRRCALLCONV nirt::createDeviceEx ( const SNirtcppCreationParameters parameters)

Creates an Nirtcpp device with the option to specify advanced parameters.

Usually you should used createDevice() for creating an Nirtcpp Engine device. Use this function only if you wish to specify advanced parameters like a window handle in which the device should be created.

Parameters
parametersStructure containing advanced parameters for the creation of the device. See nirt::SNirtcppCreationParameters for details.
Returns
Returns pointer to the created NirtcppDevice or null if the device could not be created.

◆ getProfiler()

NIRTCPP_API IProfiler &IRRCALLCONV nirt::getProfiler ( )

Access the Nirtcpp profiler object.

Profiler is always accessible, except in destruction of global objects. If you want to get internal profiling information about the engine itself you will have to re-compile the engine with NIRT_COMPILE_WITH_PROFILING enabled. But you can use the profiler for profiling your own projects without that.


Nirtcpp    @cppfx.xyz

Utxcpp    utx::print