XII Release 0.1.0
Loading...
Searching...
No Matches
xiiMsgSetColor Struct Reference

A message to modify the main color of some thing. More...

#include <SetColorMessage.h>

Inheritance diagram for xiiMsgSetColor:
[legend]

Public Member Functions

 XII_DECLARE_MESSAGE_TYPE (xiiMsgSetColor, xiiMessage)
 
void ModifyColor (xiiColor &ref_color) const
 Applies m_Color using m_Mode to the given color.
 
void ModifyColor (xiiColorGammaUB &ref_color) const
 Applies m_Color using m_Mode to the given color.
 
virtual void Serialize (xiiStreamWriter &ref_stream) const override
 Implement this for efficient transmission across process boundaries (e.g. network transfer etc.)
 
virtual void Deserialize (xiiStreamReader &ref_stream, xiiUInt8 uiTypeVersion) override
 
- Public Member Functions inherited from xiiMessage
virtual xiiInt32 GetSortingKey () const
 Derived message types can override this method to influence sorting order. Smaller keys are processed first.
 
XII_ALWAYS_INLINE xiiMessageId GetId () const
 Returns the id for this message type.
 
XII_ALWAYS_INLINE xiiUInt16 GetSize () const
 Returns the size in byte of this message.
 
XII_ALWAYS_INLINE xiiUInt64 GetHash () const
 Calculates a hash of the message.
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Public Attributes

xiiColor m_Color
 The color to apply to the target.
 
xiiEnum< xiiSetColorModem_Mode
 The mode with which to apply the color to the target.
 

Additional Inherited Members

- Static Public Member Functions inherited from xiiMessage
static void PackageForTransfer (const xiiMessage &msg, xiiStreamWriter &ref_stream)
 Writes msg to stream in such a way that ReplicatePackedMessage() can restore it even in another process.
 
static xiiUniquePtr< xiiMessageReplicatePackedMessage (xiiStreamReader &ref_stream)
 Restores a message that was written by PackageForTransfer()
 
- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 
- Protected Member Functions inherited from xiiMessage
 xiiMessage (size_t messageSize)
 
- Static Protected Member Functions inherited from xiiMessage
static XII_ALWAYS_INLINE xiiMessageId GetNextMsgId ()
 
- Protected Attributes inherited from xiiMessage
xiiMessageId m_Id
 
xiiUInt16 m_uiSize
 
- Static Protected Attributes inherited from xiiMessage
static xiiMessageId s_NextMsgId = 0
 

Detailed Description

A message to modify the main color of some thing.

Components that handle this message use it to change their main color. For instance a light component may change its light color, a mesh component will change the main mesh color.

Member Function Documentation

◆ Deserialize()

void xiiMsgSetColor::Deserialize ( xiiStreamReader & ref_stream,
xiiUInt8 uiTypeVersion )
overridevirtual
See also
Serialize()

Reimplemented from xiiMessage.

◆ Serialize()

void xiiMsgSetColor::Serialize ( xiiStreamWriter & ref_stream) const
overridevirtual

Implement this for efficient transmission across process boundaries (e.g. network transfer etc.)

If the message is only ever sent within the same process between nodes of the same xiiWorld, this does not need to be implemented.

Note that PackageForTransfer() will automatically include the xiiRTTI type version into the stream and ReplicatePackedMessage() will pass this into Deserialize(). Use this if the serialization changes.

Reimplemented from xiiMessage.


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