Plasma Engine  2.0
Loading...
Searching...
No Matches
plMsgSetColor Struct Reference

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

#include <SetColorMessage.h>

Inheritance diagram for plMsgSetColor:

Public Member Functions

 PL_DECLARE_MESSAGE_TYPE (plMsgSetColor, plMessage)
 
void ModifyColor (plColor &ref_color) const
 Applies m_Color using m_Mode to the given color.
 
void ModifyColor (plColorGammaUB &ref_color) const
 Applies m_Color using m_Mode to the given color.
 
virtual void Serialize (plStreamWriter &inout_stream) const override
 Implement this for efficient transmission across process boundaries (e.g. network transfer etc.)
 
virtual void Deserialize (plStreamReader &inout_stream, plUInt8 uiTypeVersion) override
 
- Public Member Functions inherited from plMessage
virtual plInt32 GetSortingKey () const
 Derived message types can override this method to influence sorting order. Smaller keys are processed first.
 
PL_ALWAYS_INLINE plMessageId GetId () const
 Returns the id for this message type.
 
PL_ALWAYS_INLINE plUInt16 GetSize () const
 Returns the size in byte of this message.
 
PL_ALWAYS_INLINE plUInt64 GetHash () const
 Calculates a hash of the message.
 
- Public Member Functions inherited from plReflectedClass
virtual const plRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const plRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
PL_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Public Attributes

plColor m_Color
 The color to apply to the target.
 
plEnum< plSetColorModem_Mode
 The mode with which to apply the color to the target.
 

Additional Inherited Members

- Static Public Member Functions inherited from plMessage
static void PackageForTransfer (const plMessage &msg, plStreamWriter &inout_stream)
 Writes msg to stream in such a way that ReplicatePackedMessage() can restore it even in another process.
 
static plUniquePtr< plMessageReplicatePackedMessage (plStreamReader &inout_stream)
 Restores a message that was written by PackageForTransfer()
 
- Static Public Member Functions inherited from plNoBase
static const plRTTIGetStaticRTTI ()
 
- Protected Member Functions inherited from plMessage
 plMessage (size_t messageSize)
 
- Static Protected Member Functions inherited from plMessage
static PL_ALWAYS_INLINE plMessageId GetNextMsgId ()
 
- Protected Attributes inherited from plMessage
plMessageId m_Id
 
plUInt16 m_uiSize
 
- Static Protected Attributes inherited from plMessage
static plMessageId 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 plMsgSetColor::Deserialize ( plStreamReader & inout_stream,
plUInt8 uiTypeVersion )
overridevirtual
See also
Serialize()

Reimplemented from plMessage.

◆ Serialize()

void plMsgSetColor::Serialize ( plStreamWriter & inout_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 plWorld, this does not need to be implemented.

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

Reimplemented from plMessage.


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