75 return ( (uint8_t) ( aColor.
r * 255 ) << 24 ) | ( (uint8_t) ( aColor.
g * 255 ) << 16 )
76 | ( (uint8_t) ( aColor.
b * 255 ) << 8 ) | (uint8_t) ( aColor.
a * 255 );
108 wxString
GetClass()
const override {
return wxT(
"PCB_3D_BODY" ); }
130 void Serialize( google::protobuf::Any& aContainer )
const override;
131 bool Deserialize(
const google::protobuf::Any& aContainer )
override;
132 void Serialize( kiapi::board::types::Body3D& aOutput )
const;
133 bool Deserialize(
const kiapi::board::types::Body3D& aInput );
146 return _(
"3D Body" );
160 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
BITMAPS
A list of all bitmap identifiers.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
KICAD_T Type() const
Returns the type of object.
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
bool operator==(const EXTRUDED_3D_BODY &aOther) const
EXTRUDED_3D_BODY()=default
static KIGFX::COLOR4D GetDefaultColor(EXTRUSION_MATERIAL aMaterial)
static uint32_t PackColorKey(const KIGFX::COLOR4D &aColor)
EXTRUSION_MATERIAL m_material
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
A 3D body attached to a footprint (or, later, placed on a board).
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void Flip(const VECTOR2I &aCentre, FLIP_DIRECTION aFlipDirection) override
Flip this object, i.e.
bool operator==(const PCB_3D_BODY &aOther) const
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
static bool ClassOf(const EDA_ITEM *aItem)
PCB_3D_BODY(BOARD_ITEM *aParent=nullptr)
PCB_LAYER_ID GetLayer() const override
The payload layer names the outline source (auto, pad bbox, or a real layer), so it is semantic rathe...
const EXTRUDED_3D_BODY * GetExtruded() const
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
wxString GetFriendlyName() const override
bool IsLayerAgnostic() const override
Check if this item's layer set must not be confined to a board's enabled layers.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
wxString GetClass() const override
Return the class name.
void CopyFrom(const BOARD_ITEM *aOther) override
EXTRUDED_3D_BODY m_extruded
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
void swapData(BOARD_ITEM *aImage) override
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
EXTRUDED_3D_BODY * MutableExtruded()
PCB_LAYER_ID
A quick note on layer IDs:
@ PCB_3D_BODY_T
class PCB_3D_BODY, a 3D body (extruded or model) on a footprint
VECTOR2< int32_t > VECTOR2I
VECTOR3< double > VECTOR3D