KiCad PCB EDA Suite
SHAPE_BASE Class Reference

#include <shape.h>

Inheritance diagram for SHAPE_BASE:
SHAPE SHAPE_ARC SHAPE_CIRCLE SHAPE_COMPOUND SHAPE_LINE_CHAIN_BASE SHAPE_NULL SHAPE_POLY_SET SHAPE_RECT SHAPE_SEGMENT

Public Member Functions

 SHAPE_BASE (SHAPE_TYPE aType)
 Constructor. More...
 
virtual ~SHAPE_BASE ()
 
SHAPE_TYPE Type () const
 Function Type() More...
 
virtual bool HasIndexableSubshapes () const
 
virtual size_t GetIndexableSubshapeCount () const
 
virtual void GetIndexableSubshapes (std::vector< SHAPE * > &aSubshapes)
 

Protected Attributes

SHAPE_TYPE m_type
 

type of our shape

More...
 

Detailed Description

Definition at line 76 of file shape.h.

Constructor & Destructor Documentation

◆ SHAPE_BASE()

SHAPE_BASE::SHAPE_BASE ( SHAPE_TYPE  aType)
inline

Constructor.

Creates an empty shape of type aType

Definition at line 85 of file shape.h.

85  : m_type( aType )
86  {}
SHAPE_TYPE m_type
type of our shape
Definition: shape.h:114

◆ ~SHAPE_BASE()

virtual SHAPE_BASE::~SHAPE_BASE ( )
inlinevirtual

Definition at line 89 of file shape.h.

90  {}

Member Function Documentation

◆ GetIndexableSubshapeCount()

virtual size_t SHAPE_BASE::GetIndexableSubshapeCount ( ) const
inlinevirtual

Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.

Definition at line 108 of file shape.h.

108 { return 0; }

◆ GetIndexableSubshapes()

virtual void SHAPE_BASE::GetIndexableSubshapes ( std::vector< SHAPE * > &  aSubshapes)
inlinevirtual

Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.

Definition at line 110 of file shape.h.

110 { }

Referenced by SHAPE_COMPOUND::AddShape(), and ROUTER_PREVIEW_ITEM::ViewDraw().

◆ HasIndexableSubshapes()

virtual bool SHAPE_BASE::HasIndexableSubshapes ( ) const
inlinevirtual

Reimplemented in SHAPE_POLY_SET, and SHAPE_COMPOUND.

Definition at line 103 of file shape.h.

104  {
105  return false;
106  }

Referenced by SHAPE_COMPOUND::AddShape(), and ROUTER_PREVIEW_ITEM::ViewDraw().

◆ Type()

SHAPE_TYPE SHAPE_BASE::Type ( ) const
inline

Function Type()

Returns the type of the shape.

Return values
thetype

Definition at line 98 of file shape.h.

99  {
100  return m_type;
101  }
SHAPE_TYPE m_type
type of our shape
Definition: shape.h:114

References m_type.

Referenced by PNS::DP_GATEWAYS::BuildFromPrimitivePair(), PNS::buildHullForPrimitiveShape(), SHAPE_POLY_SET::Collide(), collideShapes(), collideSingleShapes(), PNS::OPTIMIZER::computeBreakouts(), ROUTER_PREVIEW_ITEM::drawShape(), PNS::SOLID::Hull(), and SHAPE_FILE_IO::Write().

Member Data Documentation

◆ m_type

SHAPE_TYPE SHAPE_BASE::m_type
protected

type of our shape

Definition at line 114 of file shape.h.

Referenced by SHAPE::IsNull(), and Type().


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