#define __DALI_RENDERABLE_ACTOR_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/public-api/actors/actor.h>
+#include <dali/public-api/shader-effects/shader-effect.h>
#include <dali/public-api/actors/blending.h>
#include <dali/public-api/actors/sampling.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
namespace Internal DALI_INTERNAL
{
};
+
/**
* @brief A base class for renderable actors.
*/
~RenderableActor();
/**
- * @copydoc Dali::BaseHandle::operator=
- */
- using BaseHandle::operator=;
-
- /**
- * @brief Allows modification of an actors position in the depth sort algorithm.
- *
- * The offset can be altered for each coplanar actor hence allowing an order of painting.
- * @pre The Actor has been initialized.
- * @param [in] depthOffset the offset to be given to the actor. Positive values pushing it further back.
- */
- void SetSortModifier(float depthOffset);
-
- /**
- * @brief Retrieves the offset used to modify an actors position in the depth sort algorithm.
- *
- * The offset can be altered for each coplanar actor hence allowing an order of painting.
- * @pre The Actor has been initialized.
- * @return the offset that has been given to the actor. Positive values pushing it further back.
- */
- float GetSortModifier() const;
-
- /**
- * @brief Set the face-culling mode for this actor.
- *
- * @param[in] mode The culling mode.
- */
- void SetCullFace(CullFaceMode mode);
-
- /**
- * @brief Retrieve the face-culling mode for this actor.
- *
- * @return mode The culling mode.
- */
- CullFaceMode GetCullFace() const;
-
- /**
- * @brief Sets the blending mode.
- *
- * Possible values are: BlendingMode::OFF, BlendingMode::AUTO and BlendingMode::ON. Default is BlendingMode::AUTO.
- *
- * If blending is disabled (BlendingMode::OFF) fade in and fade out animations do not work.
- *
- * <ul>
- * <li> \e OFF Blending is disabled.
- * <li> \e AUTO Blending is enabled only if the renderable actor has alpha channel.
- * <li> \e ON Blending is enabled.
- * </ul>
- *
- * @param[in] mode The blending mode.
- */
- void SetBlendMode( BlendingMode::Type mode );
-
- /**
- * @brief Retrieves the blending mode.
- *
- * @return The blending mode, one of BlendingMode::OFF, BlendingMode::AUTO or BlendingMode::ON.
- */
- BlendingMode::Type GetBlendMode() const;
-
- /**
- * @brief Specify the pixel arithmetic used when the actor is blended.
- *
- * @param[in] srcFactorRgba Specifies how the red, green, blue, and alpha source blending factors are computed.
- * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
- * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
- * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.
- *
- * @param[in] destFactorRgba Specifies how the red, green, blue, and alpha destination blending factors are computed.
- * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
- * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
- * GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.
- */
- void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
-
- /**
- * @brief Specify the pixel arithmetic used when the actor is blended.
- *
- * @param[in] srcFactorRgb Specifies how the red, green, and blue source blending factors are computed.
- * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
- * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
- * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.
- *
- * @param[in] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
- * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
- * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
- * GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.
- *
- * @param[in] srcFactorAlpha Specifies how the alpha source blending factor is computed.
- * The options are the same as for srcFactorRgb.
- *
- * @param[in] destFactorAlpha Specifies how the alpha source blending factor is computed.
- * The options are the same as for destFactorRgb.
- */
- void SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
- BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
-
- /**
- * @brief Query the pixel arithmetic used when the actor is blended.
- *
- * @param[out] srcFactorRgb Specifies how the red, green, blue, and alpha source blending factors are computed.
- * @param[out] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
- * @param[out] srcFactorAlpha Specifies how the red, green, blue, and alpha source blending factors are computed.
- * @param[out] destFactorAlpha Specifies how the red, green, blue, and alpha destination blending factors are computed.
- */
- void GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
- BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
-
- /**
- * @brief Specify the equation used when the actor is blended.
+ * @brief Copy constructor
*
- * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
- * @param[in] equationRgba The equation used for combining red, green, blue, and alpha components.
+ * @param [in] copy The actor to copy.
*/
- void SetBlendEquation( BlendingEquation::Type equationRgba );
+ RenderableActor(const RenderableActor& copy);
/**
- * @brief Specify the equation used when the actor is blended.
+ * @brief Assignment operator
*
- * @param[in] equationRgb The equation used for combining red, green, and blue components.
- * @param[in] equationAlpha The equation used for combining the alpha component.
- * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
+ * @param [in] rhs The actor to copy.
*/
- void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
-
- /**
- * @brief Query the equation used when the actor is blended.
- *
- * @param[out] equationRgb The equation used for combining red, green, and blue components.
- * @param[out] equationAlpha The equation used for combining the alpha component.
- */
- void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
-
- /**
- * @brief Specify the color used when the actor is blended; the default is Vector4::ZERO.
- *
- * @param[in] color The blend color.
- */
- void SetBlendColor( const Vector4& color );
-
- /**
- * @brief Query the color used when the actor is blended.
- *
- * @return The blend color.
- */
- const Vector4& GetBlendColor() const;
-
- /**
- * @brief Sets the filtering mode.
- *
- * Possible values are: FilterMode::NEAREST and FilterMode::LINEAR. Default is FilterMode::LINEAR.
- *
- * <ul>
- * <li> \e NEAREST Use nearest filtering
- * <li> \e LINEAR Use linear filtering
- * </ul>
- *
- * @param[in] minFilter The minification filtering mode.
- * @param[in] magFilter The magnification filtering mode.
- */
- void SetFilterMode( FilterMode::Type minFilter, FilterMode::Type magFilter );
-
- /**
- * @brief Retrieves the filtering mode.
- *
- * @param[out] minFilter The return minification value
- * @param[out] magFilter The return magnification value
- */
- void GetFilterMode( FilterMode::Type& minFilter, FilterMode::Type& magFilter) const;
+ RenderableActor& operator=(const RenderableActor& rhs);
public: // Not intended for application developers
explicit DALI_INTERNAL RenderableActor(Internal::RenderableActor* actor);
};
+
} // namespace Dali
#endif // __DALI_RENDERABLE_ACTOR_H__