34 #include "vtkRenderingCoreModule.h" 44 #define VTK_WIREFRAME 1 56 class vtkPropertyInternals;
105 vtkGetMacro(Lighting,
bool);
117 vtkGetMacro(RenderPointsAsSpheres,
bool);
130 vtkGetMacro(RenderLinesAsTubes,
bool);
140 vtkGetMacro(Interpolation,
int);
142 { this->SetInterpolation(
VTK_FLAT); }
147 const char *GetInterpolationAsString();
155 vtkGetMacro(Representation,
int);
162 const char *GetRepresentationAsString();
171 virtual void SetColor(
double r,
double g,
double b);
172 virtual void SetColor(
double a[3]);
174 void GetColor(
double rgb[3]);
175 void GetColor(
double &r,
double &g,
double &b);
182 vtkSetClampMacro(Ambient,
double, 0.0, 1.0);
183 vtkGetMacro(Ambient,
double);
190 vtkSetClampMacro(Diffuse,
double, 0.0, 1.0);
191 vtkGetMacro(Diffuse,
double);
198 vtkSetClampMacro(Specular,
double, 0.0, 1.0);
199 vtkGetMacro(Specular,
double);
206 vtkSetClampMacro(SpecularPower,
double, 0.0, 128.0);
207 vtkGetMacro(SpecularPower,
double);
215 vtkSetClampMacro(Opacity,
double, 0.0, 1.0);
216 vtkGetMacro(Opacity,
double);
226 vtkSetVector3Macro(AmbientColor,
double);
227 vtkGetVector3Macro(AmbientColor,
double);
234 vtkSetVector3Macro(DiffuseColor,
double);
235 vtkGetVector3Macro(DiffuseColor,
double);
242 vtkSetVector3Macro(SpecularColor,
double);
243 vtkGetVector3Macro(SpecularColor,
double);
252 vtkGetMacro(EdgeVisibility,
int);
261 vtkSetVector3Macro(EdgeColor,
double);
262 vtkGetVector3Macro(EdgeColor,
double);
271 vtkGetMacro(VertexVisibility,
int);
280 vtkSetVector3Macro(VertexColor,
double);
281 vtkGetVector3Macro(VertexColor,
double);
290 vtkGetMacro(LineWidth,
float);
300 vtkGetMacro(LineStipplePattern,
int);
309 vtkSetClampMacro(LineStippleRepeatFactor,
int, 1,
VTK_INT_MAX);
310 vtkGetMacro(LineStippleRepeatFactor,
int);
319 vtkGetMacro(PointSize,
float);
328 vtkGetMacro(BackfaceCulling,
int);
339 vtkGetMacro(FrontfaceCulling,
int);
357 vtkGetMacro(Shading,
int);
376 virtual void AddShaderVariable(
const char *
name,
int numVars,
int *x);
377 virtual void AddShaderVariable(
const char *
name,
int numVars,
float *x);
378 virtual void AddShaderVariable(
const char *
name,
int numVars,
double *x);
386 { this->AddShaderVariable(
name, 1, &v); }
388 { this->AddShaderVariable(
name, 1, &v); }
390 { this->AddShaderVariable(
name, 1, &v); }
394 this->AddShaderVariable(
name, 2, v);
398 float v[2] = {v1, v2};
399 this->AddShaderVariable(
name, 2, v);
403 double v[2] = {v1, v2};
404 this->AddShaderVariable(
name, 2, v);
408 int v[3] = {v1, v2, v3};
409 this->AddShaderVariable(
name, 3, v);
413 float v[3] = {v1, v2, v3};
414 this->AddShaderVariable(
name, 3, v);
418 double v[3] = {v1, v2, v3};
419 this->AddShaderVariable(
name, 3, v);
441 void SetTexture(
int unit,
vtkTexture* texture);
443 void RemoveTexture(
int unit);
450 void RemoveTexture(
const char*
name);
455 void RemoveAllTextures();
460 int GetNumberOfTextures();
467 virtual void ReleaseGraphicsResources(
vtkWindow *win);
475 VTK_TEXTURE_UNIT_0 = 0,
492 static
void ComputeCompositeColor(
double result[3],
493 double ambient, const
double ambient_color[3],
494 double diffuse, const
double diffuse_color[3],
495 double specular, const
double specular_color[3]);
498 double AmbientColor[3];
499 double DiffuseColor[3];
500 double SpecularColor[3];
502 double VertexColor[3];
506 double SpecularPower;
510 int LineStipplePattern;
511 int LineStippleRepeatFactor;
515 int VertexVisibility;
517 int FrontfaceCulling;
519 bool RenderPointsAsSpheres;
520 bool RenderLinesAsTubes;
525 vtkSetStringMacro(MaterialName);
531 int GetTextureUnitAtIndex(
int index);
532 int GetTextureUnit(const
char*
name);
536 void operator=(const
vtkProperty&) VTK_DELETE_FUNCTION;
538 vtkPropertyInternals* Internals;
547 if (this->Interpolation ==
VTK_FLAT)
void AddShaderVariable(const char *name, float v1, float v2, float v3)
Methods to provide to add shader variables from tcl.
represents an object (geometry & properties) in a rendered scene
void SetInterpolationToPhong()
Set the shading interpolation method for an object.
abstract base class for most VTK objects
VTKTextureUnit
Used to specify which texture unit a texture will use.
void AddShaderVariable(const char *name, double v)
Methods to provide to add shader variables from tcl.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Represents an XML element and those nested inside.
void AddShaderVariable(const char *name, double v1, double v2, double v3)
Methods to provide to add shader variables from tcl.
represent surface properties of a geometric object
const char * GetRepresentationAsString()
Return the method of shading as a descriptive character string.
void SetInterpolationToFlat()
Set the shading interpolation method for an object.
void AddShaderVariable(const char *name, int v1, int v2, int v3)
Methods to provide to add shader variables from tcl.
void AddShaderVariable(const char *name, float v)
Methods to provide to add shader variables from tcl.
abstract specification for renderers
void AddShaderVariable(const char *name, double v1, double v2)
Methods to provide to add shader variables from tcl.
void SetRepresentationToPoints()
Control the surface geometry representation for the object.
void SetInterpolationToGouraud()
Set the shading interpolation method for an object.
window superclass for vtkRenderWindow
void AddShaderVariable(const char *name, float v1, float v2)
Methods to provide to add shader variables from tcl.
a simple class to control print indentation
void SetRepresentationToWireframe()
Control the surface geometry representation for the object.
virtual vtkShaderDeviceAdapter2 * GetShaderDeviceAdapter2()
Get the vtkShaderDeviceAdapter2 if set, returns null otherwise.
handles properties associated with a texture map
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void SetRepresentationToSurface()
Control the surface geometry representation for the object.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void AddShaderVariable(const char *name, int v)
Methods to provide to add shader variables from tcl.
virtual void BackfaceRender(vtkActor *, vtkRenderer *)
This method renders the property as a backface property.
void AddShaderVariable(const char *name, int v1, int v2)
Methods to provide to add shader variables from tcl.
an adapter to pass generic vertex attributes to the rendering pipeline.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
The ShaderProgram uses one or more Shader objects.