ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
ProtogenProject Class Referenceabstract

A default project template that includes functionality for an analog microphone, APDS9960 boop sensor, and button control. It provides a small-scale 3D rendering environment and various material animations for prototyping. More...

#include <ProtogenProjectTemplate.h>

Inheritance diagram for ProtogenProject:
Collaboration diagram for ProtogenProject:

Public Member Functions

 ProtogenProject (CameraManager *cameras, Controller *controller, uint8_t numObjects, Vector2D camMin, Vector2D camMax, uint8_t microphonePin, uint8_t buttonPin, uint8_t faceCount)
 Constructs a ProtogenProject instance.
 
void Initialize () override
 Initializes the ProtogenProject, setting up sensors, menus, and hardware.
 
virtual void SpectrumAnalyzerCallback ()=0
 Callback invoked when the Spectrum Analyzer face is enabled/updated.
 
virtual void AudioReactiveGradientCallback ()=0
 Callback invoked when the Audio Reactive Gradient face is enabled/updated.
 
virtual void OscilloscopeCallback ()=0
 Callback invoked when the Oscilloscope face is enabled/updated.
 
- Public Member Functions inherited from Project
 Project (CameraManager *cameras, Controller *controller, uint8_t numObjects)
 Constructs a Project with specified camera manager and controller.
 
float GetAnimationTime ()
 Retrieves the time spent on animations.
 
float GetRenderTime ()
 Retrieves the time spent on rendering.
 
float GetDisplayTime ()
 Retrieves the time spent on display operations.
 
float GetFrameRate ()
 Retrieves the current frame rate.
 
void Animate (float ratio)
 Animates the project state based on the given ratio.
 
void Render ()
 Renders the scene.
 
void Display ()
 Updates the display with the rendered content.
 
void PrintStats ()
 Prints performance statistics such as frame rate and operation times.
 

Protected Types

enum  Color {
  CBASE , CYELLOW , CORANGE , CWHITE ,
  CGREEN , CPURPLE , CRED , CBLUE ,
  CRAINBOW , CRAINBOWNOISE , CHORIZONTALRAINBOW , CBLACK
}
 Enumeration of different color states for the face material. More...
 

Protected Member Functions

virtual void LinkControlParameters ()=0
 Links external or user-defined control parameters (pure virtual to be implemented).
 
void UpdateFace (float ratio)
 Updates the face's rendered content, reading any user input and applying changes.
 
void SetCameraMain (Vector2D min, Vector2D max)
 Sets the camera bounds for the main (front) view.
 
void SetCameraRear (Vector2D min, Vector2D max)
 Sets the camera bounds for the rear view.
 
Transform GetAlignmentTransform (Vector2D min, Vector2D max, Object3D *obj, float rotation=0.0f, float margin=2.0f)
 Computes a transform for aligning a single Object3D within the given bounds.
 
Transform GetAlignmentTransform (Vector2D min, Vector2D max, Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f)
 Computes a transform for aligning multiple Object3D objects within the given bounds.
 
