-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A helper class which symbols the a char from a font file
A rect providing info about a 2D-position and width and height either in pixels or in screen location (-1 to 1 on the x- and y-axis)
converts this rect from pixel coords into screen coords based on the current display dimensions
converts this rect from screencoords into pixel coords based on the current display dimensions
creates a new rect with given parameters
x: the x position
y: the y position
width: the width for the rect
height: the height for the rect
inScreenCoords: are the passed values in a coord system from -1 to 1
Creates a new Rect where every component (x, y, width, height) is initialized with 0.
This class is a wrapper for using textures. The implementation supports only "*.png" files. Use the SetActivationSlot(...) to set which texture slot you wanna use (GL_TEXTUREi, where i ranges from 0 to (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1)).
... //e.g. load texture
{
Bind(shader);
Bind(texture);
//bind sampler to shader location
glUniform1i(shader->getUniform("tex"), 0); //only when the Sampler2D in the shader source code is called "tex"
... //Render stuff
} // Texture and Shader are unbound automatically
Used to unbind the texture. This call is automated when the BIND(...) macro was used to bind this texture.
Used to bind the texture (using the BIND(...) macro defined in the AutoUnbind header.
This method sets the slot where the texture is bound to. Valid input-range: GL_TEXTUREi, where i ranges from 0 to (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1)
value: The slot you want to use.
The constructor loads the image and pushes it to the GPU. Supported file extensions: .png
path: Path to file (including file extension).
This class is a wrapper for using the scopewatch. The essential idea is to have a macro (Bind(...)) which can be used to bind a child of this class and gets unbound automatically.
The method used to unbind this object. Has to be implemented!
The method used to bind this object. Has to be implemented!
A gameobject is a object in the scene. It is used as a collection of components with some additional funcionallity: Each GameObject has a transform component which is used to store the position, the rotation and the scale of that object. GameObjects are also used to handle a parent-child relation of objects (for example useful to make a player object with different attatchments).
Note that not every GameObject has to be visible and support some kind of render. It can also be used to create handlers or some other singletons.
The Transform component is assigned to each GameObject to store position scale and rotation. Note that the Parent-Child-relation has impact on the calculations taking place in the transform instance.
Adds a child to this gameObject
obj: The new child
Sets the parent for this gameObject
obj: the parent for this object
This returns a list of all child gameobjects that are assigned to this gameObject.
A list of all childs, or an empty list
This function returns the parent if existing. If not existing, this returns nullptr.
The parent gameObject if existing, else nullptr
This method is used to assign a component to the GameObject. Note that you have to create a lasting component (using the 'new' macro).
comp: The component you want to add.
Component *comp = new RotateObjectComponent();
gameObject->AddComponent(comp);
Note that it is strongly advised to create a GameObject using the Instantiate() method offered by the Scene or the component class. This creates a new GameObject with a specified name.
name: The name of the new GameObject
Note that it is strongly advised to create a GameObject using the Instantiate() method offered by the Scene or the component class. This creates a new GameObject with the empty string as name.
This class is abstract and has to be inherited. It provides the standard functions as Start() or Update() and when added to an active GameObject instance is called by the engine. It also provides basic functionality to the engine like a ShowMouse function.
This function is called when the component gets destroyed.
This function is called to render the scene (once a frame). Is called AFTER LateUpdate().
This function is called each frame to update the component (and/or scene). Is called AFTER Update().
This function is called each frame to update the component (and/or scene). Is called as first update function each frame.
This function is called in the following frame after the component was created Is called AFTER Awake().
This function is called in the following frame after the component was created. Is called BEFORE Start().
Sets the mouse position relative to the window. Note that the mouse position can be set when the mouse is not showing.
x: The target mouse position on the X-Axis in pixel.
y: The target mouse position on the Y-Axis in pixel.
Can be used to en-/disable the mouse pointer while the mouse is hovering over the window opened by the Game-Engine.
showMouse: If true the mouse is shown, if false it is not.
Instantiate(std.basic_string<System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte,std.char_traits{System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte},std.allocator<System.SByte!System.Runtime.CompilerServices.IsSignUnspecifiedByte>>)
Creates a new gameObject with a specified name. This GameObject is introduced to the current scene.
name: The name for the new GameObject
A pointer to the empty gameObject with the name.
Creates a new gameObject with name "". This GameObject is introduced to the current scene.
A pointer to the empty gameObject.
Returns a pointer to the gameObject the component is running on/connected to.
A pointer to the gameObject.
Returns a pointer to the current scene camera. Usefull e.g. to update the cameras location or rotation.
A pointer to the current/active camera.
Returns a handle to the active scene (to access their functionalities).
A pointer to the active/current scene.