Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
TexturedMesh Class Reference

Structure representing a textured mesh. More...

#include <model.h>

Inheritance diagram for TexturedMesh:
Collaboration diagram for TexturedMesh:

Public Member Functions

void constructor (const char *path)
 Constructor for the textured mesh class.
 
void get_settings_data (void ***ptr, int *length)
 Retrieves settings data.
 
void load (FILE *file)
 Loads data from a file.
 
void save (FILE *file)
 Saves the current state of the textured mesh to a file.
 
void render (mat4 modelMatrix, Shader activeShader)
 Renders the textured mesh using the provided model matrix and active shader.
 
- Public Member Functions inherited from Node
void constructor ()
 Constructor for the Node class.
 
void initialize_node ()
 Initializes a node.
 
void get_glow_shader (Shader *shader)
 Retrieves the glow shader.
 
void get_settings_data (void ***ptr, int *length)
 Retrieves settings data.
 
void load ()
 Loads the necessary resources or data for the node.
 
void save (FILE *file)
 Saves the current state to the specified file.
 
void prepare_render (mat4 modelMatrix, Shader activeShader)
 Renders a node using the specified model matrix and shader.
 
void render ()
 Renders the node.
 
void update_global_position (vec3 pos, vec3 rot, vec3 scale)
 Updates the global position of a node.
 
void update (vec3 pos, vec3 rot, vec3 scale)
 Updates the position, rotation, and scale of a node.
 
void on_resize ()
 Handles the resize event for the node.
 
void free ()
 Frees the resources allocated by the object.
 
void is_cshape (bool *cshape)
 Checks if the current shape is a custom shape.
 
void is_body (bool *body)
 Sets the body status of the node.
 
void is_area (bool *area)
 Checks if the current node is within a specified area.
 
void is_render_target (bool *render_target)
 Sets the render target status.
 
void is_gui_element (bool *result)
 Determines if the current node is a GUI element.
 
void add_child (Node *child)
 Adds a child node to a parent node.
 
void add_child_and_realloc (Node *child)
 Adds a child node to a parent node and reallocates memory if necessary.
 
void remove_child (Node *child)
 Removes a child node from a parent node.
 
void remove_child_and_realloc (Node *child)
 Removes a child node from a parent node and reallocates memory if necessary.
 
void remove_child_and_free (Node *child)
 Removes a child node from a parent node and frees the memory of the child node.
 
void remove_child_and_free_and_realloc (Node *child)
 Removes a child node from a parent node, frees the memory of the child node, and reallocates memory if necessary.
 
int index_of_child (Node *child)
 Retrieves the index of a child node in a parent node's children array.
 
void print (int level)
 Prints the details of a node at a specified level of indentation.
 
void emit_ready (...)
 Emits the 'ready' signal for the node.
 
void emit_update (...)
 Emits an update event for the node.
 
void emit_signal (...)
 Emits a signal if the node has a script and the script has a signal handler.
 

Public Attributes

VAO VAO
 
TextureMap texture
 
u8 length
 
- Public Attributes inherited from Node
void * object
 
struct Node ** children
 
struct Nodeparent
 
u16 length
 
u8 type
 
u8 flags
 
vec3 pos
 
vec3 rot
 
vec3 scale
 
vec3 globalPos
 
vec3 globalRot
 
vec3 globalScale
 
Behaviorbehavior
 
BehaviorAttributeattribute
 
u8 attributes_count
 
Shader shader
 

Additional Inherited Members

- Static Public Attributes inherited from Node
static Shader glowShader = 0
 A static Shader variable used for glow effect.
 

Detailed Description

Structure representing a textured mesh.

This structure holds the Vertex Array Object (VAO) and texture map of a textured mesh.

Member Function Documentation

◆ constructor()

void TexturedMesh::constructor ( const char *  path)
inline

Constructor for the textured mesh class.

This function initializes a textured mesh object using the provided file path.

Parameters
pathThe file path to the texture to be used for the mesh.

◆ get_settings_data()

void TexturedMesh::get_settings_data ( void ***  ptr,
int *  length 
)
inline

Retrieves settings data.

This function retrieves settings data and stores it in the provided pointer.

Parameters
[out]ptrA pointer to a pointer to a pointer where the settings data will be stored.
[out]lengthA pointer to an integer where the length of the settings data will be stored.

◆ load()

void TexturedMesh::load ( FILE *  file)
inline

Loads data from a file.

This function reads data from the provided file pointer and loads it into the appropriate structures.

Parameters
fileA pointer to the FILE object that represents the file to be read.

◆ save()

void TexturedMesh::save ( FILE *  file)
inline

Saves the current state of the textured mesh to a file.

This function writes the necessary data of the textured mesh to the provided file.

Parameters
fileA pointer to the FILE object where the textured mesh data will be saved.

◆ render()

void TexturedMesh::render ( mat4  modelMatrix,
Shader  activeShader 
)
inline

Renders the textured mesh using the provided model matrix and active shader.

This function takes a model matrix and an active shader as input parameters and renders the textured mesh accordingly. The model matrix is used to transform the mesh, and the shader is used to apply the necessary rendering effects.

Parameters
modelMatrixModel matrix used for transforming the mesh.
activeShaderThe shader program used for rendering the mesh.

Member Data Documentation

◆ VAO

VAO TexturedMesh::VAO

Vertex Array Object

◆ texture

TextureMap TexturedMesh::texture

Texture map

◆ length

u8 TexturedMesh::length

Length of the textured mesh


The documentation for this class was generated from the following files: