OpenClonk
StdMeshMaterialShaderParameter Class Reference

#include <StdMeshMaterial.h>

Public Types

enum  Type {
  AUTO, AUTO_TEXTURE_MATRIX, INT, FLOAT,
  FLOAT2, FLOAT3, FLOAT4, MATRIX_4X4
}
 
enum  Auto { AUTO_DUMMY }
 

Public Member Functions

 StdMeshMaterialShaderParameter ()
 
 StdMeshMaterialShaderParameter (Type type)
 
 StdMeshMaterialShaderParameter (const StdMeshMaterialShaderParameter &other)
 
 StdMeshMaterialShaderParameter (StdMeshMaterialShaderParameter &&other)
 
 ~StdMeshMaterialShaderParameter ()
 
StdMeshMaterialShaderParameteroperator= (const StdMeshMaterialShaderParameter &other)
 
StdMeshMaterialShaderParameteroperator= (StdMeshMaterialShaderParameter &&other)
 
Type GetType () const
 
void SetType (Type type)
 
Auto GetAuto () const
 
int GetInt () const
 
float GetFloat () const
 
const float * GetFloatv () const
 
const float * GetMatrix () const
 
AutoGetAuto ()
 
int & GetInt ()
 
float & GetFloat ()
 
float * GetFloatv ()
 
float * GetMatrix ()
 

Detailed Description

Definition at line 42 of file StdMeshMaterial.h.

Member Enumeration Documentation

◆ Auto

Enumerator
AUTO_DUMMY 

Definition at line 56 of file StdMeshMaterial.h.

56  {
57  // TODO: OGRE auto values
59  };

◆ Type

Constructor & Destructor Documentation

◆ StdMeshMaterialShaderParameter() [1/4]

StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( )
default

Referenced by StdMeshMaterialShaderParameters::AddParameter(), LoadShader(), and SetType().

Here is the caller graph for this function:

◆ StdMeshMaterialShaderParameter() [2/4]

StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( Type  type)

Definition at line 621 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

621  :
622  type(type)
623 {
624  if(type == MATRIX_4X4)
625  matrix = new float[16];
626 }

◆ StdMeshMaterialShaderParameter() [3/4]

StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( const StdMeshMaterialShaderParameter other)

Definition at line 628 of file StdMeshMaterial.cpp.

629 {
630  CopyDeep(other);
631 }

◆ StdMeshMaterialShaderParameter() [4/4]

StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( StdMeshMaterialShaderParameter &&  other)

Definition at line 633 of file StdMeshMaterial.cpp.

634 {
635  Move(std::move(other));
636 }

◆ ~StdMeshMaterialShaderParameter()

StdMeshMaterialShaderParameter::~StdMeshMaterialShaderParameter ( )

Definition at line 638 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

639 {
640  if(type == MATRIX_4X4)
641  delete[] matrix;
642 }

Member Function Documentation

◆ GetAuto() [1/2]

Auto StdMeshMaterialShaderParameter::GetAuto ( ) const
inline

Definition at line 74 of file StdMeshMaterial.h.

References a.

Referenced by SetType().

74 { assert(type == AUTO); return a; }
#define a
Here is the caller graph for this function:

◆ GetAuto() [2/2]

Auto& StdMeshMaterialShaderParameter::GetAuto ( )
inline

Definition at line 81 of file StdMeshMaterial.h.

References a.

81 { assert(type == AUTO); return a; }
#define a

◆ GetFloat() [1/2]

float StdMeshMaterialShaderParameter::GetFloat ( ) const
inline

Definition at line 76 of file StdMeshMaterial.h.

Referenced by SetType().

76 { assert(type == FLOAT); return f[0]; }
Here is the caller graph for this function:

◆ GetFloat() [2/2]

float& StdMeshMaterialShaderParameter::GetFloat ( )
inline

Definition at line 83 of file StdMeshMaterial.h.

83 { assert(type == FLOAT); return f[0]; }

◆ GetFloatv() [1/2]

const float* StdMeshMaterialShaderParameter::GetFloatv ( ) const
inline

Definition at line 77 of file StdMeshMaterial.h.

Referenced by SetType().

Here is the caller graph for this function:

◆ GetFloatv() [2/2]

float* StdMeshMaterialShaderParameter::GetFloatv ( )
inline

◆ GetInt() [1/2]

int StdMeshMaterialShaderParameter::GetInt ( ) const
inline

Definition at line 75 of file StdMeshMaterial.h.

Referenced by SetType().

Here is the caller graph for this function:

◆ GetInt() [2/2]

int& StdMeshMaterialShaderParameter::GetInt ( )
inline

◆ GetMatrix() [1/2]

const float* StdMeshMaterialShaderParameter::GetMatrix ( ) const
inline

Definition at line 78 of file StdMeshMaterial.h.

78 { assert(type == MATRIX_4X4); return matrix; }

◆ GetMatrix() [2/2]

float* StdMeshMaterialShaderParameter::GetMatrix ( )
inline

Definition at line 85 of file StdMeshMaterial.h.

References a.

85 { assert(type == MATRIX_4X4); return matrix; }

◆ GetType()

Type StdMeshMaterialShaderParameter::GetType ( ) const
inline

Definition at line 70 of file StdMeshMaterial.h.

70 { return type; }

◆ operator=() [1/2]

StdMeshMaterialShaderParameter & StdMeshMaterialShaderParameter::operator= ( const StdMeshMaterialShaderParameter other)

Definition at line 644 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

645 {
646  if(this == &other) return *this;
647 
648  if(type == MATRIX_4X4)
649  delete[] matrix;
650 
651  CopyDeep(other);
652  return *this;
653 }

◆ operator=() [2/2]

StdMeshMaterialShaderParameter & StdMeshMaterialShaderParameter::operator= ( StdMeshMaterialShaderParameter &&  other)

Definition at line 655 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

656 {
657  if(this == &other) return *this;
658 
659  if(type == MATRIX_4X4)
660  delete[] matrix;
661 
662  Move(std::move(other));
663  return *this;
664 }

◆ SetType()

void StdMeshMaterialShaderParameter::SetType ( Type  type)

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