scg3  0.6
scg::TextureCore Class Referenceabstract

Base class for all texture cores (abstract). More...

#include "TextureCore.h"

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

Public Member Functions

 TextureCore ()
 
virtual ~TextureCore ()=0
 
TextureCorerotate (GLfloat angleDeg, glm::vec3 axis)
 
TextureCorescale (glm::vec3 scaling)
 
TextureCoresetMatrix (glm::mat4 matrix)
 
virtual void render (RenderState *renderState)
 
virtual void renderPost (RenderState *renderState)
 
- Public Member Functions inherited from scg::Core
 Core ()
 
virtual ~Core ()=0
 

Protected Attributes

GLuint tex_
 
GLint texOld_
 
glm::mat4 matrix_
 

Detailed Description

Base class for all texture cores (abstract).

Definition at line 39 of file TextureCore.h.

Constructor & Destructor Documentation

◆ TextureCore()

scg::TextureCore::TextureCore ( )

Constructor.

◆ ~TextureCore()

virtual scg::TextureCore::~TextureCore ( )
pure virtual

Destructor.

Member Function Documentation

◆ render()

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

Render core, i.e., post-multiply current texture matrix by local texture matrix. Note: Derived classes must call this function at the beginning of their render() function.

Implements scg::Core.

Reimplemented in scg::Texture2DCore, scg::BumpMapCore, and scg::CubeMapCore.

◆ renderPost()

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

Render core after traversing sub-tree, i.e., restore previous texture matrix. Note: Derived classes must call this function at the end of their render() function.

Reimplemented from scg::Core.

Reimplemented in scg::Texture2DCore, scg::BumpMapCore, and scg::CubeMapCore.

◆ rotate()

TextureCore* scg::TextureCore::rotate ( GLfloat  angleDeg,
glm::vec3  axis 
)

Rotate texture (post-multiply local texture matrix by transformation).

Parameters
angleDegrotation angle (degrees)
axisrotation axis
Returns
this pointer for method chaining

◆ scale()

TextureCore* scg::TextureCore::scale ( glm::vec3  scaling)

Scale texture (post-multiply local texture matrix by transformation).

Parameters
scalingscaling factors in s, t, and u directions
Returns
this pointer for method chaining

◆ setMatrix()

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

Set texture matrix.

Returns
this pointer for method chaining

Member Data Documentation

◆ matrix_

glm::mat4 scg::TextureCore::matrix_
protected

Definition at line 90 of file TextureCore.h.

◆ tex_

GLuint scg::TextureCore::tex_
protected

Definition at line 88 of file TextureCore.h.

◆ texOld_

GLint scg::TextureCore::texOld_
protected

Definition at line 89 of file TextureCore.h.


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