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

#include <sg_base.h>

Public Member Functions

 SGCOLOR ()
 
 SGCOLOR (float aRVal, float aGVal, float aBVal)
 
void GetColor (float &aRedVal, float &aGreenVal, float &aBlueVal) const noexcept
 
void GetColor (SGCOLOR &aColor) const noexcept
 
void GetColor (SGCOLOR *aColor) const noexcept
 
bool SetColor (float aRedVal, float aGreenVal, float aBlueVal)
 
bool SetColor (const SGCOLOR &aColor) noexcept
 
bool SetColor (const SGCOLOR *aColor) noexcept
 

Protected Attributes

float red
 
float green
 
float blue
 

Private Member Functions

bool checkRange (float aRedVal, float aGreenVal, float aBlueVal) const noexcept
 

Detailed Description

Definition at line 39 of file sg_base.h.

Constructor & Destructor Documentation

◆ SGCOLOR() [1/2]

SGCOLOR::SGCOLOR ( )

Definition at line 30 of file sg_base.cpp.

References blue, green, and red.

Referenced by GetColor(), GetColor(), SetColor(), and SetColor().

◆ SGCOLOR() [2/2]

SGCOLOR::SGCOLOR ( float aRVal,
float aGVal,
float aBVal )

Definition at line 37 of file sg_base.cpp.

References blue, checkRange(), green, and red.

Member Function Documentation

◆ checkRange()

bool SGCOLOR::checkRange ( float aRedVal,
float aGreenVal,
float aBlueVal ) const
privatenoexcept

Definition at line 114 of file sg_base.cpp.

Referenced by SetColor(), and SGCOLOR().

◆ GetColor() [1/3]

void SGCOLOR::GetColor ( float & aRedVal,
float & aGreenVal,
float & aBlueVal ) const
noexcept

Definition at line 55 of file sg_base.cpp.

References blue, green, and red.

Referenced by S3D::FormatColor(), formatMaterial(), SGSHAPE::Prepare(), and S3D::WriteColor().

◆ GetColor() [2/3]

void SGCOLOR::GetColor ( SGCOLOR & aColor) const
noexcept

Definition at line 63 of file sg_base.cpp.

References blue, green, red, and SGCOLOR().

◆ GetColor() [3/3]

void SGCOLOR::GetColor ( SGCOLOR * aColor) const
noexcept

Definition at line 71 of file sg_base.cpp.

References blue, green, red, and SGCOLOR().

◆ SetColor() [1/3]

bool SGCOLOR::SetColor ( const SGCOLOR & aColor)
noexcept

Definition at line 94 of file sg_base.cpp.

References blue, green, red, and SGCOLOR().

◆ SetColor() [2/3]

bool SGCOLOR::SetColor ( const SGCOLOR * aColor)
noexcept

Definition at line 103 of file sg_base.cpp.

References blue, green, red, and SGCOLOR().

◆ SetColor() [3/3]

bool SGCOLOR::SetColor ( float aRedVal,
float aGreenVal,
float aBlueVal )

Definition at line 81 of file sg_base.cpp.

References blue, checkRange(), green, and red.

Referenced by WRL1MATERIAL::GetColor(), S3D::ReadColor(), and WRL2FACESET::TranslateToSG().

Member Data Documentation

◆ blue

float SGCOLOR::blue
protected

Definition at line 44 of file sg_base.h.

Referenced by GetColor(), GetColor(), GetColor(), SetColor(), SetColor(), SetColor(), SGCOLOR(), and SGCOLOR().

◆ green

float SGCOLOR::green
protected

Definition at line 43 of file sg_base.h.

Referenced by GetColor(), GetColor(), GetColor(), SetColor(), SetColor(), SetColor(), SGCOLOR(), and SGCOLOR().

◆ red

float SGCOLOR::red
protected

Definition at line 42 of file sg_base.h.

Referenced by GetColor(), GetColor(), GetColor(), SetColor(), SetColor(), SetColor(), SGCOLOR(), and SGCOLOR().


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