35 #ifndef ANATOMIST_COMMANDS_CSETMATERIAL_H
36 #define ANATOMIST_COMMANDS_CSETMATERIAL_H
55 float* diffuse,
float* emission,
float* specular,
56 float shininess = -1,
bool refresh =
true,
57 int lighting = -2,
int smoothshading = -2,
58 int polyfiltering = -2,
int zbuffer = -2,
60 const std::string & polymode =
"",
61 int frontface = -1,
float linewidth=-1,
62 const std::vector<float> &
63 unlitcolor=std::vector<float>(),
64 const std::string & selectabemode=
"",
66 int shadercolornormals = -2,
67 int normalisdirection = -2
71 virtual std::string
name()
const {
return(
"SetMaterial" ); }
78 std::set<AObject *> _obj;
87 int _polygonfiltering;
90 std::string _polygonmode;
93 std::vector<float> _unlitcolor;
94 std::string _selectablemode;
96 int _shadercolornormals;
97 int _normalisdirection;
101 static bool initSyntax();
The abstract base class for commands.
The abstract base class for usual commands.
Serializer is a helper class for pointer serialization.
Apply a material colors to objects.
virtual ~SetMaterialCommand()
virtual std::string name() const
Return the unique name of a class of commands.
SetMaterialCommand(const std::set< AObject * > &obj, float *ambient, float *diffuse, float *emission, float *specular, float shininess=-1, bool refresh=true, int lighting=-2, int smoothshading=-2, int polyfiltering=-2, int zbuffer=-2, int faceculling=-2, const std::string &polymode="", int frontface=-1, float linewidth=-1, const std::vector< float > &unlitcolor=std::vector< float >(), const std::string &selectabemode="", int useshader=-2, int shadercolornormals=-2, int normalisdirection=-2)
virtual void doit()
Do a command.
virtual void write(Tree &com, Serializer *ser) const
Print the guts of a command into a Tree given as parent.
Context for commands processor readers (APipeReader etc)