void AlignObject (Vector2D min, Vector2D max, Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns a single Object3D within the given bounds, applying scaling.
 
void AlignObjects (Vector2D min, Vector2D max, Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns multiple Object3D objects, applying scaling.
 
void AlignObjectNoScale (Vector2D min, Vector2D max, Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns a single Object3D without scaling.
 
void AlignObjectsNoScale (Vector2D min, Vector2D max, Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns multiple Object3D objects without scaling.
 
void AlignObjectFace (Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns a single Object3D to the "face" camera bounds with scaling.
 
void AlignObjectsFace (Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns multiple Object3D objects to the "face" camera bounds with scaling.
 
void AlignObjectNoScaleFace (Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns a single Object3D to the "face" camera bounds without scaling.
 
void AlignObjectsNoScaleFace (Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns multiple Object3D objects to the "face" camera bounds without scaling.
 
void AlignObjectRear (Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns a single Object3D to the rear camera bounds with scaling.
 
void AlignObjectsRear (Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns multiple Object3D objects to the rear camera bounds with scaling.
 
void AlignObjectNoScaleRear (Object3D *obj, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns a single Object3D to the rear camera bounds without scaling.
 
void AlignObjectsNoScaleRear (Object3D **objects, uint8_t objectCount, float rotation=0.0f, float margin=2.0f, bool mirror=true)
 Aligns multiple Object3D objects to the rear camera bounds without scaling.
 
ObjectAlignGetObjectAlign ()
 Gets the generic ObjectAlign instance.
 
ObjectAlignGetObjectAlignFace ()
 Gets the ObjectAlign instance for the face camera.
 
ObjectAlignGetObjectAlignRear ()
 Gets the ObjectAlign instance for the rear camera.
 
float GetFaceScale ()
 Computes the face scaling based on a user-defined face size.
 
void AddParameter (uint8_t index, float *parameter, uint16_t transitionFrames, IEasyEaseAnimator::InterpolationMethod interpolationMethod=IEasyEaseAnimator::InterpolationMethod::Overshoot, bool invertDirection=false)
 Adds a parameter to the EasyEaseAnimator for interpolation.
 
void AddViseme (Viseme::MouthShape visemeName, float *parameter)
 Adds a viseme parameter to the animator (for mouth shapes).
 
void AddBlinkParameter (float *blinkParameter)
 Adds a float parameter to the blink track for controlling blinking.
 
void AddParameterFrame (uint16_t ProjectIndex, float target)
 Adds a frame target to a previously added parameter.
 
void AddMaterial (Material::Method method, Material *material, uint16_t frames=20, float minOpacity=0.0f, float maxOpacity=1.0f)
 Adds a new material to the face's MaterialAnimator with given parameters.
 
void AddMaterialFrame (Color color, float opacity=0.8f)
 Adds a new material frame to the face's MaterialAnimator from a color enum.
 
void AddMaterialFrame (Material &material, float opacity=1.0f)
 Adds a new material frame to the face's MaterialAnimator from a Material reference.
 
void AddBackgroundMaterial (Material::Method method, Material *material, uint16_t frames=20, float minOpacity=0.0f, float maxOpacity=1.0f)
 Adds a new material to the background's MaterialAnimator with given parameters.
 
void AddBackgroundMaterialFrame (Color color, float opacity=0.8f)
 Adds a material frame to the background from a color enum.
 
void AddBackgroundMaterialFrame (Material &material, float opacity=1.0f)
 Adds a material frame to the background from a Material reference.
 
void SpectrumAnalyzerFace ()
 Enables the Spectrum Analyzer on the face, updating offsets and calling callbacks.
 
void AudioReactiveGradientFace ()
 Enables the Audio Reactive Gradient on the face, updating offsets and calling callbacks.
 
void OscilloscopeFace ()
 Enables the Oscilloscope on the face, updating offsets and calling callbacks.
 
void HideFace ()
 Hides the face by setting its offset parameter.
 
void DisableBlinking ()
 Disables blinking (pauses and resets the blink track).
 
void EnableBlinking ()
 Enables blinking (resets and plays the blink track).
 
bool IsBooped ()
 Checks if the sensor has detected a boop.
 
Vector3D GetWiggleOffset ()
 Computes and returns a Vector3D offset for a "wiggle" effect using function generators.
 
void SetWiggleSpeed (float multiplier)
 Sets the overall wiggle speed for both X and Y function generators.
 
void SetMenuWiggleSpeed (float multiplierX, float multiplierY, float multiplierR)
 Adjusts the menu's wiggle speed along X, Y, and rotation.
 
void SetMenuOffset (Vector2D offset)
 Sets the menu's position offset.
 
void SetMenuSize (Vector2D size)
 Sets the menu's size.
 
MaterialGetFaceMaterial ()
 Retrieves the current face material animator.
 
MaterialGetBackgroundMaterial ()
 Retrieves the current background material animator.
 
- Protected Member Functions inherited from Project
virtual void Update (float ratio)=0
 Updates the project state based on the given ratio.
 
void RenderStartTimer ()
 Starts the render timer for measuring render performance.
 
void RenderEndTimer ()
 Stops the render timer and records the elapsed time.
 

Protected Attributes

EasyEaseAnimator< 60 > eEA = EasyEaseAnimator<60>(IEasyEaseAnimator::Overshoot, 1.0f, 0.35f)
 Animator that eases parameter transitions.
 
HeadsUpDisplay hud = HeadsUpDisplay(Vector2D(0.0f, 0.0f), Vector2D(192.0f, 96.0f))
 Heads-up display (HUD) for the face overlay or additional data.
 
- Protected Attributes inherited from Project
CameraManagercameras
 Pointer to the CameraManager for managing cameras.
 
Controllercontroller
 Pointer to the Controller for controlling the display.
 
Scene scene
 The Scene object representing the rendered environment.
 
RunningAverageFilter< 50 > avgFPS = RunningAverageFilter<50>(0.05f)
 Running average filter for frame rate calculation.
 
long previousAnimationTime = 0
 Time of the previous animation frame in microseconds.
 
long previousRenderTime = 0
 Time of the previous render frame in microseconds.
 
long previousDisplayTime = 0
 Time of the previous display frame in microseconds.
 
float fade = 0.0f
 Fade parameter for animations.
 
float animationTime = 0.0f
 Time spent on animation in milliseconds.
 
float renderTime = 0.0f
 Time spent on rendering in milliseconds.
 
float displayTime = 0.0f
 Time spent on display in milliseconds.
 

Private Member Functions

void LinkParameters ()
 Links internal parameters to the EasyEaseAnimator or other controllers.
 
void SetBaseMaterial (Material *material)
 Sets the base material for the face material animator.
 
void SetMaterialLayers ()
 Sets up the initial layering of materials for both the face and background.
 
void UpdateKeyFrameTracks ()
 Updates any keyframe tracks (e.g., blink track).
 
void UpdateFFTVisemes ()
 Updates FFT-based visemes for voice detection and mouth shape animations.
 
void SetMaterialColor ()
 Sets the material color based on menu selection, applying color changes.
 

Private Attributes

Background background
 Background object and associated 3D model.
 
Vector2D camMin = Vector2D(0.0f, 0.0f)
 Minimum and maximum bounds for the primary (front) camera view.
 
Vector2D camMax = Vector2D(189.0f, 93.0f)
 Front camera maximum bounds.
 
Vector2D camMinRear = Vector2D(214.0f, 5.0f)
 Minimum and maximum bounds for the rear camera view.
 
Vector2D camMaxRear = Vector2D(279.0f, 100.0f)
 Rear camera maximum bounds.
 
bool isBooped = false
 Flag to indicate if the APDS9960 sensor has detected a "boop".
 
bool blinkSet = false
 Flag to indicate if the blink parameter has been set.
 
Vector2D cameraSize
 The size of the camera used for rendering calculations.
 
float xOffset = 0.0f
 Offsets used for small "wiggle" or motion in the scene.
 
float yOffset = 0.0f
 Y-axis offset.
 
uint8_t microphonePin = 0
 Pin assignments and face count.
 
uint8_t buttonPin = 0
 Pin for the button input.
 
uint8_t faceCount = 10
 Total number of faces available (e.g., for UI or animations).
 
FlowNoise flowNoise
 Noise-based animated material.
 
RainbowSpiral rainbowSpiral
 Spiral rainbow animated material.
 
HorizontalRainbow hRainbow
 Horizontal rainbow animated material.
 
SimpleMaterial redMaterial = SimpleMaterial(RGBColor(255, 0, 0))
 Solid red material.
 
SimpleMaterial orangeMaterial = SimpleMaterial(RGBColor(255, 165, 0))
 Solid orange material.
 
SimpleMaterial whiteMaterial = SimpleMaterial(RGBColor(255, 255, 255))
 Solid white material.
 
SimpleMaterial greenMaterial = SimpleMaterial(RGBColor(0, 255, 0))
 Solid green material.
 
SimpleMaterial blueMaterial = SimpleMaterial(RGBColor(0, 0, 255))
 Solid blue material.
 
SimpleMaterial yellowMaterial = SimpleMaterial(RGBColor(255, 255, 0))
 Solid yellow material.
 
SimpleMaterial purpleMaterial = SimpleMaterial(RGBColor(255, 0, 255))
 Solid purple material.
 
SimpleMaterial blackMaterial = SimpleMaterial(RGBColor(0, 0, 0))
 Solid black material.
 
RGBColor gradientSpectrum [2] = {RGBColor(255, 0, 0), RGBColor(255, 0, 0)}
 Gradient used for color transitions.
 
GradientMaterial< 2 > gradientMat = GradientMaterial<2>(gradientSpectrum, 350.0f, false)
 
MaterialAnimator< 20 > materialAnimator
 Material animators for face and background layering.
 
MaterialAnimator< 20 > backgroundMaterial
 Handles layering of background materials.
 
SpectrumAnalyzer sA = SpectrumAnalyzer(Vector2D(200, 100), Vector2D(100, 50), true, true)
 Audio-reactive materials.
 
AudioReactiveGradient aRG = AudioReactiveGradient(Vector2D(160, 160), Vector2D(0, 0), true, true)
 
Oscilloscope oSC = Oscilloscope(Vector2D(200, 100), Vector2D(0, 0))
 
BlinkTrack< 2 > blink
 Blink track handler.
 
ObjectAlign objA = ObjectAlign(camMin, camMax, Quaternion())
 Object alignment for the front, rear, and an additional alignment object.
 
ObjectAlign objARear = ObjectAlign(camMinRear, camMaxRear, Quaternion())
 Alignment for the rear camera.
 
ObjectAlign objAOther = ObjectAlign(Vector2D(), Vector2D(), Quaternion())
 Generic alignment object.
 
FunctionGenerator fGenMatXMove = FunctionGenerator(FunctionGenerator::Sine, -2.0f, 2.0f, 5.3f)
 Function generators for X/Y wiggle movements.
 
FunctionGenerator fGenMatYMove = FunctionGenerator(FunctionGenerator::Sine, -2.0f, 2.0f, 6.7f)
 
FanController fanController = FanController(15)
 Fan controller for controlling a fan's PWM.
 
APDS9960 boop
 Gesture sensor used for detecting "boops.".
 
FFTVoiceDetection< 128 > voiceDetection
 Voice detection system based on FFT data.
 
float offsetFace = 0.0f
 Facial offset parameters for layering advanced materials (e.g., Spectrum Analyzer).
 
float offsetFaceSA = 0.0f
 Offset for SpectrumAnalyzer face.
 
float offsetFaceARG = 0.0f
 Offset for AudioReactiveGradient face.
 
float offsetFaceOSC = 0.0f
 Offset for Oscilloscope face.
 
uint8_t offsetFaceInd = 50
 Index for generic face offset in EasyEaseAnimator.
 
uint8_t offsetFaceIndSA = 51
 Index for SpectrumAnalyzer offset in EasyEaseAnimator.
 
uint8_t offsetFaceIndARG = 52
 Index for AudioReactiveGradient offset in EasyEaseAnimator.
 
uint8_t offsetFaceIndOSC = 53
 Index for Oscilloscope offset in EasyEaseAnimator.
 
TimeStep frameLimiter = TimeStep(120)
 A TimeStep object to limit frames (e.g., to 120 FPS).
 

Detailed Description

A default project template that includes functionality for an analog microphone, APDS9960 boop sensor, and button control. It provides a small-scale 3D rendering environment and various material animations for prototyping.

This class inherits from Project and extends it with additional features:

  • 2D camera alignment (front/rear) for objects
  • Material layering and animation
  • Microphone input (Fourier analysis, voice detection, spectrum analysis, etc.)
  • Gesture/boop sensor detection
  • EasyEaseAnimations for param-based transitions
  • HUD handling and UI control via menu

Definition at line 54 of file ProtogenProjectTemplate.h.

Member Enumeration Documentation

◆ Color

enum Color
protected

Enumeration of different color states for the face material.

Enumerator
CBASE 

Base or default color.

CYELLOW 

Yellow color.

CORANGE 

Orange color.

CWHITE 

White color.

CGREEN 

Green color.

CPURPLE 

Purple color.

CRED 

Red color.

CBLUE 

Blue color.

CRAINBOW 

Rainbow spiral.

CRAINBOWNOISE 

Flow noise (rainbow noise).

CHORIZONTALRAINBOW 

Horizontal rainbow effect.

CBLACK 

Black color.

Definition at line 218 of file ProtogenProjectTemplate.h.

Constructor & Destructor Documentation

◆ ProtogenProject()

ProtogenProject ( CameraManager cameras,
Controller controller,
uint8_t  numObjects,
Vector2D  camMin,
Vector2D  camMax,
uint8_t  microphonePin,
uint8_t  buttonPin,
uint8_t  faceCount 
)

Constructs a ProtogenProject instance.

Parameters
camerasPointer to the project's CameraManager.
controllerPointer to the main Controller.
numObjectsNumber of objects (including extra for internal usage).
camMinThe minimum 2D bounds for the main camera.
camMaxThe maximum 2D bounds for the main camera.
microphonePinThe pin used for the microphone.
buttonPinThe pin used for the button.
faceCountThe number of faces for possible UI or animations.

Definition at line 517 of file ProtogenProjectTemplate.cpp.

References Scene::AddObject(), background, backgroundMaterial, buttonPin, cameraSize, camMax, camMin, Scene::EnableEffect(), faceCount, hud, LinkParameters(), microphonePin, objA, oSC, sA, Project::scene, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), HeadsUpDisplay::SetFaceMax(), HeadsUpDisplay::SetFaceMin(), ObjectAlign::SetJustification(), SetMaterialLayers(), Oscilloscope::SetPosition(), SpectrumAnalyzer::SetPosition(), Oscilloscope::SetSize(), SpectrumAnalyzer::SetSize(), and ObjectAlign::Stretch.

Member Function Documentation

◆ AddBackgroundMaterial()

void AddBackgroundMaterial ( Material::Method  method,
Material material,
uint16_t  frames = 20,
float  minOpacity = 0.0f,
float  maxOpacity = 1.0f 
)
protected

Adds a new material to the background's MaterialAnimator with given parameters.

Parameters
methodThe blend method.
materialThe material to add.
framesTransition frames.
minOpacityMinimum opacity.
maxOpacityMaximum opacity.

Definition at line 386 of file ProtogenProjectTemplate.cpp.

References MaterialAnimator< materialCount >::AddMaterial(), and backgroundMaterial.

Referenced by UnicornZhenjaAnimation::UnicornZhenjaAnimation().

◆ AddBackgroundMaterialFrame() [1/2]

void AddBackgroundMaterialFrame ( Color  color,
float  opacity = 0.8f 
)
protected

◆ AddBackgroundMaterialFrame() [2/2]

void AddBackgroundMaterialFrame ( Material material,
float  opacity = 1.0f 
)
protected

Adds a material frame to the background from a Material reference.

Parameters
materialThe material to add.
opacityThe target opacity.

Definition at line 430 of file ProtogenProjectTemplate.cpp.

References MaterialAnimator< materialCount >::AddMaterialFrame(), and backgroundMaterial.

◆ AddBlinkParameter()

◆ AddMaterial()

void AddMaterial ( Material::Method  method,
Material material,
uint16_t  frames = 20,
float  minOpacity = 0.0f,
float  maxOpacity = 1.0f 
)
protected

Adds a new material to the face's MaterialAnimator with given parameters.

Parameters
methodThe blend method (e.g., Material::Add, Material::Replace).
materialPointer to the material to add.
framesHow many frames the transition will take.
minOpacityThe minimum opacity.
maxOpacityThe maximum opacity.

Definition at line 338 of file ProtogenProjectTemplate.cpp.

References MaterialAnimator< materialCount >::AddMaterial(), and materialAnimator.

Referenced by SplatAnimation::SplatAnimation(), and UnicornZhenjaAnimation::UnicornZhenjaAnimation().

◆ AddMaterialFrame() [1/2]

void AddMaterialFrame ( Color  color,
float  opacity = 0.8f 
)
protected

Adds a new material frame to the face's MaterialAnimator from a color enum.

Parameters
colorThe color enum to switch to.
opacityThe target opacity for that color material.

Definition at line 342 of file ProtogenProjectTemplate.cpp.

References MaterialAnimator< materialCount >::AddMaterialFrame(), blackMaterial, blueMaterial, CBLACK, CBLUE, CGREEN, CHORIZONTALRAINBOW, CORANGE, CPURPLE, CRAINBOW, CRAINBOWNOISE, CRED, CWHITE, CYELLOW, flowNoise, greenMaterial, hRainbow, materialAnimator, orangeMaterial, purpleMaterial, rainbowSpiral, redMaterial, whiteMaterial, and yellowMaterial.

Referenced by BetaProject::AlphaGenCircle(), ArrowAnimation::Angry(), DrGonzoTest::Angry(), SplatAnimation::Angry(), FursuitEyesV1::Angry(), ProtogenHUB75Project::Angry(), ProtogenWS35Project::Angry(), SageAnimation::Angry2(), SageAnimation::Angry3(), BetaProject::AngryFace(), BetaProject::AudioReactiveGradientCallback(), ProtogenHUB75Project::AudioReactiveGradientCallback(), ProtogenWS35Project::AudioReactiveGradientCallback(), AceAnimation::Blush(), SplatAnimation::Confused(), BetaProject::Crash(), UnicornZhenjaAnimation::Dead(), BetaProject::Dead(), SplatAnimation::Default(), UnicornZhenjaAnimation::Default(), SplatAnimation::Disappointed(), UnicornZhenjaAnimation::Dizzy(), BetaProject::Dizzy(), FursuitEyesV1::Dot(), ArrowAnimation::Excited(), SplatAnimation::Excited(), BetaProject::Frustrated(), SplatAnimation::FullCircle(), BetaProject::Gentle(), ArrowAnimation::Happy(), ArrowAnimation::Heart(), SplatAnimation::Heart(), UnicornZhenjaAnimation::Heart(), BetaProject::Heart(), SplatAnimation::HollowCircle(), DrGonzoProject::Loading(), UnicornZhenjaAnimation::Loading(), BetaProject::OscilloscopeCallback(), ProtogenHUB75Project::OscilloscopeCallback(), ProtogenWS35Project::OscilloscopeCallback(), ArrowAnimation::Owo(), BetaProject::OwO(), BetaProject::OwO2(), UnicornZhenjaAnimation::Pupil(), DrGonzoTest::Sad(), UnicornZhenjaAnimation::Sad(), BetaProject::Sad(), ProtogenHUB75Project::Sad(), ProtogenWS35Project::Sad(), UnicornZhenjaAnimation::Salty(), BetaProject::Shocked(), SplatAnimation::Sleepy(), UnicornZhenjaAnimation::Sleepy(), BetaProject::SpectrumAnalyzerCallback(), ProtogenHUB75Project::SpectrumAnalyzerCallback(), ProtogenWS35Project::SpectrumAnalyzerCallback(), BetaProject::StandbyF(), UnicornZhenjaAnimation::Static(), DrGonzoTest::Surprised(), ProtogenHUB75Project::Surprised(), ProtogenWS35Project::Surprised(), UnicornZhenjaAnimation::Update(), UnicornZhenjaAnimation::Upset(), and ArrowAnimation::Uwu().

◆ AddMaterialFrame() [2/2]

void AddMaterialFrame ( Material material,
float  opacity = 1.0f 
)
protected

Adds a new material frame to the face's MaterialAnimator from a Material reference.

Parameters
materialA reference to the material to add.
opacityThe target opacity.

Definition at line 382 of file ProtogenProjectTemplate.cpp.

References MaterialAnimator< materialCount >::AddMaterialFrame(), and materialAnimator.

◆ AddParameter()

void AddParameter ( uint8_t  index,
float parameter,
uint16_t  transitionFrames,
IEasyEaseAnimator::InterpolationMethod  interpolationMethod = IEasyEaseAnimator::InterpolationMethod::Overshoot,
bool  invertDirection = false 
)
protected

Adds a parameter to the EasyEaseAnimator for interpolation.

Parameters
indexThe parameter index within the animator.
parameterPointer to the float parameter to animate.
transitionFramesHow many frames the transition should take.
interpolationMethodThe interpolation method (overshoot, linear, etc.).
invertDirectionWhether to invert the animation (1.0f to 0.0f).

Definition at line 311 of file ProtogenProjectTemplate.cpp.

References EasyEaseAnimator< maxParameters >::AddParameter(), eEA, and EasyEaseAnimator< maxParameters >::SetInterpolationMethod().

Referenced by AceAnimation::LinkControlParameters(), ArrowAnimation::LinkControlParameters(), DrGonzoProject::LinkControlParameters(), DrGonzoTest::LinkControlParameters(), SageAnimation::LinkControlParameters(), SplatAnimation::LinkControlParameters(), UnicornZhenjaAnimation::LinkControlParameters(), FursuitEyesV1::LinkControlParameters(), BetaProject::LinkControlParameters(), ProtogenHUB75Project::LinkControlParameters(), and ProtogenWS35Project::LinkControlParameters().

◆ AddParameterFrame()

void AddParameterFrame ( uint16_t  ProjectIndex,
float  target 
)
protected

Adds a frame target to a previously added parameter.

Parameters
ProjectIndexThe index for the parameter.
targetThe target value for that parameter.

Definition at line 334 of file ProtogenProjectTemplate.cpp.

References EasyEaseAnimator< maxParameters >::AddParameterFrame(), and eEA.

Referenced by BetaProject::AlphaGenCircle(), AceAnimation::Angry(), ArrowAnimation::Angry(), DrGonzoTest::Angry(), SplatAnimation::Angry(), FursuitEyesV1::Angry(), ProtogenHUB75Project::Angry(), ProtogenWS35Project::Angry(), SageAnimation::Angry1(), SageAnimation::Angry2(), SageAnimation::Angry3(), BetaProject::AngryFace(), DrGonzoProject::Angy(), AceAnimation::Blush(), SageAnimation::Blush(), DrGonzoProject::Boop(), FursuitEyesV1::Close(), SplatAnimation::Confused(), AceAnimation::Content(), BetaProject::Crash(), UnicornZhenjaAnimation::Dead(), BetaProject::Dead(), UnicornZhenjaAnimation::Default(), BetaProject::Default(), FursuitEyesV1::Disappoint(), SplatAnimation::Disappointed(), DrGonzoProject::Dizzy(), SageAnimation::Dizzy(), UnicornZhenjaAnimation::Dizzy(), BetaProject::Dizzy(), FursuitEyesV1::Dot(), DrGonzoTest::Doubt(), ProtogenHUB75Project::Doubt(), ProtogenWS35Project::Doubt(), ArrowAnimation::Excited(), SplatAnimation::Excited(), DrGonzoTest::Frown(), ProtogenHUB75Project::Frown(), ProtogenWS35Project::Frown(), BetaProject::Frustrated(), SplatAnimation::FullCircle(), BetaProject::Gentle(), AceAnimation::Happy(), ArrowAnimation::Happy(), DrGonzoProject::Happy(), ArrowAnimation::Heart(), SplatAnimation::Heart(), UnicornZhenjaAnimation::Heart(), FursuitEyesV1::Heart(), BetaProject::Heart(), SplatAnimation::HollowCircle(), DrGonzoProject::Lewd(), DrGonzoProject::Loading(), UnicornZhenjaAnimation::Loading(), DrGonzoTest::LookDown(), ProtogenHUB75Project::LookDown(), ProtogenWS35Project::LookDown(), DrGonzoTest::LookUp(), ProtogenHUB75Project::LookUp(), ProtogenWS35Project::LookUp(), ArrowAnimation::Owo(), DrGonzoProject::OwO(), SageAnimation::OwO(), BetaProject::OwO(), BetaProject::OwO2(), UnicornZhenjaAnimation::Pupil(), DrGonzoProject::Question(), FursuitEyesV1::Question(), DrGonzoProject::Sad(), DrGonzoTest::Sad(), SageAnimation::Sad(), UnicornZhenjaAnimation::Sad(), FursuitEyesV1::Sad(), BetaProject::Sad(), ProtogenHUB75Project::Sad(), ProtogenWS35Project::Sad(), UnicornZhenjaAnimation::Salty(), AceAnimation::Scrunchy(), AceAnimation::Seriously(), BetaProject::Shocked(), SplatAnimation::Sleepy(), UnicornZhenjaAnimation::Sleepy(), AceAnimation::Smirk(), BetaProject::StandbyF(), UnicornZhenjaAnimation::Static(), AceAnimation::Surprised(), DrGonzoTest::Surprised(), SageAnimation::Surprised(), ProtogenHUB75Project::Surprised(), ProtogenWS35Project::Surprised(), SageAnimation::Tired(), ArrowAnimation::Unamused(), UnicornZhenjaAnimation::Upset(), and ArrowAnimation::Uwu().

◆ AddViseme()

◆ AlignObject()

void AlignObject ( Vector2D  min,
Vector2D  max,
Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns a single Object3D within the given bounds, applying scaling.

Parameters
minThe minimum 2D bounds.
maxThe maximum 2D bounds.
objPointer to the Object3D to align.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror the object along the X-axis.

Definition at line 190 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObject(), objAOther, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

Referenced by DrGonzoTest::Update(), and FursuitEyesV1::Update().

◆ AlignObjectFace()

void AlignObjectFace ( Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns a single Object3D to the "face" camera bounds with scaling.

Parameters
objPointer to the Object3D to align.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 234 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObject(), objA, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

Referenced by AceAnimation::Update(), ArrowAnimation::Update(), DrGonzoProject::Update(), SageAnimation::Update(), SplatAnimation::Update(), UnicornZhenjaAnimation::Update(), BetaProject::Update(), ProtogenHUB75Project::Update(), and ProtogenWS35Project::Update().

◆ AlignObjectNoScale()

void AlignObjectNoScale ( Vector2D  min,
Vector2D  max,
Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns a single Object3D without scaling.

Parameters
minThe minimum 2D bounds.
maxThe maximum 2D bounds.
objPointer to the Object3D to align.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror the object along the X-axis.

Definition at line 212 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjectNoScale(), objAOther, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AlignObjectNoScaleFace()

void AlignObjectNoScaleFace ( Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns a single Object3D to the "face" camera bounds without scaling.

Parameters
objPointer to the Object3D to align.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 248 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjectNoScale(), objA, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AlignObjectNoScaleRear()

void AlignObjectNoScaleRear ( Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns a single Object3D to the rear camera bounds without scaling.

Parameters
objPointer to the Object3D to align.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 276 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjectNoScale(), objARear, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

Referenced by SageAnimation::Update().

◆ AlignObjectRear()

void AlignObjectRear ( Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns a single Object3D to the rear camera bounds with scaling.

Parameters
objPointer to the Object3D to align.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 262 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObject(), objARear, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

Referenced by DrGonzoProject::Update(), and BetaProject::Update().

◆ AlignObjects()

void AlignObjects ( Vector2D  min,
Vector2D  max,
Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns multiple Object3D objects, applying scaling.

Parameters
minThe minimum 2D bounds.
maxThe maximum 2D bounds.
objectsArray of Object3D pointers.
objectCountNumber of objects.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 201 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjects(), objAOther, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AlignObjectsFace()

void AlignObjectsFace ( Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns multiple Object3D objects to the "face" camera bounds with scaling.

Parameters
objectsArray of Object3D pointers.
objectCountNumber of objects.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 241 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjects(), objA, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AlignObjectsNoScale()

void AlignObjectsNoScale ( Vector2D  min,
Vector2D  max,
Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns multiple Object3D objects without scaling.

Parameters
minThe minimum 2D bounds.
maxThe maximum 2D bounds.
objectsArray of Object3D pointers.
objectCountNumber of objects.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 223 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjectsNoScale(), objAOther, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

Referenced by AceAnimation::Update().

◆ AlignObjectsNoScaleFace()

void AlignObjectsNoScaleFace ( Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns multiple Object3D objects to the "face" camera bounds without scaling.

Parameters
objectsArray of Object3D pointers.
objectCountNumber of objects.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 255 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjectsNoScale(), objA, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AlignObjectsNoScaleRear()

void AlignObjectsNoScaleRear ( Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns multiple Object3D objects to the rear camera bounds without scaling.

Parameters
objectsArray of Object3D pointers.
objectCountNumber of objects.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 283 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjectsNoScale(), objARear, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AlignObjectsRear()

void AlignObjectsRear ( Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f,
bool  mirror = true 
)
protected

Aligns multiple Object3D objects to the rear camera bounds with scaling.

Parameters
objectsArray of Object3D pointers.
objectCountNumber of objects.
rotationRotation to apply.
marginMargin spacing.
mirrorWhether to mirror along the X-axis.

Definition at line 269 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::AlignObjects(), objARear, ObjectAlign::SetEdgeMargin(), ObjectAlign::SetMirrorX(), and ObjectAlign::SetPlaneOffsetAngle().

◆ AudioReactiveGradientCallback()

virtual void AudioReactiveGradientCallback ( )
pure virtual

Callback invoked when the Audio Reactive Gradient face is enabled/updated.

This method is pure virtual and must be implemented by the derived class to define custom behavior upon enabling or updating the Audio Reactive Gradient face.

Implemented in ArrowAnimation, SplatAnimation, BetaProject, ProtogenHUB75Project, and ProtogenWS35Project.

Referenced by AudioReactiveGradientFace().

◆ AudioReactiveGradientFace()

◆ DisableBlinking()

◆ EnableBlinking()

◆ GetAlignmentTransform() [1/2]

Transform GetAlignmentTransform ( Vector2D  min,
Vector2D  max,
Object3D **  objects,
uint8_t  objectCount,
float  rotation = 0.0f,
float  margin = 2.0f 
)
protected

Computes a transform for aligning multiple Object3D objects within the given bounds.

Parameters
minThe minimum 2D bounds (bottom-left corner).
maxThe maximum 2D bounds (top-right corner).
objectsPointer to an array of Object3D pointers to align.
objectCountThe number of objects in the array.
rotationThe rotation angle (in degrees) applied to the objects.
marginAdditional margin (border spacing).
Returns
Transform containing position, rotation, and scale for the objects.

Definition at line 180 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::GetTransform(), objAOther, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), ObjectAlign::SetEdgeMargin(), and ObjectAlign::SetPlaneOffsetAngle().

◆ GetAlignmentTransform() [2/2]

Transform GetAlignmentTransform ( Vector2D  min,
Vector2D  max,
Object3D obj,
float  rotation = 0.0f,
float  margin = 2.0f 
)
protected

Computes a transform for aligning a single Object3D within the given bounds.

Parameters
minThe minimum 2D bounds (bottom-left corner).
maxThe maximum 2D bounds (top-right corner).
objPointer to the Object3D to align.
rotationThe rotation angle (in degrees) applied to the object.
marginAdditional margin (border spacing).
Returns
Transform containing position, rotation, and scale to align the object.

Definition at line 170 of file ProtogenProjectTemplate.cpp.

References ObjectAlign::GetTransform(), objAOther, ObjectAlign::SetCameraMax(), ObjectAlign::SetCameraMin(), ObjectAlign::SetEdgeMargin(), and ObjectAlign::SetPlaneOffsetAngle().

Referenced by DrGonzoProject::Update().

◆ GetBackgroundMaterial()

Material * GetBackgroundMaterial ( )
protected

Retrieves the current background material animator.

Returns
Pointer to the Material used for the background.

Definition at line 513 of file ProtogenProjectTemplate.cpp.

References backgroundMaterial.

◆ GetFaceMaterial()

◆ GetFaceScale()

float GetFaceScale ( )
protected

Computes the face scaling based on a user-defined face size.

Returns
A float representing the scale factor to apply for the face.

Definition at line 303 of file ProtogenProjectTemplate.cpp.

References Menu::GetFaceSize().

Referenced by DrGonzoProject::Update().

◆ GetObjectAlign()

ObjectAlign * GetObjectAlign ( )
protected

Gets the generic ObjectAlign instance.

Returns
A pointer to the ObjectAlign handling custom alignment.

Definition at line 291 of file ProtogenProjectTemplate.cpp.

References objAOther.

◆ GetObjectAlignFace()

ObjectAlign * GetObjectAlignFace ( )
protected

Gets the ObjectAlign instance for the face camera.

Returns
A pointer to the ObjectAlign used for face alignment.

Definition at line 295 of file ProtogenProjectTemplate.cpp.

References objA.

◆ GetObjectAlignRear()

ObjectAlign * GetObjectAlignRear ( )
protected

Gets the ObjectAlign instance for the rear camera.

Returns
A pointer to the ObjectAlign used for rear alignment.

Definition at line 299 of file ProtogenProjectTemplate.cpp.

References objARear.

◆ GetWiggleOffset()

◆ HideFace()

void HideFace ( )
protected

Hides the face by setting its offset parameter.

Definition at line 470 of file ProtogenProjectTemplate.cpp.

References EasyEaseAnimator< maxParameters >::AddParameterFrame(), eEA, and offsetFaceInd.

Referenced by AceAnimation::Crash(), and UnicornZhenjaAnimation::Static().

◆ Initialize()

◆ IsBooped()

◆ LinkControlParameters()

virtual void LinkControlParameters ( )
protectedpure virtual

Links external or user-defined control parameters (pure virtual to be implemented).

Implemented in AceAnimation, ArrowAnimation, DrGonzoProject, DrGonzoTest, SageAnimation, SplatAnimation, UnicornZhenjaAnimation, FursuitEyesV1, BetaProject, ProtogenHUB75Project, and ProtogenWS35Project.

◆ LinkParameters()

void LinkParameters ( )
private

◆ OscilloscopeCallback()

virtual void OscilloscopeCallback ( )
pure virtual

Callback invoked when the Oscilloscope face is enabled/updated.

This method is pure virtual and must be implemented by the derived class to define custom behavior upon enabling or updating the Oscilloscope face.

Implemented in ArrowAnimation, SplatAnimation, BetaProject, ProtogenHUB75Project, and ProtogenWS35Project.

Referenced by OscilloscopeFace().

◆ OscilloscopeFace()

◆ SetBaseMaterial()

void SetBaseMaterial ( Material material)
private

Sets the base material for the face material animator.

Parameters
materialPointer to the material to set as the base.

Definition at line 10 of file ProtogenProjectTemplate.cpp.

References Material::Add, materialAnimator, and MaterialAnimator< materialCount >::SetBaseMaterial().

◆ SetCameraMain()

void SetCameraMain ( Vector2D  min,
Vector2D  max 
)
protected

Sets the camera bounds for the main (front) view.

Parameters
minThe minimum 2D bounds (bottom-left corner).
maxThe maximum 2D bounds (top-right corner).

Definition at line 154 of file ProtogenProjectTemplate.cpp.

References camMax, camMin, objA, ObjectAlign::SetCameraMax(), and ObjectAlign::SetCameraMin().

◆ SetCameraRear()

void SetCameraRear ( Vector2D  min,
Vector2D  max 
)
protected

Sets the camera bounds for the rear view.

Parameters
minThe minimum 2D bounds (bottom-left corner).
maxThe maximum 2D bounds (top-right corner).

Definition at line 162 of file ProtogenProjectTemplate.cpp.

References camMaxRear, camMinRear, objARear, ObjectAlign::SetCameraMax(), and ObjectAlign::SetCameraMin().

Referenced by BetaProject::BetaProject().

◆ SetMaterialColor()

void SetMaterialColor ( )
private

◆ SetMaterialLayers()

◆ SetMenuOffset()

◆ SetMenuSize()

◆ SetMenuWiggleSpeed()

void SetMenuWiggleSpeed ( float  multiplierX,
float  multiplierY,
float  multiplierR 
)
protected

Adjusts the menu's wiggle speed along X, Y, and rotation.

Parameters
multiplierXSpeed multiplier for X-axis.
multiplierYSpeed multiplier for Y-axis.
multiplierRSpeed multiplier for rotation.

Definition at line 497 of file ProtogenProjectTemplate.cpp.

References Menu::SetWiggleSpeed().

Referenced by ArrowAnimation::ArrowAnimation(), BetaProject::BetaProject(), DrGonzoProject::DrGonzoProject(), DrGonzoTest::DrGonzoTest(), FursuitEyesV1::FursuitEyesV1(), ProtogenHUB75Project::ProtogenHUB75Project(), ProtogenWS35Project::ProtogenWS35Project(), SplatAnimation::SplatAnimation(), UnicornZhenjaAnimation::UnicornZhenjaAnimation(), AceAnimation::Update(), and SageAnimation::Update().

◆ SetWiggleSpeed()

◆ SpectrumAnalyzerCallback()

virtual void SpectrumAnalyzerCallback ( )
pure virtual

Callback invoked when the Spectrum Analyzer face is enabled/updated.

This method is pure virtual and must be implemented by the derived class to define custom behavior upon enabling or updating the Spectrum Analyzer face.

Implemented in ArrowAnimation, SplatAnimation, BetaProject, ProtogenHUB75Project, and ProtogenWS35Project.

Referenced by SpectrumAnalyzerFace().

◆ SpectrumAnalyzerFace()

◆ UpdateFace()

void UpdateFace ( float  ratio)
protected

Updates the face's rendered content, reading any user input and applying changes.

Parameters
ratioA normalized ratio (0.0f to 1.0f) often used in animation phases.

Definition at line 86 of file ProtogenProjectTemplate.cpp.

References aRG, backgroundMaterial, boop, cameraSize, eEA, fanController, fGenMatXMove, fGenMatYMove, flowNoise, frameLimiter, Menu::GetEffect(), Menu::GetFaceSize(), Menu::GetFanSpeed(), Menu::GetHueB(), Menu::GetHueF(), Menu::GetMicLevel(), gradientMat, gradientSpectrum, hRainbow, hud, RGBColor::HueShift(), isBooped, APDS9960::isBooped(), TimeStep::IsReady(), materialAnimator, Menu::MirrorSpectrumAnalyzer(), Vector2D::Multiply(), objA, offsetFace, oSC, rainbowSpiral, sA, Project::scene, ObjectAlign::SetCameraMax(), HeadsUpDisplay::SetEffect(), Scene::SetEffect(), SpectrumAnalyzer::SetFlipYState(), FlowNoise::SetGradient(), AudioReactiveGradient::SetHueAngle(), Oscilloscope::SetHueAngle(), SpectrumAnalyzer::SetHueAngle(), SetMaterialColor(), SpectrumAnalyzer::SetMirrorYState(), AudioReactiveGradient::SetPosition(), FanController::SetPWM(), AudioReactiveGradient::SetRadius(), AudioReactiveGradient::SetRotation(), AudioReactiveGradient::SetSize(), FFTVoiceDetection< peakCount >::SetThreshold(), Menu::ShowMenu(), HeadsUpDisplay::Update(), MicrophoneFourier::Update(), MaterialAnimator< materialCount >::Update(), FunctionGenerator::Update(), EasyEaseAnimator< maxParameters >::Update(), Menu::Update(), FlowNoise::Update(), HorizontalRainbow::Update(), RainbowSpiral::Update(), UpdateFFTVisemes(), GradientMaterial< colorCount >::UpdateGradient(), UpdateKeyFrameTracks(), Menu::UseBoopSensor(), voiceDetection, Vector2D::X, xOffset, Vector2D::Y, and yOffset.

Referenced by AceAnimation::Update(), ArrowAnimation::Update(), DrGonzoProject::Update(), DrGonzoTest::Update(), SageAnimation::Update(), SplatAnimation::Update(), UnicornZhenjaAnimation::Update(), FursuitEyesV1::Update(), ProtogenHUB75Project::Update(), and ProtogenWS35Project::Update().

◆ UpdateFFTVisemes()

◆ UpdateKeyFrameTracks()

void UpdateKeyFrameTracks ( )
private

Updates any keyframe tracks (e.g., blink track).

Definition at line 48 of file ProtogenProjectTemplate.cpp.

References blink, and AnimationTrack< maxParameters, maxKeyFrames >::Update().

Referenced by UpdateFace().

Member Data Documentation

◆ aRG

◆ background

Background background
private

Background object and associated 3D model.

Definition at line 59 of file ProtogenProjectTemplate.h.

Referenced by ProtogenProject().

◆ backgroundMaterial

◆ blackMaterial

SimpleMaterial blackMaterial = SimpleMaterial(RGBColor(0, 0, 0))
private

Solid black material.

Definition at line 112 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ blink

BlinkTrack<2> blink
private

Blink track handler.

Definition at line 134 of file ProtogenProjectTemplate.h.

Referenced by AddBlinkParameter(), DisableBlinking(), EnableBlinking(), and UpdateKeyFrameTracks().

◆ blinkSet

bool blinkSet = false
private

Flag to indicate if the blink parameter has been set.

Definition at line 81 of file ProtogenProjectTemplate.h.

Referenced by AddBlinkParameter().

◆ blueMaterial

SimpleMaterial blueMaterial = SimpleMaterial(RGBColor(0, 0, 255))
private

Solid blue material.

Definition at line 109 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ boop

APDS9960 boop
private

Gesture sensor used for detecting "boops.".

Definition at line 157 of file ProtogenProjectTemplate.h.

Referenced by Initialize(), and UpdateFace().

◆ buttonPin

uint8_t buttonPin = 0
private

Pin for the button input.

Definition at line 98 of file ProtogenProjectTemplate.h.

Referenced by Initialize(), and ProtogenProject().

◆ cameraSize

Vector2D cameraSize
private

The size of the camera used for rendering calculations.

Definition at line 86 of file ProtogenProjectTemplate.h.

Referenced by ProtogenProject(), and UpdateFace().

◆ camMax

Vector2D camMax = Vector2D(189.0f, 93.0f)
private

Front camera maximum bounds.

Definition at line 65 of file ProtogenProjectTemplate.h.

Referenced by ProtogenProject(), and SetCameraMain().

◆ camMaxRear

Vector2D camMaxRear = Vector2D(279.0f, 100.0f)
private

Rear camera maximum bounds.

Definition at line 71 of file ProtogenProjectTemplate.h.

Referenced by SetCameraRear().

◆ camMin

Vector2D camMin = Vector2D(0.0f, 0.0f)
private

Minimum and maximum bounds for the primary (front) camera view.

Front camera minimum bounds.

Definition at line 64 of file ProtogenProjectTemplate.h.

Referenced by ProtogenProject(), and SetCameraMain().

◆ camMinRear

Vector2D camMinRear = Vector2D(214.0f, 5.0f)
private

Minimum and maximum bounds for the rear camera view.

Rear camera minimum bounds.

Definition at line 70 of file ProtogenProjectTemplate.h.

Referenced by SetCameraRear().

◆ eEA

◆ faceCount

uint8_t faceCount = 10
private

Total number of faces available (e.g., for UI or animations).

Definition at line 99 of file ProtogenProjectTemplate.h.

Referenced by Initialize(), and ProtogenProject().

◆ fanController

FanController fanController = FanController(15)
private

Fan controller for controlling a fan's PWM.

Definition at line 152 of file ProtogenProjectTemplate.h.

Referenced by Initialize(), and UpdateFace().

◆ fGenMatXMove

FunctionGenerator fGenMatXMove = FunctionGenerator(FunctionGenerator::Sine, -2.0f, 2.0f, 5.3f)
private

Function generators for X/Y wiggle movements.

Definition at line 146 of file ProtogenProjectTemplate.h.

Referenced by GetWiggleOffset(), SetWiggleSpeed(), and UpdateFace().

◆ fGenMatYMove

FunctionGenerator fGenMatYMove = FunctionGenerator(FunctionGenerator::Sine, -2.0f, 2.0f, 6.7f)
private

Definition at line 147 of file ProtogenProjectTemplate.h.

Referenced by GetWiggleOffset(), SetWiggleSpeed(), and UpdateFace().

◆ flowNoise

FlowNoise flowNoise
private

Noise-based animated material.

Definition at line 102 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), SetMaterialLayers(), and UpdateFace().

◆ frameLimiter

TimeStep frameLimiter = TimeStep(120)
private

A TimeStep object to limit frames (e.g., to 120 FPS).

Definition at line 211 of file ProtogenProjectTemplate.h.

Referenced by UpdateFace().

◆ gradientMat

GradientMaterial<2> gradientMat = GradientMaterial<2>(gradientSpectrum, 350.0f, false)
private

Definition at line 118 of file ProtogenProjectTemplate.h.

Referenced by SetMaterialLayers(), and UpdateFace().

◆ gradientSpectrum

RGBColor gradientSpectrum[2] = {RGBColor(255, 0, 0), RGBColor(255, 0, 0)}
private

Gradient used for color transitions.

Definition at line 117 of file ProtogenProjectTemplate.h.

Referenced by UpdateFace().

◆ greenMaterial

SimpleMaterial greenMaterial = SimpleMaterial(RGBColor(0, 255, 0))
private

Solid green material.

Definition at line 108 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ hRainbow

HorizontalRainbow hRainbow
private

Horizontal rainbow animated material.

Definition at line 104 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), SetMaterialLayers(), and UpdateFace().

◆ hud

◆ isBooped

bool isBooped = false
private

Flag to indicate if the APDS9960 sensor has detected a "boop".

Definition at line 76 of file ProtogenProjectTemplate.h.

Referenced by IsBooped(), and UpdateFace().

◆ materialAnimator

MaterialAnimator<20> materialAnimator
private

◆ microphonePin

uint8_t microphonePin = 0
private

Pin assignments and face count.

Pin for the microphone input.

Definition at line 97 of file ProtogenProjectTemplate.h.

Referenced by Initialize(), and ProtogenProject().

◆ objA

Object alignment for the front, rear, and an additional alignment object.

Alignment for the front camera.

Definition at line 139 of file ProtogenProjectTemplate.h.

Referenced by AlignObjectFace(), AlignObjectNoScaleFace(), AlignObjectsFace(), AlignObjectsNoScaleFace(), GetObjectAlignFace(), ProtogenProject(), SetCameraMain(), and UpdateFace().

◆ objAOther

◆ objARear

◆ offsetFace

float offsetFace = 0.0f
private

Facial offset parameters for layering advanced materials (e.g., Spectrum Analyzer).

Generic face offset.

Definition at line 167 of file ProtogenProjectTemplate.h.

Referenced by LinkParameters(), and UpdateFace().

◆ offsetFaceARG

float offsetFaceARG = 0.0f
private

Offset for AudioReactiveGradient face.

Definition at line 169 of file ProtogenProjectTemplate.h.

Referenced by AudioReactiveGradientFace(), and LinkParameters().

◆ offsetFaceInd

uint8_t offsetFaceInd = 50
private

Index for generic face offset in EasyEaseAnimator.

Definition at line 172 of file ProtogenProjectTemplate.h.

Referenced by AudioReactiveGradientFace(), HideFace(), LinkParameters(), OscilloscopeFace(), and SpectrumAnalyzerFace().

◆ offsetFaceIndARG

uint8_t offsetFaceIndARG = 52
private

Index for AudioReactiveGradient offset in EasyEaseAnimator.

Definition at line 174 of file ProtogenProjectTemplate.h.

Referenced by AudioReactiveGradientFace(), and LinkParameters().

◆ offsetFaceIndOSC

uint8_t offsetFaceIndOSC = 53
private

Index for Oscilloscope offset in EasyEaseAnimator.

Definition at line 175 of file ProtogenProjectTemplate.h.

Referenced by LinkParameters(), and OscilloscopeFace().

◆ offsetFaceIndSA

uint8_t offsetFaceIndSA = 51
private

Index for SpectrumAnalyzer offset in EasyEaseAnimator.

Definition at line 173 of file ProtogenProjectTemplate.h.

Referenced by LinkParameters(), and SpectrumAnalyzerFace().

◆ offsetFaceOSC

float offsetFaceOSC = 0.0f
private

Offset for Oscilloscope face.

Definition at line 170 of file ProtogenProjectTemplate.h.

Referenced by LinkParameters(), and OscilloscopeFace().

◆ offsetFaceSA

float offsetFaceSA = 0.0f
private

Offset for SpectrumAnalyzer face.

Definition at line 168 of file ProtogenProjectTemplate.h.

Referenced by LinkParameters(), and SpectrumAnalyzerFace().

◆ orangeMaterial

SimpleMaterial orangeMaterial = SimpleMaterial(RGBColor(255, 165, 0))
private

Solid orange material.

Definition at line 106 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ oSC

Oscilloscope oSC = Oscilloscope(Vector2D(200, 100), Vector2D(0, 0))
private

◆ purpleMaterial

SimpleMaterial purpleMaterial = SimpleMaterial(RGBColor(255, 0, 255))
private

Solid purple material.

Definition at line 111 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ rainbowSpiral

RainbowSpiral rainbowSpiral
private

Spiral rainbow animated material.

Definition at line 103 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), SetMaterialLayers(), and UpdateFace().

◆ redMaterial

SimpleMaterial redMaterial = SimpleMaterial(RGBColor(255, 0, 0))
private

Solid red material.

Definition at line 105 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ sA

SpectrumAnalyzer sA = SpectrumAnalyzer(Vector2D(200, 100), Vector2D(100, 50), true, true)
private

Audio-reactive materials.

Definition at line 129 of file ProtogenProjectTemplate.h.

Referenced by ProtogenProject(), SetMaterialLayers(), SpectrumAnalyzerFace(), and UpdateFace().

◆ voiceDetection

FFTVoiceDetection<128> voiceDetection
private

Voice detection system based on FFT data.

Definition at line 162 of file ProtogenProjectTemplate.h.

Referenced by UpdateFace(), and UpdateFFTVisemes().

◆ whiteMaterial

SimpleMaterial whiteMaterial = SimpleMaterial(RGBColor(255, 255, 255))
private

Solid white material.

Definition at line 107 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ xOffset

float xOffset = 0.0f
private

Offsets used for small "wiggle" or motion in the scene.

X-axis offset.

Definition at line 91 of file ProtogenProjectTemplate.h.

Referenced by UpdateFace().

◆ yellowMaterial

SimpleMaterial yellowMaterial = SimpleMaterial(RGBColor(255, 255, 0))
private

Solid yellow material.

Definition at line 110 of file ProtogenProjectTemplate.h.

Referenced by AddBackgroundMaterialFrame(), AddMaterialFrame(), SetMaterialColor(), and SetMaterialLayers().

◆ yOffset

float yOffset = 0.0f
private

Y-axis offset.

Definition at line 92 of file ProtogenProjectTemplate.h.

Referenced by UpdateFace().


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