OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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

Enumerator
AUTO_DUMMY 

Definition at line 56 of file StdMeshMaterial.h.

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

Constructor & Destructor Documentation

StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( )
default
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::StdMeshMaterialShaderParameter ( const StdMeshMaterialShaderParameter other)

Definition at line 628 of file StdMeshMaterial.cpp.

629 {
630  CopyDeep(other);
631 }
StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( StdMeshMaterialShaderParameter &&  other)

Definition at line 633 of file StdMeshMaterial.cpp.

634 {
635  Move(std::move(other));
636 }
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

Auto StdMeshMaterialShaderParameter::GetAuto ( ) const
inline

Definition at line 74 of file StdMeshMaterial.h.

References a, and AUTO.

74 { assert(type == AUTO); return a; }
#define a
Auto& StdMeshMaterialShaderParameter::GetAuto ( )
inline

Definition at line 81 of file StdMeshMaterial.h.

References a, and AUTO.

81 { assert(type == AUTO); return a; }
#define a
float StdMeshMaterialShaderParameter::GetFloat ( ) const
inline

Definition at line 76 of file StdMeshMaterial.h.

References FLOAT.

76 { assert(type == FLOAT); return f[0]; }
float& StdMeshMaterialShaderParameter::GetFloat ( )
inline

Definition at line 83 of file StdMeshMaterial.h.

References FLOAT.

83 { assert(type == FLOAT); return f[0]; }
const float* StdMeshMaterialShaderParameter::GetFloatv ( ) const
inline
float* StdMeshMaterialShaderParameter::GetFloatv ( )
inline
int StdMeshMaterialShaderParameter::GetInt ( ) const
inline
int& StdMeshMaterialShaderParameter::GetInt ( )
inline
const float* StdMeshMaterialShaderParameter::GetMatrix ( ) const
inline

Definition at line 78 of file StdMeshMaterial.h.

References MATRIX_4X4.

78 { assert(type == MATRIX_4X4); return matrix; }
float* StdMeshMaterialShaderParameter::GetMatrix ( )
inline

Definition at line 85 of file StdMeshMaterial.h.

References MATRIX_4X4.

85 { assert(type == MATRIX_4X4); return matrix; }
Type StdMeshMaterialShaderParameter::GetType ( ) const
inline

Definition at line 70 of file StdMeshMaterial.h.

70 { return type; }
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 }
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 }
void StdMeshMaterialShaderParameter::SetType ( Type  type)

Definition at line 666 of file StdMeshMaterial.cpp.

667 {
668  StdMeshMaterialShaderParameter other(type);
669  Move(std::move(other));
670 }

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