KiCad PCB EDA Suite
SOLDER_MASK_NORMAL Class Reference

Procedural generation of the solder mask. More...

#include <material.h>

Inheritance diagram for SOLDER_MASK_NORMAL:
MATERIAL_GENERATOR

Public Member Functions

 SOLDER_MASK_NORMAL ()
 
 SOLDER_MASK_NORMAL (const MATERIAL_GENERATOR *aCopperNormalGenerator)
 
virtual ~SOLDER_MASK_NORMAL ()
 
SFVEC3F Generate (const RAY &aRay, const HITINFO &aHitInfo) const override
 Generate a 3D vector based on the ray and hit information depending on the implementation. More...
 

Private Attributes

const MATERIAL_GENERATORm_copper_normal_generator
 

Detailed Description

Procedural generation of the solder mask.

Definition at line 125 of file material.h.

Constructor & Destructor Documentation

◆ SOLDER_MASK_NORMAL() [1/2]

SOLDER_MASK_NORMAL::SOLDER_MASK_NORMAL ( )
inline

Definition at line 128 of file material.h.

const MATERIAL_GENERATOR * m_copper_normal_generator
Definition: material.h:138

References m_copper_normal_generator.

◆ SOLDER_MASK_NORMAL() [2/2]

SOLDER_MASK_NORMAL::SOLDER_MASK_NORMAL ( const MATERIAL_GENERATOR aCopperNormalGenerator)

Definition at line 198 of file material.cpp.

199{
200 m_copper_normal_generator = aCopperNormalGenerator;
201}

References m_copper_normal_generator.

◆ ~SOLDER_MASK_NORMAL()

virtual SOLDER_MASK_NORMAL::~SOLDER_MASK_NORMAL ( )
inlinevirtual

Definition at line 131 of file material.h.

132 {
133 }

Member Function Documentation

◆ Generate()

SFVEC3F SOLDER_MASK_NORMAL::Generate ( const RAY aRay,
const HITINFO aHitInfo 
) const
overridevirtual

Generate a 3D vector based on the ray and hit information depending on the implementation.

Parameters
aRaythe camera ray that hits the object
aHitInfothe hit information
Returns
the result of the procedural

Implements MATERIAL_GENERATOR.

Definition at line 204 of file material.cpp.

205{
207 {
208 const SFVEC3F copperNormal = m_copper_normal_generator->Generate( aRay, aHitInfo );
209
210 return copperNormal * 0.05f;
211 }
212 else
213 {
214 return SFVEC3F( 0.0f );
215 }
216}
virtual SFVEC3F Generate(const RAY &aRay, const HITINFO &aHitInfo) const =0
Generate a 3D vector based on the ray and hit information depending on the implementation.
glm::vec3 SFVEC3F
Definition: xv3d_types.h:44

References MATERIAL_GENERATOR::Generate(), and m_copper_normal_generator.

Member Data Documentation

◆ m_copper_normal_generator

const MATERIAL_GENERATOR* SOLDER_MASK_NORMAL::m_copper_normal_generator
private

Definition at line 138 of file material.h.

Referenced by Generate(), and SOLDER_MASK_NORMAL().


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