Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Represents a single piece that has been placed to specific coords in the world. More...
#include <PiecePool.h>
Public Member Functions | |
cPlacedPiece (const cPlacedPiece *a_Parent, const cPiece &a_Piece, const Vector3i &a_Coords, int a_NumCCWRotations) | |
Vector3i & | GetCoords (void) |
Returns the coords as a modifiable object. More... | |
const Vector3i & | GetCoords (void) const |
int | GetDepth (void) const |
const cCuboid & | GetHitBox (void) const |
int | GetNumCCWRotations (void) const |
const cPlacedPiece * | GetParent (void) const |
const cPiece & | GetPiece (void) const |
cPiece::cConnector | GetRotatedConnector (const cPiece::cConnector &a_Connector) const |
Returns a copy of the specified connector, modified to account for the translation and rotation for this placement. More... | |
cPiece::cConnector | GetRotatedConnector (size_t a_Index) const |
Returns the connector at the specified index, rotated in the actual placement. More... | |
bool | HasBeenMovedToGround (void) const |
void | MoveToGroundBy (int a_OffsetY) |
Moves the placed piece Y-wise by the specified offset. More... | |
Protected Attributes | |
Vector3i | m_Coords |
int | m_Depth |
bool | m_HasBeenMovedToGround |
Set to true once the piece has been moved Y-wise. More... | |
cCuboid | m_HitBox |
int | m_NumCCWRotations |
const cPlacedPiece * | m_Parent |
const cPiece * | m_Piece |
Represents a single piece that has been placed to specific coords in the world.
Definition at line 327 of file PiecePool.h.
cPlacedPiece::cPlacedPiece | ( | const cPlacedPiece * | a_Parent, |
const cPiece & | a_Piece, | ||
const Vector3i & | a_Coords, | ||
int | a_NumCCWRotations | ||
) |
Definition at line 468 of file PiecePool.cpp.
|
inline |
Returns the coords as a modifiable object.
Definition at line 341 of file PiecePool.h.
|
inline |
Definition at line 334 of file PiecePool.h.
|
inline |
Definition at line 337 of file PiecePool.h.
|
inline |
Definition at line 336 of file PiecePool.h.
|
inline |
Definition at line 335 of file PiecePool.h.
|
inline |
Definition at line 332 of file PiecePool.h.
|
inline |
Definition at line 333 of file PiecePool.h.
cPiece::cConnector cPlacedPiece::GetRotatedConnector | ( | const cPiece::cConnector & | a_Connector | ) | const |
Returns a copy of the specified connector, modified to account for the translation and rotation for this placement.
Definition at line 495 of file PiecePool.cpp.
cPiece::cConnector cPlacedPiece::GetRotatedConnector | ( | size_t | a_Index | ) | const |
Returns the connector at the specified index, rotated in the actual placement.
Undefined behavior if a_Index is out of range.
Definition at line 484 of file PiecePool.cpp.
|
inline |
Definition at line 338 of file PiecePool.h.
void cPlacedPiece::MoveToGroundBy | ( | int | a_OffsetY | ) |
Moves the placed piece Y-wise by the specified offset.
Sets m_HasBeenMovedToGround to true, too. Used eg. by village houses.
Definition at line 504 of file PiecePool.cpp.
|
protected |
Definition at line 359 of file PiecePool.h.
|
protected |
Definition at line 362 of file PiecePool.h.
|
protected |
Set to true once the piece has been moved Y-wise.
Used eg. by village houses.
Definition at line 366 of file PiecePool.h.
|
protected |
Definition at line 361 of file PiecePool.h.
|
protected |
Definition at line 360 of file PiecePool.h.
|
protected |
Definition at line 357 of file PiecePool.h.
|
protected |
Definition at line 358 of file PiecePool.h.