3Scene::Scene(
unsigned int maxObjects) : maxObjects(maxObjects) {
37 for (
unsigned int i = element; i <
numObjects - 1; i++) {
43 if (i < numObjects && i >= 0) {
50 for (
unsigned int i = 0; i <
numObjects; i++) {
Defines the Scene class for managing objects and effects in a 3D environment.
Abstract base class for applying visual effects to pixel groups.
Represents a 3D object with geometry, material, and transformation data.
void SetEffect(Effect *effect)
Sets the screen-space effect for the scene.
Object3D ** objects
Array of pointers to the Object3D instances in the scene.
~Scene()
Destructor for Scene, freeing allocated resources.
bool doesUseEffect
Flag indicating whether the effect is enabled.
void RemoveObject(unsigned int i)
Removes a 3D object from the scene by its index.
void AddObject(Object3D *object)
Adds a 3D object to the scene.
bool UseEffect()
Checks if an effect is enabled for the scene.
void DisableEffect()
Disables the screen-space effect for the scene.
const int maxObjects
Maximum number of objects allowed in the scene.
void RemoveElement(unsigned int element)
Removes an object from the scene by its index.
uint8_t GetObjectCount()
Retrieves the current number of objects in the scene.
Object3D ** GetObjects()
Retrieves all objects in the scene.
Effect * effect
Pointer to the screen-space Effect applied to the scene.
unsigned int numObjects
Current number of objects in the scene.
Scene(unsigned int maxObjects)
Constructs a Scene instance.
Effect * GetEffect()
Retrieves the current screen-space effect.
void EnableEffect()
Enables the screen-space effect for the scene.