146 #ifndef vtkProperty_h
147 #define vtkProperty_h
150 #include "vtkRenderingCoreModule.h"
156 #define VTK_GOURAUD 1
162 #define VTK_WIREFRAME 1
163 #define VTK_SURFACE 2
172 class vtkXMLMaterial;
174 class vtkPropertyInternals;
223 vtkGetMacro(Lighting,
bool);
224 vtkSetMacro(Lighting,
bool);
225 vtkBooleanMacro(Lighting,
bool);
235 vtkGetMacro(RenderPointsAsSpheres,
bool);
236 vtkSetMacro(RenderPointsAsSpheres,
bool);
237 vtkBooleanMacro(RenderPointsAsSpheres,
bool);
248 vtkGetMacro(RenderLinesAsTubes,
bool);
249 vtkSetMacro(RenderLinesAsTubes,
bool);
250 vtkBooleanMacro(RenderLinesAsTubes,
bool);
258 vtkGetMacro(Interpolation,
int);
263 const char* GetInterpolationAsString();
271 vtkGetMacro(Representation,
int);
275 const char* GetRepresentationAsString();
284 virtual void SetColor(
double r,
double g,
double b);
287 void GetColor(
double rgb[3]);
288 void GetColor(
double& r,
double& g,
double& b);
304 vtkGetMacro(BaseIOR,
double);
314 vtkSetClampMacro(Metallic,
double, 0.0, 1.0);
315 vtkGetMacro(Metallic,
double);
326 vtkSetClampMacro(Roughness,
double, 0.0, 1.0);
327 vtkGetMacro(Roughness,
double);
337 vtkSetClampMacro(Anisotropy,
double, 0.0, 1.0);
338 vtkGetMacro(Anisotropy,
double);
348 vtkSetClampMacro(AnisotropyRotation,
double, 0.0, 1.0);
349 vtkGetMacro(AnisotropyRotation,
double);
359 vtkGetMacro(CoatIOR,
double);
369 vtkSetClampMacro(CoatRoughness,
double, 0.0, 1.0);
370 vtkGetMacro(CoatRoughness,
double);
380 vtkSetClampMacro(CoatStrength,
double, 0.0, 1.0);
381 vtkGetMacro(CoatStrength,
double);
390 vtkSetVector3Macro(CoatColor,
double);
391 vtkGetVector3Macro(CoatColor,
double);
401 vtkSetClampMacro(CoatNormalScale,
double, 0.0, 1.0);
402 vtkGetMacro(CoatNormalScale,
double);
411 vtkSetMacro(NormalScale,
double);
412 vtkGetMacro(NormalScale,
double);
422 vtkSetClampMacro(OcclusionStrength,
double, 0.0, 1.0);
423 vtkGetMacro(OcclusionStrength,
double);
433 vtkSetVector3Macro(EmissiveFactor,
double);
434 vtkGetVector3Macro(EmissiveFactor,
double);
444 vtkSetVector3Macro(EdgeTint,
double);
445 vtkGetVector3Macro(EdgeTint,
double);
452 vtkSetClampMacro(Ambient,
double, 0.0, 1.0);
453 vtkGetMacro(Ambient,
double);
460 vtkSetClampMacro(Diffuse,
double, 0.0, 1.0);
461 vtkGetMacro(Diffuse,
double);
468 vtkSetClampMacro(Specular,
double, 0.0, 1.0);
469 vtkGetMacro(Specular,
double);
476 vtkSetClampMacro(SpecularPower,
double, 0.0, 128.0);
477 vtkGetMacro(SpecularPower,
double);
485 vtkSetClampMacro(Opacity,
double, 0.0, 1.0);
486 vtkGetMacro(Opacity,
double);
496 vtkSetVector3Macro(AmbientColor,
double);
497 vtkGetVector3Macro(AmbientColor,
double);
505 vtkSetVector3Macro(DiffuseColor,
double);
506 vtkGetVector3Macro(DiffuseColor,
double);
513 vtkSetVector3Macro(SpecularColor,
double);
514 vtkGetVector3Macro(SpecularColor,
double);
532 vtkSetVector3Macro(EdgeColor,
double);
533 vtkGetVector3Macro(EdgeColor,
double);
551 vtkSetVector3Macro(VertexColor,
double);
552 vtkGetVector3Macro(VertexColor,
double);
560 vtkSetVector4Macro(SelectionColor,
double);
561 vtkGetVector4Macro(SelectionColor,
double);
569 vtkSetMacro(SelectionLineWidth,
float);
570 vtkGetMacro(SelectionLineWidth,
float);
578 vtkSetMacro(SelectionPointSize,
float);
579 vtkGetMacro(SelectionPointSize,
float);
588 vtkGetMacro(LineWidth,
float);
597 vtkSetMacro(LineStipplePattern,
int);
598 vtkGetMacro(LineStipplePattern,
int);
608 vtkGetMacro(LineStippleRepeatFactor,
int);
617 vtkGetMacro(PointSize,
float);
646 vtkSetStringMacro(MaterialName);
647 vtkGetStringMacro(MaterialName);
669 virtual
void AddShaderVariable(const
char*
name,
int numVars,
int* x);
670 virtual
void AddShaderVariable(const
char*
name,
int numVars,
float* x);
671 virtual
void AddShaderVariable(const
char*
name,
int numVars,
double* x);
683 int v[2] = { v1, v2 };
684 this->AddShaderVariable(
name, 2, v);
688 float v[2] = { v1, v2 };
689 this->AddShaderVariable(
name, 2, v);
693 double v[2] = { v1, v2 };
694 this->AddShaderVariable(
name, 2, v);
698 int v[3] = { v1, v2, v3 };
699 this->AddShaderVariable(
name, 3, v);
703 float v[3] = { v1, v2, v3 };
704 this->AddShaderVariable(
name, 3, v);
708 double v[3] = { v1, v2, v3 };
709 this->AddShaderVariable(
name, 3, v);
718 vtkSetMacro(ShowTexturesOnBackface,
bool);
719 vtkGetMacro(ShowTexturesOnBackface,
bool);
720 vtkBooleanMacro(ShowTexturesOnBackface,
bool);
870 double diffuse,
const double diffuse_color[3],
double specular,
const double specular_color[3]);
873 double AmbientColor[3];
874 double DiffuseColor[3];
875 double SpecularColor[3];
877 double VertexColor[3];
878 double SelectionColor[4] = { 1.0, 0.0, 0.0, 1.0 };
893 double EmissiveFactor[3];
900 float SelectionPointSize = 2.f;
901 float SelectionLineWidth = 2.f;
949 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
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
double * GetColor()
Set the color of the object.
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
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.
static vtkProperty * New()
Construct object with object color, ambient color, diffuse color, specular color, and edge color whit...
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.
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.
vtkTexture * GetTexture(const char *name)
Set/Get the texture object to control rendering texture maps.
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.
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.
std::map< std::string, vtkTexture * > & GetAllTextures()
Returns all the textures in this property and their names.
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(...)