40 #include "vtkRenderingCoreModule.h" 50 #define VTK_WIREFRAME 1 62 class vtkPropertyInternals;
111 vtkGetMacro(Lighting,
bool);
123 vtkGetMacro(RenderPointsAsSpheres,
bool);
136 vtkGetMacro(RenderLinesAsTubes,
bool);
146 vtkGetMacro(Interpolation,
int);
148 { this->SetInterpolation(
VTK_FLAT); }
153 const char *GetInterpolationAsString();
161 vtkGetMacro(Representation,
int);
168 const char *GetRepresentationAsString();
177 virtual void SetColor(
double r,
double g,
double b);
178 virtual void SetColor(
double a[3]);
180 void GetColor(
double rgb[3]);
181 void GetColor(
double &r,
double &g,
double &b);
188 vtkSetClampMacro(Ambient,
double, 0.0, 1.0);
189 vtkGetMacro(Ambient,
double);
196 vtkSetClampMacro(Diffuse,
double, 0.0, 1.0);
197 vtkGetMacro(Diffuse,
double);
204 vtkSetClampMacro(Specular,
double, 0.0, 1.0);
205 vtkGetMacro(Specular,
double);
212 vtkSetClampMacro(SpecularPower,
double, 0.0, 128.0);
213 vtkGetMacro(SpecularPower,
double);
221 vtkSetClampMacro(Opacity,
double, 0.0, 1.0);
222 vtkGetMacro(Opacity,
double);
232 vtkSetVector3Macro(AmbientColor,
double);
233 vtkGetVector3Macro(AmbientColor,
double);
240 vtkSetVector3Macro(DiffuseColor,
double);
241 vtkGetVector3Macro(DiffuseColor,
double);
248 vtkSetVector3Macro(SpecularColor,
double);
249 vtkGetVector3Macro(SpecularColor,
double);
258 vtkGetMacro(EdgeVisibility,
int);
267 vtkSetVector3Macro(EdgeColor,
double);
268 vtkGetVector3Macro(EdgeColor,
double);
277 vtkGetMacro(VertexVisibility,
int);
286 vtkSetVector3Macro(VertexColor,
double);
287 vtkGetVector3Macro(VertexColor,
double);
296 vtkGetMacro(LineWidth,
float);
306 vtkGetMacro(LineStipplePattern,
int);
315 vtkSetClampMacro(LineStippleRepeatFactor,
int, 1,
VTK_INT_MAX);
316 vtkGetMacro(LineStippleRepeatFactor,
int);
325 vtkGetMacro(PointSize,
float);
334 vtkGetMacro(BackfaceCulling,
int);
345 vtkGetMacro(FrontfaceCulling,
int);
363 vtkGetMacro(Shading,
int);
382 virtual void AddShaderVariable(
const char *
name,
int numVars,
int *x);
383 virtual void AddShaderVariable(
const char *name,
int numVars,
float *x);
384 virtual void AddShaderVariable(
const char *name,
int numVars,
double *x);
392 { this->AddShaderVariable(name, 1, &v); }
394 { this->AddShaderVariable(name, 1, &v); }
396 { this->AddShaderVariable(name, 1, &v); }
400 this->AddShaderVariable(name, 2, v);
404 float v[2] = {v1, v2};
405 this->AddShaderVariable(name, 2, v);
409 double v[2] = {v1, v2};
410 this->AddShaderVariable(name, 2, v);
414 int v[3] = {v1, v2, v3};
415 this->AddShaderVariable(name, 3, v);
419 float v[3] = {v1, v2, v3};
420 this->AddShaderVariable(name, 3, v);
424 double v[3] = {v1, v2, v3};
425 this->AddShaderVariable(name, 3, v);
436 void SetTexture(
const char* name,
vtkTexture* texture);
447 void SetTexture(
int unit,
vtkTexture* texture);
449 void RemoveTexture(
int unit);
456 void RemoveTexture(
const char* name);
461 void RemoveAllTextures();
466 int GetNumberOfTextures();
473 virtual void ReleaseGraphicsResources(
vtkWindow *win);
481 VTK_TEXTURE_UNIT_0 = 0,
498 static void ComputeCompositeColor(
double result[3],
499 double ambient,
const double ambient_color[3],
500 double diffuse,
const double diffuse_color[3],
501 double specular,
const double specular_color[3]);
504 double AmbientColor[3];
505 double DiffuseColor[3];
506 double SpecularColor[3];
508 double VertexColor[3];
531 vtkSetStringMacro(MaterialName);
537 int GetTextureUnitAtIndex(
int index);
538 int GetTextureUnit(
const char* name);
542 void operator=(const
vtkProperty&) VTK_DELETE_FUNCTION;
544 vtkPropertyInternals* Internals;
553 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 DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
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.
int LineStippleRepeatFactor
bool RenderPointsAsSpheres
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.