Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OGLSimpleMaterial Class Reference

#include <OGLSimpleMaterial.h>

Collaboration diagram for OGLSimpleMaterial:
Collaboration graph
[legend]

Public Types

enum class  TextureBlend { Overlay = 0 , Multiply = 1 }
 
enum class  LightingMode { Flat = 0 , Shaded = 1 }
 

Public Member Functions

 OGLSimpleMaterial (const QColor &_color=QColor("white"), const std::shared_ptr< QImage > _image=std::shared_ptr< QImage >(), const TextureBlend _textureBlend=TextureBlend::Multiply, const LightingMode _LightingMode=LightingMode::Flat)
 

Public Attributes

QColor color
 
std::shared_ptr< QImage > image
 
TextureBlend textureBlend
 
LightingMode lightingMode
 

Static Public Attributes

static OGLSimpleMaterial BOUNDING_BOX {QColor(255, 255, 128)}
 

Detailed Description

Visual material used to render a mesh.

Definition at line 27 of file OGLSimpleMaterial.h.

Member Enumeration Documentation

◆ LightingMode

Enumerator
Flat 
Shaded 

Definition at line 38 of file OGLSimpleMaterial.h.

◆ TextureBlend

Enumerator
Overlay 
Multiply 

Definition at line 31 of file OGLSimpleMaterial.h.

Constructor & Destructor Documentation

◆ OGLSimpleMaterial()

OGLSimpleMaterial::OGLSimpleMaterial ( const QColor &  _color = QColor("white"),
const std::shared_ptr< QImage >  _image = std::shared_ptr<QImage>(),
const TextureBlend  _textureBlend = TextureBlend::Multiply,
const LightingMode  _LightingMode = LightingMode::Flat 
)

Definition at line 21 of file OGLSimpleMaterial.cpp.

Member Data Documentation

◆ BOUNDING_BOX

OGLSimpleMaterial OGLSimpleMaterial::BOUNDING_BOX {QColor(255, 255, 128)}
static

Material used to render bounding boxes.

Definition at line 74 of file OGLSimpleMaterial.h.

◆ color

QColor OGLSimpleMaterial::color

Default color of the geometry when not vertex color is specified in the mesh.

Definition at line 52 of file OGLSimpleMaterial.h.

◆ image

std::shared_ptr<QImage> OGLSimpleMaterial::image

Pointer to an image texture that get multiplied by the color. When it equals to a nullptr (default), only the color is used.

Definition at line 58 of file OGLSimpleMaterial.h.

◆ lightingMode

LightingMode OGLSimpleMaterial::lightingMode

Whether the mesh should be shaded or displayed as flat color

Definition at line 69 of file OGLSimpleMaterial.h.

◆ textureBlend

TextureBlend OGLSimpleMaterial::textureBlend

Whether the texture should be on top of the color or if it should be mixed with the color.

Definition at line 64 of file OGLSimpleMaterial.h.


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