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 129 of file material.h.

Constructor & Destructor Documentation

◆ SOLDER_MASK_NORMAL() [1/2]

SOLDER_MASK_NORMAL::SOLDER_MASK_NORMAL ( )
inline

Definition at line 132 of file material.h.

const MATERIAL_GENERATOR * m_copper_normal_generator
Definition: material.h:142

References m_copper_normal_generator.

◆ SOLDER_MASK_NORMAL() [2/2]

SOLDER_MASK_NORMAL::SOLDER_MASK_NORMAL ( const MATERIAL_GENERATOR aCopperNormalGenerator)

Definition at line 202 of file material.cpp.

203 {
204  m_copper_normal_generator = aCopperNormalGenerator;
205 }
const MATERIAL_GENERATOR * m_copper_normal_generator
Definition: material.h:142

References m_copper_normal_generator.

◆ ~SOLDER_MASK_NORMAL()

virtual SOLDER_MASK_NORMAL::~SOLDER_MASK_NORMAL ( )
inlinevirtual

Definition at line 135 of file material.h.

136  {
137  }

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 208 of file material.cpp.

209 {
211  {
212  const SFVEC3F copperNormal = m_copper_normal_generator->Generate( aRay, aHitInfo );
213 
214  return copperNormal * 0.05f;
215  }
216  else
217  {
218  return SFVEC3F( 0.0f );
219  }
220 }
const MATERIAL_GENERATOR * m_copper_normal_generator
Definition: material.h:142
glm::vec3 SFVEC3F
Definition: xv3d_types.h:44
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.

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 142 of file material.h.

Referenced by Generate(), and SOLDER_MASK_NORMAL().


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