- bool mExitClick;
- Vector2 mCurrentTouchPosition;
- Vector2 mMetaballPosVariation;
- Vector2 mMetaballPosVariationFrom;
- Vector2 mMetaballPosVariationTo;
- Vector2 mMetaballCenter;
-
- Vector2 mGravity;
- Vector2 mGravityVar;
-
- Renderer mRendererRefraction;
- TextureSet mTextureSetRefraction;
- Shader mShaderRefraction;
- TextureSet mTextureSetNormal;
- Shader mShaderNormal;
-
- //Animations
- Animation mGravityAnimation[METABALL_NUMBER];
- Animation mRadiusDecAnimation[METABALL_NUMBER];
- Animation mRadiusIncFastAnimation[METABALL_NUMBER];
- Animation mRadiusIncSlowAnimation[METABALL_NUMBER];
- Animation mRadiusVarAnimation[METABALL_NUMBER];
- Animation mPositionVarAnimation[METABALL_NUMBER];
-
- //Private functions
- Geometry CreateGeometry();
- Geometry CreateGeometryComposition();
-
- void CreateMetaballActors();
- void CreateMetaballImage();
- void AddRefractionImage();
- void CreateAnimations();
-
- void LaunchRadiusIncSlowAnimations(Animation &source);
- void LaunchGetBackToPositionAnimation(Animation &source);
-
- void StopClickAnimations();
- void StopAfterClickAnimations();
-
- void ResetMetaballsState();
-
- void SetPositionToMetaballs(Vector2 & metaballCenter);
+ Vector2 mCurrentTouchPosition;
+ Vector2 mMetaballPosVariation;
+ Vector2 mMetaballPosVariationFrom;
+ Vector2 mMetaballPosVariationTo;
+ Vector2 mMetaballCenter;
+
+ Vector2 mGravity;
+ Vector2 mGravityVar;
+
+ Renderer mRendererRefraction;
+ TextureSet mTextureSetRefraction;
+ Shader mShaderRefraction;
+ TextureSet mTextureSetNormal;
+ Shader mShaderNormal;
+
+ // Animations
+ Animation mGravityAnimation[METABALL_NUMBER];
+ Animation mRadiusDecAnimation[METABALL_NUMBER];
+ Animation mRadiusIncFastAnimation[METABALL_NUMBER];
+ Animation mRadiusIncSlowAnimation[METABALL_NUMBER];
+ Animation mRadiusVarAnimation[METABALL_NUMBER];
+ Animation mPositionVarAnimation[METABALL_NUMBER];
+
+ // Private Helper functions
+
+ /**
+ * Create a mesh data with the geometry for the metaball rendering
+ * @param aspectMappedTexture whether texture coords should be mapped based on aspect ratio
+ */
+ Geometry CreateGeometry(bool aspectMappedTexture = true);
+
+ /**
+ * Create a actor for the metaballs
+ */
+ void CreateMetaballActors();
+
+ /**
+ * Create the render task and FBO to render the metaballs into a texture
+ */
+ void CreateMetaballImage();
+
+ /**
+ * Create the the final composition
+ */
+ void CreateComposition();
+
+ /**
+ * Create all the metaballs animations (gravity, movement, size, etc.)
+ */
+ void CreateAnimations();
+
+ /**
+ * Function to launch the grow slow radius for the metaballs, and also the small variations for metaball[2] and [3]
+ */
+ void LaunchRadiusIncSlowAnimations(Animation& source);
+
+ /**
+ * Function to launch the animation to get the metaball[1] back to the center
+ */
+ void LaunchGetBackToPositionAnimation(Animation& source);
+
+ /**
+ * Function to stop all animations related to the click of the user in the screen
+ */
+ void StopClickAnimations();
+
+ /**
+ * Function to stop all animations related to the after click of the user in the screen
+ */
+ void StopAfterClickAnimations();
+
+ /**
+ * Function that resets the sate of the different Metaballs
+ */
+ void ResetMetaballsState();
+
+ /**
+ * Function to set the actual position of the metaballs when the user clicks the screen
+ */
+ void SetPositionToMetaballs(const Vector2& metaballCenter);