50#include "vtkRenderingCoreModule.h"
62#define VTK_WIREFRAME 1
74class vtkPropertyInternals;
123 vtkGetMacro(Lighting,
bool);
124 vtkSetMacro(Lighting,
bool);
125 vtkBooleanMacro(Lighting,
bool);
135 vtkGetMacro(RenderPointsAsSpheres,
bool);
136 vtkSetMacro(RenderPointsAsSpheres,
bool);
137 vtkBooleanMacro(RenderPointsAsSpheres,
bool);
148 vtkGetMacro(RenderLinesAsTubes,
bool);
149 vtkSetMacro(RenderLinesAsTubes,
bool);
150 vtkBooleanMacro(RenderLinesAsTubes,
bool);
158 vtkGetMacro(Interpolation,
int);
163 const char* GetInterpolationAsString();
171 vtkGetMacro(Representation,
int);
175 const char* GetRepresentationAsString();
184 virtual void SetColor(
double r,
double g,
double b);
187 void GetColor(
double rgb[3]);
188 void GetColor(
double& r,
double& g,
double& b);
204 vtkGetMacro(BaseIOR,
double);
214 vtkSetClampMacro(Metallic,
double, 0.0, 1.0);
215 vtkGetMacro(Metallic,
double);
226 vtkSetClampMacro(Roughness,
double, 0.0, 1.0);
227 vtkGetMacro(Roughness,
double);
237 vtkSetClampMacro(Anisotropy,
double, 0.0, 1.0);
238 vtkGetMacro(Anisotropy,
double);
248 vtkSetClampMacro(AnisotropyRotation,
double, 0.0, 1.0);
249 vtkGetMacro(AnisotropyRotation,
double);
259 vtkGetMacro(CoatIOR,
double);
269 vtkSetClampMacro(CoatRoughness,
double, 0.0, 1.0);
270 vtkGetMacro(CoatRoughness,
double);
280 vtkSetClampMacro(CoatStrength,
double, 0.0, 1.0);
281 vtkGetMacro(CoatStrength,
double);
290 vtkSetVector3Macro(CoatColor,
double);
291 vtkGetVector3Macro(CoatColor,
double);
301 vtkSetClampMacro(CoatNormalScale,
double, 0.0, 1.0);
302 vtkGetMacro(CoatNormalScale,
double);
311 vtkSetMacro(NormalScale,
double);
312 vtkGetMacro(NormalScale,
double);
322 vtkSetClampMacro(OcclusionStrength,
double, 0.0, 1.0);
323 vtkGetMacro(OcclusionStrength,
double);
333 vtkSetVector3Macro(EmissiveFactor,
double);
334 vtkGetVector3Macro(EmissiveFactor,
double);
344 vtkSetVector3Macro(EdgeTint,
double);
345 vtkGetVector3Macro(EdgeTint,
double);
352 vtkSetClampMacro(Ambient,
double, 0.0, 1.0);
353 vtkGetMacro(Ambient,
double);
360 vtkSetClampMacro(Diffuse,
double, 0.0, 1.0);
361 vtkGetMacro(Diffuse,
double);
368 vtkSetClampMacro(Specular,
double, 0.0, 1.0);
369 vtkGetMacro(Specular,
double);
376 vtkSetClampMacro(SpecularPower,
double, 0.0, 128.0);
377 vtkGetMacro(SpecularPower,
double);
385 vtkSetClampMacro(Opacity,
double, 0.0, 1.0);
386 vtkGetMacro(Opacity,
double);
396 vtkSetVector3Macro(AmbientColor,
double);
397 vtkGetVector3Macro(AmbientColor,
double);
405 vtkSetVector3Macro(DiffuseColor,
double);
406 vtkGetVector3Macro(DiffuseColor,
double);
413 vtkSetVector3Macro(SpecularColor,
double);
414 vtkGetVector3Macro(SpecularColor,
double);
432 vtkSetVector3Macro(EdgeColor,
double);
433 vtkGetVector3Macro(EdgeColor,
double);
451 vtkSetVector3Macro(VertexColor,
double);
452 vtkGetVector3Macro(VertexColor,
double);
460 vtkSetVector4Macro(SelectionColor,
double);
461 vtkGetVector4Macro(SelectionColor,
double);
469 vtkSetMacro(SelectionLineWidth,
float);
470 vtkGetMacro(SelectionLineWidth,
float);
478 vtkSetMacro(SelectionPointSize,
float);
479 vtkGetMacro(SelectionPointSize,
float);
488 vtkGetMacro(LineWidth,
float);
497 vtkSetMacro(LineStipplePattern,
int);
498 vtkGetMacro(LineStipplePattern,
int);
508 vtkGetMacro(LineStippleRepeatFactor,
int);
517 vtkGetMacro(PointSize,
float);
546 vtkSetStringMacro(MaterialName);
547 vtkGetStringMacro(MaterialName);
569 virtual
void AddShaderVariable(const
char* name,
int numVars,
int* x);
570 virtual
void AddShaderVariable(const
char* name,
int numVars,
float* x);
571 virtual
void AddShaderVariable(const
char* name,
int numVars,
double* x);
583 int v[2] = { v1, v2 };
584 this->AddShaderVariable(name, 2, v);
588 float v[2] = { v1, v2 };
589 this->AddShaderVariable(name, 2, v);
593 double v[2] = { v1, v2 };
594 this->AddShaderVariable(name, 2, v);
598 int v[3] = { v1, v2, v3 };
599 this->AddShaderVariable(name, 3, v);
603 float v[3] = { v1, v2, v3 };
604 this->AddShaderVariable(name, 3, v);
608 double v[3] = { v1, v2, v3 };
609 this->AddShaderVariable(name, 3, v);
618 vtkSetMacro(ShowTexturesOnBackface,
bool);
619 vtkGetMacro(ShowTexturesOnBackface,
bool);
620 vtkBooleanMacro(ShowTexturesOnBackface,
bool);
770 double diffuse,
const double diffuse_color[3],
double specular,
const double specular_color[3]);
773 double AmbientColor[3];
774 double DiffuseColor[3];
775 double SpecularColor[3];
777 double VertexColor[3];
778 double SelectionColor[4] = { 1.0, 0.0, 0.0, 1.0 };
793 double EmissiveFactor[3];
800 float SelectionPointSize = 2.f;
801 float SelectionLineWidth = 2.f;
849 return "Physically based rendering";
represents an object (geometry & properties) in a rendered scene
a simple class to control print indentation
abstract base class for most VTK objects
represent surface properties of a geometric object
static vtkProperty * New()
Construct object with object color, ambient color, diffuse color, specular color, and edge color whit...
double ComputeReflectanceOfBaseLayer()
For PBR, calculate the reflectance of the base layer depending on the presence of a coat layer.
std::map< std::string, vtkTexture * > MapOfTextures
void SetRepresentationToPoints()
Control the surface geometry representation for the object.
void SetTexture(const char *name, vtkTexture *texture)
Set/Get the texture object to control rendering texture maps.
void SetRepresentationToWireframe()
Control the surface geometry representation for the object.
virtual void SetInformation(vtkInformation *)
Set/Get the information object associated with the Property.
int LineStippleRepeatFactor
double AnisotropyRotation
double * GetColor()
Set the color of the object.
static void ComputeCompositeColor(double result[3], double ambient, const double ambient_color[3], double diffuse, const double diffuse_color[3], double specular, const double specular_color[3])
Computes composite color.
virtual void SetColor(double a[3])
Set the color of the object.
void AddShaderVariable(const char *name, double v1, double v2)
Methods to provide to add shader variables from wrappers.
virtual void BackfaceRender(vtkActor *, vtkRenderer *)
This method renders the property as a backface property.
void SetNormalTexture(vtkTexture *texture)
Set the normal texture.
int GetNumberOfTextures()
Returns the number of textures in this property.
void SetEmissiveTexture(vtkTexture *texture)
Set the emissive texture.
void SetInterpolationToFlat()
Set the shading interpolation method for an object.
void RemoveAllTextures()
Remove all the textures.
void SetBaseColorTexture(vtkTexture *texture)
Set the base color texture.
void SetCoatNormalTexture(vtkTexture *texture)
Set the coat normal texture.
void SetInterpolationToGouraud()
Set the shading interpolation method for an object.
vtkTypeBool BackfaceCulling
void DeepCopy(vtkProperty *p)
Assign one property to another.
vtkTexture * GetTexture(const char *name)
Set/Get the texture object to control rendering texture maps.
void AddShaderVariable(const char *name, double v)
Methods to provide to add shader variables from wrappers.
void SetInterpolationToPBR()
Set the shading interpolation method for an object.
virtual void Render(vtkActor *, vtkRenderer *)
This method causes the property to set up whatever is required for its instance variables.
const char * GetInterpolationAsString()
Return the method of shading as a descriptive character string.
void SetRepresentationToSurface()
Control the surface geometry representation for the object.
void SetInterpolationToPhong()
Set the shading interpolation method for an object.
void AddShaderVariable(const char *name, double v1, double v2, double v3)
Methods to provide to add shader variables from wrappers.
bool RenderPointsAsSpheres
void SetORMTexture(vtkTexture *texture)
Set the ORM texture.
void AddShaderVariable(const char *name, int v1, int v2, int v3)
Methods to provide to add shader variables from wrappers.
virtual void SetColor(double r, double g, double b)
Set the color of the object.
vtkInformation * Information
static double ComputeReflectanceFromIOR(double IORTo, double IORFrom)
For PBR, calculate the reflectance from the refractive index of ingoing and outgoing interfaces.
void AddShaderVariable(const char *name, float v1, float v2, float v3)
Methods to provide to add shader variables from wrappers.
virtual void ReleaseGraphicsResources(vtkWindow *win)
Release any graphics resources that are being consumed by this property.
vtkTypeBool EdgeVisibility
vtkTypeBool VertexVisibility
void AddShaderVariable(const char *name, int v)
Methods to provide to add shader variables from wrappers.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetAnisotropyTexture(vtkTexture *texture)
Set the anisotropy texture.
vtkTypeBool FrontfaceCulling
void RemoveTexture(const char *name)
Remove a texture from the collection.
void AddShaderVariable(const char *name, float v1, float v2)
Methods to provide to add shader variables from wrappers.
bool ShowTexturesOnBackface
static double ComputeIORFromReflectance(double reflectance, double ior)
For PBR, calculate the refractive index from the reflectance of the interface and the refractive inde...
virtual void PostRender(vtkActor *, vtkRenderer *)
This method is called after the actor has been rendered.
void AddShaderVariable(const char *name, int v1, int v2)
Methods to provide to add shader variables from wrappers.
std::map< std::string, vtkTexture * > & GetAllTextures()
Returns all the textures in this property and their names.
const char * GetRepresentationAsString()
Return the method of shading as a descriptive character string.
void AddShaderVariable(const char *name, float v)
Methods to provide to add shader variables from wrappers.
abstract specification for renderers
The ShaderProgram uses one or more Shader objects.
handles properties associated with a texture map
window superclass for vtkRenderWindow
Represents an XML element and those nested inside.
#define VTK_SIZEHINT(...)