Chi-Tech
material_property_base.h
Go to the documentation of this file.
1#ifndef CHI_PHYSICS_MATERIAL_PROPERTY_BASE_H
2#define CHI_PHYSICS_MATERIAL_PROPERTY_BASE_H
3
4#include <string>
5#include <vector>
6
7#include "chi_lua.h"
8
9namespace chi_physics
10{
11enum class PropertyType
12{
13 SCALAR_VALUE = 1,
16};
17
18//###################################################################
19/** Base class for material properties.*/
21{
22private:
24public:
25 std::string property_name;
26
27 explicit MaterialProperty(PropertyType in_type) : type_(in_type) {}
28
29 virtual ~MaterialProperty() = default;
30
31 PropertyType Type() { return type_; }
32
33 virtual double GetScalarValue() { return 0.0; }
34
35 virtual void PushLuaTable(lua_State *L) const;
36};
37
38}
39
40#endif //CHI_PHYSICS_MATERIAL_PROPERTY_BASE_H
virtual ~MaterialProperty()=default
virtual void PushLuaTable(lua_State *L) const
MaterialProperty(PropertyType in_type)