scg3  0.6
scg::ColorCore Class Reference

A core to set a vertex color or a color transformation to be applied to subsequent geometry. More...

#include "ColorCore.h"

Inheritance diagram for scg::ColorCore:
[legend]
Collaboration diagram for scg::ColorCore:
[legend]

Public Member Functions

 ColorCore ()
 
virtual ~ColorCore ()
 
ColorCoresetColor (glm::vec4 color)
 
ColorCoresetMatrix (glm::mat4 matrix)
 
virtual void render (RenderState *renderState)
 
virtual void renderPost (RenderState *renderState)
 
- Public Member Functions inherited from scg::Core
 Core ()
 
virtual ~Core ()=0
 

Static Public Member Functions

static ColorCoreSP create ()
 

Protected Attributes

bool isColorSet_
 
glm::vec4 color_
 
glm::mat4 matrix_
 
ColorCorecolorCoreOld_
 

Detailed Description

A core to set a vertex color or a color transformation to be applied to subsequent geometry.

Definition at line 40 of file ColorCore.h.

Constructor & Destructor Documentation

◆ ColorCore()

scg::ColorCore::ColorCore ( )

Constructor.

◆ ~ColorCore()

virtual scg::ColorCore::~ColorCore ( )
virtual

Destructor.

Member Function Documentation

◆ create()

static ColorCoreSP scg::ColorCore::create ( )
static

Create shared pointer.

◆ render()

virtual void scg::ColorCore::render ( RenderState renderState)
virtual

Render core, i.e., post-multiply current color matrix by local color matrix and set vertex color (if defined).

Implements scg::Core.

◆ renderPost()

virtual void scg::ColorCore::renderPost ( RenderState renderState)
virtual

Render core after traversing sub-tree, i.e., restore previous color matrix.

Reimplemented from scg::Core.

◆ setColor()

ColorCore* scg::ColorCore::setColor ( glm::vec4  color)

Set vertex color.

Parameters
colorvertex color; for color.w < 0, the vertex color is unset
Returns
this pointer for method chaining

◆ setMatrix()

ColorCore* scg::ColorCore::setMatrix ( glm::mat4  matrix)

Set color matrix.

Returns
this pointer for method chaining

Member Data Documentation

◆ color_

glm::vec4 scg::ColorCore::color_
protected

Definition at line 86 of file ColorCore.h.

◆ colorCoreOld_

ColorCore* scg::ColorCore::colorCoreOld_
protected

Definition at line 88 of file ColorCore.h.

◆ isColorSet_

bool scg::ColorCore::isColorSet_
protected

Definition at line 85 of file ColorCore.h.

◆ matrix_

glm::mat4 scg::ColorCore::matrix_
protected

Definition at line 87 of file ColorCore.h.


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