Cuberite
A lightweight, fast and extensible game server for Minecraft
Static Public Member Functions | Protected Member Functions | Private Types | List of all members
cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down > Class Template Reference

Mixin for blocks whose meta on placement depends on the relative position of the player to the block in addition to the yaw of the player placing the block. More...

#include <Mixins.h>

Inheritance diagram for cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >:
Inheritance graph
[legend]
Collaboration diagram for cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >:
Collaboration graph
[legend]

Static Public Member Functions

static NIBBLETYPE DisplacementYawToMetaData (const Vector3d a_PlacePosition, const Vector3d a_EyePosition, const double a_Rotation)
 Converts the placement position, eye position as returned by cPlayer::GetEyePosition(), and rotation value as returned by cPlayer::GetYaw() to the appropriate metadata value for a block placed by a player facing that way. More...
 
- Static Public Member Functions inherited from cYawRotator< Base, 0x07, 0x02, 0x05, 0x03, 0x04 >
static NIBBLETYPE YawToMetaData (double a_Rotation)
 Converts the rotation value as returned by cPlayer::GetYaw() to the appropriate metadata value for a block placed by a player facing that way. More...
 

Protected Member Functions

virtual NIBBLETYPE MetaMirrorXZ (NIBBLETYPE a_Meta) const override
 
 ~cDisplacementYawRotator ()=default
 
- Protected Member Functions inherited from cYawRotator< Base, 0x07, 0x02, 0x05, 0x03, 0x04 >
 ~cYawRotator ()=default
 
- Protected Member Functions inherited from cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >
virtual NIBBLETYPE MetaMirrorXY (NIBBLETYPE a_Meta) const override
 
virtual NIBBLETYPE MetaMirrorYZ (NIBBLETYPE a_Meta) const override
 
virtual NIBBLETYPE MetaRotateCCW (NIBBLETYPE a_Meta) const override
 
virtual NIBBLETYPE MetaRotateCW (NIBBLETYPE a_Meta) const override
 
 ~cMetaRotator ()=default
 

Private Types

using Super = cYawRotator< Base, BitMask, North, East, South, West >
 

Additional Inherited Members

- Public Member Functions inherited from cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >
constexpr cMetaRotator (BLOCKTYPE a_BlockType)
 

Detailed Description

template<class Base, NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, NIBBLETYPE Up = 0x00, NIBBLETYPE Down = 0x01>
class cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >

Mixin for blocks whose meta on placement depends on the relative position of the player to the block in addition to the yaw of the player placing the block.

BitMask selects the direction bits from the block's meta values.

Definition at line 213 of file Mixins.h.

Member Typedef Documentation

◆ Super

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, NIBBLETYPE Up = 0x00, NIBBLETYPE Down = 0x01>
using cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >::Super = cYawRotator<Base, BitMask, North, East, South, West>
private

Definition at line 216 of file Mixins.h.

Constructor & Destructor Documentation

◆ ~cDisplacementYawRotator()

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, NIBBLETYPE Up = 0x00, NIBBLETYPE Down = 0x01>
cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >::~cDisplacementYawRotator ( )
protecteddefault

Member Function Documentation

◆ DisplacementYawToMetaData()

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, NIBBLETYPE Up = 0x00, NIBBLETYPE Down = 0x01>
static NIBBLETYPE cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >::DisplacementYawToMetaData ( const Vector3d  a_PlacePosition,
const Vector3d  a_EyePosition,
const double  a_Rotation 
)
inlinestatic

Converts the placement position, eye position as returned by cPlayer::GetEyePosition(), and rotation value as returned by cPlayer::GetYaw() to the appropriate metadata value for a block placed by a player facing that way.

Definition at line 225 of file Mixins.h.

◆ MetaMirrorXZ()

template<class Base , NIBBLETYPE BitMask = 0x07, NIBBLETYPE North = 0x02, NIBBLETYPE East = 0x05, NIBBLETYPE South = 0x03, NIBBLETYPE West = 0x04, NIBBLETYPE Up = 0x00, NIBBLETYPE Down = 0x01>
virtual NIBBLETYPE cDisplacementYawRotator< Base, BitMask, North, East, South, West, Up, Down >::MetaMirrorXZ ( NIBBLETYPE  a_Meta) const
inlineoverrideprotectedvirtual

Definition at line 251 of file Mixins.h.


The documentation for this class was generated from the following file: