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 45 of file StdMeshMaterial.h.

Member Enumeration Documentation

Enumerator
AUTO_DUMMY 

Definition at line 59 of file StdMeshMaterial.h.

59  {
60  // TODO: OGRE auto values
62  };

Constructor & Destructor Documentation

StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( )

Definition at line 632 of file StdMeshMaterial.cpp.

632  :
633  type(FLOAT4)
634 {
635 }
StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( Type  type)

Definition at line 637 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

637  :
638  type(type)
639 {
640  if(type == MATRIX_4X4)
641  matrix = new float[16];
642 }
StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( const StdMeshMaterialShaderParameter other)

Definition at line 644 of file StdMeshMaterial.cpp.

645 {
646  CopyDeep(other);
647 }
StdMeshMaterialShaderParameter::StdMeshMaterialShaderParameter ( StdMeshMaterialShaderParameter &&  other)

Definition at line 649 of file StdMeshMaterial.cpp.

650 {
651  Move(std::move(other));
652 }
StdMeshMaterialShaderParameter::~StdMeshMaterialShaderParameter ( )

Definition at line 654 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

655 {
656  if(type == MATRIX_4X4)
657  delete[] matrix;
658 }

Member Function Documentation

Auto StdMeshMaterialShaderParameter::GetAuto ( ) const
inline

Definition at line 77 of file StdMeshMaterial.h.

References a, and AUTO.

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

Definition at line 84 of file StdMeshMaterial.h.

References a, and AUTO.

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

Definition at line 79 of file StdMeshMaterial.h.

References FLOAT.

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

Definition at line 86 of file StdMeshMaterial.h.

References FLOAT.

86 { 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 81 of file StdMeshMaterial.h.

References MATRIX_4X4.

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

Definition at line 88 of file StdMeshMaterial.h.

References MATRIX_4X4.

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

Definition at line 73 of file StdMeshMaterial.h.

73 { return type; }
StdMeshMaterialShaderParameter & StdMeshMaterialShaderParameter::operator= ( const StdMeshMaterialShaderParameter other)

Definition at line 660 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

661 {
662  if(this == &other) return *this;
663 
664  if(type == MATRIX_4X4)
665  delete[] matrix;
666 
667  CopyDeep(other);
668  return *this;
669 }
StdMeshMaterialShaderParameter & StdMeshMaterialShaderParameter::operator= ( StdMeshMaterialShaderParameter &&  other)

Definition at line 671 of file StdMeshMaterial.cpp.

References MATRIX_4X4.

672 {
673  if(this == &other) return *this;
674 
675  if(type == MATRIX_4X4)
676  delete[] matrix;
677 
678  Move(std::move(other));
679  return *this;
680 }
void StdMeshMaterialShaderParameter::SetType ( Type  type)

Definition at line 682 of file StdMeshMaterial.cpp.

683 {
684  StdMeshMaterialShaderParameter other(type);
685  Move(std::move(other));
686 }

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