-
Notifications
You must be signed in to change notification settings - Fork 0
Home
A helper class which symbols a character from a font file
Getter for the xAdvance attribute
The xAdvance
Getter for the sizeY attribute
The sizeY
Getter for the sizeX attribute
The sizeX
Getter for the yOffset attribute
The yOffset
Getter for the xOffset attribute
The xOffset
Getter for the yTextureCoord attribute
The yTextureCoord
Getter for the xTextureCoord attribute
The xTextureCoord
Getter for the ID attribute
The ID
A constructor that creates a character instance with its specified attributes
id: The id of this char (normally ascii representation of char)
xTextureCoord: X component of the upper left corner of this char on its font-texture
yTextureCoord: Y component of the upper left corner of this char on its font-texture
xOffset: A virtual cursor will be used. This value specifies where to locate this chars vertex depending on the x-offset
yOffset: A virtual cursor will be used. This value specifies where to locate this chars vertex depending on the y-offset
sizeX: The width of this character
sizeY: The height of this character
xAdvance: Which offset receives the virtual cursor after writing this letter
Default constructor.
This class is used to represent one font on the screen. It handles the render call that renders every text element on the screen and also is able to return a Text object to represent one text. This class is implemented using the singleton pattern.
Getter for the xAdvance attribute
The xAdvance
Getter for the sizeY attribute
The sizeY
Getter for the sizeX attribute
The sizeX
Getter for the yOffset attribute
The yOffset
Getter for the xOffset attribute
The xOffset
Getter for the yTextureCoord attribute
The yTextureCoord
Getter for the xTextureCoord attribute
The xTextureCoord
Getter for the ID attribute
The ID
A constructor that creates a character instance with its specified attributes
id: The id of this char (normally ascii representation of char)
xTextureCoord: X component of the upper left corner of this char on its font-texture
yTextureCoord: Y component of the upper left corner of this char on its font-texture
xOffset: A virtual cursor will be used. This value specifies where to locate this chars vertex depending on the x-offset
yOffset: A virtual cursor will be used. This value specifies where to locate this chars vertex depending on the y-offset
sizeX: The width of this character
sizeY: The height of this character
xAdvance: Which offset receives the virtual cursor after writing this letter
Default constructor.
This call renders every font stored in the "fonts" vector
This method creates a new text by specifying a std::string and the depth of the text.
str: The text you want to add to the render list
depth: The depth for the new text
The Text handler for that str and font-shader combination symbolized with this class
This method creates a new text by specifying a std::string.
str: The text you want to add to the render list
The Text handler for that str and font-shader combination symbolized with this class
GetFontHandler(std::string!System.Runtime.CompilerServices.IsConst,std::string!System.Runtime.CompilerServices.IsConst)
The singleton getter of this class. This call is used to get the fonthandler used for a specified font (by fontfiles and shader)
pathToFontFiles: This call expects to find an .png image containing the letters and also the .fnt file which holds detailed information about each char on that image
shaderPath: The path to the shader files used for rendering text
A pointer to the FontHandler used to render texts in this font-shader combination
The deconstructor of this class deletes all text components since they are not valid without their renderer
This class is used to handle text on screen. In particular this class is a wrapper to a std::string instance which is than rendered to the screen. Note that this class does not have a public constructor since it has to be initialized using a FontHandler instance.
The constructor of this class. You need to pass the string you want to get rendered and an valid instance of a FontHandler to indicate the font the text gets rendered in.
text: The string that gets represented
fontHandler: The font handler that creates this text element
The deconstructor for this class. Destroys a text component.
op_LessThan(ENGINE.GUI.Text!System.Runtime.CompilerServices.IsConst*!System.Runtime.CompilerServices.IsImplicitlyDereferenced)
This operator is used to order the text elements by their depth. The text instance with the smaller depth value wins this comparison.
b: The text you want to compare against
True, if the left text element has a smaller depth value. Else false
Note that the pixel size can vary from screen to screen This sets the textsize using pixels.
size: The new text size
This returns the current depth for this item (See also SetDepth for more detail).
returns the current depth
The depth of this component is used to move a text before or behind another GUI item.
val: The new depth for this instance
This methode returns the string represented by this class
The string used in this class
This methods adds a string ("appendText") to the string of this class-instance
appendText: The text you want to append
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)
The height of this rect.
The width of this rect
the Y value of this rect
The X value of this rect
Note that the mouse position has to be in the right coordinate system. (See toPixels() and fromPixels()) Returns true if the specified mouse position is inside the rect.
mouseX: The X-Coordinat of the mouse position
mouseY: The Y-Coordinat of the mouse position
True if the passed mouse position is inside the rect, else false.
Note that the mouse position has to be in the right coordinate system. (See toPixels() and fromPixels()) Returns true if the specified mouse position is inside the rect.
mousePos: The mouse position
True if the passed mouse position is inside the rect, else false.
Converts this rect from Pixel-Coordinats into Screen-Coordinats based on the current display dimensions
Converts this rect from Screen-Coordinats into Pixel-Coordinats 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 used to Render a specified model with a given shader.
Note that neither the Model nor the Shader can be used without this class and get rendered.
This function renders the model using the specified shader to the current context.
Creates a new Renderer for a passed shader and a given model.
shaderName: The path to the shader
model: A pointer to the model you wanna render
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 a part of each GameObject which stores rotation position and a three dimensional scale value for the object. It also provides a methods for creating (for the rendering of the object) the model matrix.
The scale value of the Transform and the corresponding GameObject
The rotation of the Transform and the corresponding GameObject
The position of the Transform and the corresponding GameObject
This method returns a matrix that positions the object using this Transform
The position matrix
This method returns a matrix that rotates the object using this Transform
The rotation matrix
This method returns a matrix that scales the object using this Transform
The scale matrix
This method returns a model matrix for this transform object. Therefore the position matrix the rotation matrix and the scale matrix is multiplied. The parent transform is used to calculate this matrix (if and only if existing).
Model matrix (with parent transform)
Note that this class can be used without a GameObject but will in this case not be used in the scene. This creates a new Transform object where position and rotation can be specified (by default they are 0). This constructor can also be used with a specified scale value (which by default is 1).
pos: The three dimensional position of the object
rot: The three dimensional rotation of the object
scale: The three dimensional scale of the object
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.
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.