}
/**
+ * Mark an node and its sub tree according to the updated flag.
+ * @param[in] updated The updated flag
+ * (used for partial rendering to mark an animating sub tree for example).
+ */
+ virtual void SetUpdated(bool updated)
+ {
+ mUpdated = updated;
+
+ for (Node* child : mChildren)
+ {
+ child->SetUpdated(updated);
+ }
+ }
+
+ /**
* This method sets clipping information on the node based on its hierarchy in the scene-graph.
* A value is calculated that can be used during sorting to increase sort speed.
* @param[in] clippingId The Clipping ID of the node to set
}
/**
+ * Retrieve the update size hint of the node.
+ * @return The update size hint.
+ */
+ const Vector3& GetUpdateSizeHint() const
+ {
+ if( mTransformId != INVALID_TRANSFORM_ID )
+ {
+ return mUpdateSizeHint.Get(0);
+ }
+
+ return Vector3::ZERO;
+ }
+
+ /**
* Retrieve the bounding sphere of the node
* @return A vector4 describing the bounding sphere. XYZ is the center and W is the radius
*/
AnimatableProperty<bool> mVisible; ///< Visibility can be inherited from the Node hierachy
AnimatableProperty<bool> mCulled; ///< True if the node is culled. This is not animatable. It is just double-buffered.
AnimatableProperty<Vector4> mColor; ///< Color can be inherited from the Node hierarchy
+ AnimatableProperty<Vector3> mUpdateSizeHint; ///< Update size hint is provided for damaged area calculation. This is not animatable. It is just double-buffered. (Because all these bloody properties are).
+
// Inherited properties; read-only from public API
inline void SetInheritOrientationMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit )
{
- typedef MessageValue1< Node, bool > LocalType;
+ using LocalType = MessageValue1<Node, bool>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetParentOriginMessage( EventThreadServices& eventThreadServices, const Node& node, const Vector3& origin )
{
- typedef MessageValue1< Node, Vector3 > LocalType;
+ using LocalType = MessageValue1<Node, Vector3>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetAnchorPointMessage( EventThreadServices& eventThreadServices, const Node& node, const Vector3& anchor )
{
- typedef MessageValue1< Node, Vector3 > LocalType;
+ using LocalType = MessageValue1<Node, Vector3>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetInheritPositionMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit )
{
- typedef MessageValue1< Node, bool > LocalType;
+ using LocalType = MessageValue1<Node, bool>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetInheritScaleMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit )
{
- typedef MessageValue1< Node, bool > LocalType;
+ using LocalType = MessageValue1<Node, bool>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetColorModeMessage( EventThreadServices& eventThreadServices, const Node& node, ColorMode colorMode )
{
- typedef MessageValue1< Node, ColorMode > LocalType;
+ using LocalType = MessageValue1<Node, ColorMode>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetDrawModeMessage( EventThreadServices& eventThreadServices, const Node& node, DrawMode::Type drawMode )
{
- typedef MessageValue1< Node, DrawMode::Type > LocalType;
+ using LocalType = MessageValue1<Node, DrawMode::Type>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void AttachRendererMessage( EventThreadServices& eventThreadServices, const Node& node, const Renderer& renderer )
{
- typedef MessageValue1< Node, Renderer* > LocalType;
+ using LocalType = MessageValue1<Node, Renderer*>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void DetachRendererMessage( EventThreadServices& eventThreadServices, const Node& node, const Renderer& renderer )
{
- typedef MessageValue1< Node, const Renderer* > LocalType;
+ using LocalType = MessageValue1<Node, const Renderer*>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, const Node& node, uint32_t depthIndex )
{
- typedef MessageValue1< Node, uint32_t > LocalType;
+ using LocalType = MessageValue1<Node, uint32_t>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetClippingModeMessage( EventThreadServices& eventThreadServices, const Node& node, ClippingMode::Type clippingMode )
{
- typedef MessageValue1< Node, ClippingMode::Type > LocalType;
+ using LocalType = MessageValue1<Node, ClippingMode::Type>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetPositionUsesAnchorPointMessage( EventThreadServices& eventThreadServices, const Node& node, bool positionUsesAnchorPoint )
{
- typedef MessageValue1< Node, bool > LocalType;
+ using LocalType = MessageValue1<Node, bool>;
// Reserve some memory inside the message queue
uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );