PLaSK library
Loading...
Searching...
No Matches
plask::edge::SimpleMaterial Struct Reference

Strategy which assigns constant material. More...

#include <plask/geometry/edge.hpp>

Inheritance diagram for plask::edge::SimpleMaterial:
[legend]
Collaboration diagram for plask::edge::SimpleMaterial:
[legend]

Public Member Functions

 SimpleMaterial (const shared_ptr< Material > &material)
 Construct SimpleMaterial strategy which use given material.
 
Type type () const override
 
void applyLo (double bbox_lo, double bbox_hi, double &p, shared_ptr< Material > &result_material, const Strategy *opposite) const override
 Apply strategy to given point p.
 
void applyHi (double bbox_lo, double bbox_hi, double &p, shared_ptr< Material > &result_material, const Strategy *opposite) const override
 Apply strategy to given point p.
 
SimpleMaterialclone () const override
 Clone this strategy.
 
std::string str () const override
 Get string representation of this strategy.
 
- Public Member Functions inherited from plask::edge::Strategy
virtual ~Strategy ()
 
virtual bool canMoveOutsideBoundingBox () const
 Check if this strategy can move point p to place outside bounding box.
 

Public Attributes

shared_ptr< Materialmaterial
 Material which will be assigned to result_material by apply method.
 

Additional Inherited Members

- Public Types inherited from plask::edge::Strategy
enum  Type {
  DEFAULT , SIMPLE , EXTEND , PERIODIC ,
  MIRROR
}
 Enum holding strategy types. More...
 
- Static Public Member Functions inherited from plask::edge::Strategy
static StrategyfromStr (const std::string &str, const MaterialsDB &materialsDB=MaterialsDB::getDefault())
 Create new strategy (using operator new) described by string str.
 
static std::unique_ptr< StrategyfromStrUnique (const std::string &str, const MaterialsDB &materialsDB=MaterialsDB::getDefault())
 Create new strategy described by string str.
 

Detailed Description

Strategy which assigns constant material.

Definition at line 142 of file edge.hpp.

Constructor & Destructor Documentation

◆ SimpleMaterial()

plask::edge::SimpleMaterial::SimpleMaterial ( const shared_ptr< Material > &  material)
inline

Construct SimpleMaterial strategy which use given material.

Parameters
materialmaterial which will be assigned to result_material by apply method

Definition at line 153 of file edge.hpp.

Member Function Documentation

◆ applyHi()

void plask::edge::SimpleMaterial::applyHi ( double  bbox_lo,
double  bbox_hi,
double p,
shared_ptr< Material > &  result_material,
const Strategy opposite 
) const
overridevirtual

Apply strategy to given point p.

Parameters
[in]bbox_lo,bbox_hicoordinates of geometry object bounding box in strategy working direction
[in,out]pcoordinate of point in strategy working direction, it's (must be) higher than bbox_hi, this method can move this point
[out]result_materialoptionally, this method can assign to it material which should be used
[in]oppositestrategy at opposite side (if known)

Implements plask::edge::Strategy.

Definition at line 39 of file edge.cpp.

◆ applyLo()

void plask::edge::SimpleMaterial::applyLo ( double  bbox_lo,
double  bbox_hi,
double p,
shared_ptr< Material > &  result_material,
const Strategy opposite 
) const
overridevirtual

Apply strategy to given point p.

Parameters
[in]bbox_lo,bbox_hicoordinates of geometry object bounding box in strategy working direction
[in,out]pcoordinate of point in strategy working direction, it's (must be) lower than bbox_lo, this method can move this point
[out]result_materialoptionally, this method can assign to it material which should be used
[in]oppositestrategy at opposite side (if known)

Implements plask::edge::Strategy.

Definition at line 36 of file edge.cpp.

◆ clone()

SimpleMaterial * plask::edge::SimpleMaterial::clone ( ) const
overridevirtual

Clone this strategy.

Returns
strategy identical to this one, constructed using operator new

Implements plask::edge::UniversalStrategy.

Definition at line 43 of file edge.cpp.

◆ str()

std::string plask::edge::SimpleMaterial::str ( ) const
overridevirtual

Get string representation of this strategy.

Returns
string representation of this strategy

Implements plask::edge::Strategy.

Definition at line 47 of file edge.cpp.

◆ type()

Type plask::edge::SimpleMaterial::type ( ) const
inlineoverridevirtual
Returns
strategy type

Implements plask::edge::Strategy.

Definition at line 155 of file edge.hpp.

Member Data Documentation

◆ material

shared_ptr<Material> plask::edge::SimpleMaterial::material

Material which will be assigned to result_material by apply method.

Definition at line 147 of file edge.hpp.


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