KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PLASTIC_NORMAL Class Reference

Procedural generation of the plastic normals. More...

#include <material.h>

Inheritance diagram for PLASTIC_NORMAL:
MATERIAL_GENERATOR

Public Member Functions

 PLASTIC_NORMAL ()
 
 PLASTIC_NORMAL (float aScale)
 
virtual ~PLASTIC_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.
 

Private Attributes

float m_scale
 

Detailed Description

Procedural generation of the plastic normals.

Definition at line 145 of file material.h.

Constructor & Destructor Documentation

◆ PLASTIC_NORMAL() [1/2]

PLASTIC_NORMAL::PLASTIC_NORMAL ( )
inline

Definition at line 148 of file material.h.

References m_scale.

◆ PLASTIC_NORMAL() [2/2]

PLASTIC_NORMAL::PLASTIC_NORMAL ( float  aScale)

Definition at line 230 of file material.cpp.

References m_scale.

◆ ~PLASTIC_NORMAL()

virtual PLASTIC_NORMAL::~PLASTIC_NORMAL ( )
inlinevirtual

Definition at line 155 of file material.h.

Member Function Documentation

◆ Generate()

SFVEC3F PLASTIC_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 236 of file material.cpp.

References HITINFO::m_HitPoint, m_scale, HITINFO::m_tHit, PerlinNoise::noise(), and s_perlinNoise.

Member Data Documentation

◆ m_scale

float PLASTIC_NORMAL::m_scale
private

Definition at line 162 of file material.h.

Referenced by Generate(), and PLASTIC_NORMAL().


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