Skip to content

Property ​

Introduction ​

vtkProperty is an object that represents lighting and other surface properties of a geometric object. The primary properties that can be set are colors (overall, ambient, diffuse, specular, and edge color); specular power; opacity of the object; the representation of the object (points, wireframe, or surface); and the shading method to be used (flat, Gouraud, and Phong). Also, some special graphics features like backface properties can be set and manipulated with this object.

Methods ​

addShaderVariable ​

Not Implemented yet

computeCompositeColor ​

Not Implemented yet

extend ​

Method use to decorate a given object (publicAPI+model) with vtkProperty characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIPropertyInitialValuesNo(default: {})

getAmbient ​

Get the lighting coefficient.

getAmbientColor ​

Get the ambient surface color. Not all renderers support separate ambient and diffuse colors. From a physical standpoint it really doesn't make too much sense to have both. For the rendering libraries that don't support both, the diffuse color is used.

getAmbientColorByReference ​

Get the ambient surface color.

getAmbientOcclusionTexture ​

Get the ambient occlusion texture.

getBackfaceCulling ​

getBaseIOR ​

Get the index of refraction.

getColor ​

Get the color of the object.the color of the object

getDiffuse ​

Get the diffuse lighting coefficient.

getDiffuseColor ​

Get the diffuse surface color.

getDiffuseColorByReference ​

getDiffuseTexture ​

Get the diffuse texture.

getEdgeColor ​

getEdgeColorByReference ​

getEdgeOpacity ​

getEdgeVisibility ​

getEmission ​

Get the emission coefficient.

getEmissionTexture ​

Get the emission texture.

getFrontfaceCulling ​

Get the fast culling of polygons based on orientation of normal with respect to camera. If frontface culling is on, polygons facing towards camera are not drawn.

getInterpolation ​

Get the shading interpolation method for an object.

getInterpolationAsString ​

Map the interpolation integer to the corresponding ShadingModel.

getLighting ​

Get lighting flag for an object.

getLineWidth ​

Get the width of a Line. The width is expressed in screen units.

getMetallic ​

Get the metallic coefficient.

getMetallicTexture ​

Get the metallic texture.

getNormalStrength ​

Get the strength of the normal map.

getNormalTexture ​

Get the normal texture.

getORMTexture ​

Get the occlusion, roughness & metallic texture.

getOpacity ​

Get the opacity of the object. Set/Get the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent.

getPointSize ​

Get the diameter of a point. The size is expressed in screen units.

getRMTexture ​

Get the roughness & metallic texture.

getRepresentation ​

Get the surface geometry representation for the object.

getRepresentationAsString ​

Get the surface geometry representation for the object as string.

getRoughness ​

Get the roughness coefficient.

getRoughnessTexture ​

Get the roughness texture.

getSpecular ​

Get the specular lighting coefficient.

getSpecularColor ​

Get the specular surface color.

getSpecularColorByReference ​

Get the specular surface color.

getSpecularPower ​

Get the specular power.

newInstance ​

Method use to create a new instance of vtkProperty with object color, ambient color, diffuse color, specular color, and edge color white; ambient coefficient=0; diffuse coefficient=0; specular coefficient=0; specular power=1; Gouraud shading; and surface representation. Backface and frontface culling are off.

ArgumentTypeRequiredDescription
initialValuesIPropertyInitialValuesNofor pre-setting some of its content

setAmbient ​

Set the ambient lighting coefficient.

ArgumentTypeRequiredDescription
ambientNumberYesThe ambient lighting coefficient.

setAmbientColor ​

Set the ambient surface color. Not all renderers support separate ambient and diffuse colors. From a physical standpoint it really doesn't make too much sense to have both. For the rendering libraries that don’t support both, the diffuse color is used.

ArgumentTypeRequiredDescription
ambientColorRGBColorYesAn Array of the RGB color.

setAmbientColor ​

Set the ambient surface color. Not all renderers support separate ambient and diffuse colors. From a physical standpoint it really doesn't make too much sense to have both. For the rendering libraries that don’t support both, the diffuse color is used.

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1)
gNumberYesDefines the green component (between 0 and 1)
bNumberYesDefines the blue component (between 0 and 1)

setAmbientColorFrom ​

Set the ambient surface color from an RGB array

ArgumentTypeRequiredDescription
ambientColorRGBColorYesAn Array of the RGB color.

setAmbientOcclusionTexture ​

Set the ambient occlusion texture.

ArgumentTypeRequiredDescription
ambientOcclusionTexturevtkTextureYes

setBackfaceCulling ​

Turn on/off fast culling of polygons based on orientation of normal with respect to camera. If backface culling is on, polygons facing away from camera are not drawn.

ArgumentTypeRequiredDescription
backfaceCullingBooleanYes

setColor ​

Set the color of the object. Has the side effect of setting the ambient diffuse and specular colors as well. This is basically a quick overall color setting method.

ArgumentTypeRequiredDescription
colorRGBColorYesAn Array of the RGB color.

setColor ​

Set the color of the object. Has the side effect of setting the ambient diffuse and specular colors as well. This is basically a quick overall color setting method.

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1)
gNumberYesDefines the green component (between 0 and 1)
bNumberYesDefines the blue component (between 0 and 1)

setDiffuse ​

Set the diffuse lighting coefficient.

ArgumentTypeRequiredDescription
diffuseNumberYesThe diffuse lighting coefficient.

setDiffuseColor ​

Set the diffuse surface color.

ArgumentTypeRequiredDescription
diffuseColorRGBColorYesAn Array of the RGB color.

setDiffuseColor ​

Set the diffuse surface color.

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1)
gNumberYesDefines the green component (between 0 and 1)
bNumberYesDefines the blue component (between 0 and 1)

setDiffuseColorFrom ​

Set the diffuse surface color from an RGB array

ArgumentTypeRequiredDescription
diffuseColorRGBColorYesAn Array of the RGB color.

setDiffuseTexture ​

Set the diffuse texture.

ArgumentTypeRequiredDescription
diffuseTexturevtkTextureYes

setEdgeColor ​

Set the color of primitive edges (if edge visibility is enabled).

ArgumentTypeRequiredDescription
edgeColorRGBColorYesAn Array of the RGB color.

setEdgeColor ​

Set the color of primitive edges (if edge visibility is enabled).

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1)
gNumberYesDefines the green component (between 0 and 1)
bNumberYesDefines the blue component (between 0 and 1)

setEdgeColorFrom ​

Set the color of primitive edges from an RGB array.

ArgumentTypeRequiredDescription
edgeColorRGBColorYesAn Array of the RGB color.

setEdgeOpacity ​

Set the opacity of primitive edges. If not set explicitly, edge opacity follows the regular property opacity.

ArgumentTypeRequiredDescription
edgeOpacityNumberYesThe opacity of primitive edges.

setEdgeVisibility ​

Turn on/off the visibility of edges. On some renderers it is possible to render the edges of geometric primitives separately from the interior.

ArgumentTypeRequiredDescription
edgeVisibilityBooleanYes

setEmission ​

Set the ambient occlusion map strength.

ArgumentTypeRequiredDescription
emissionBooleanYes

setEmissionTexture ​

Set the emission texture.

ArgumentTypeRequiredDescription
emissionTexturevtkTextureYes

setFrontfaceCulling ​

Turn on/off fast culling of polygons based on orientation of normal with respect to camera. If frontface culling is on, polygons facing towards camera are not drawn.

ArgumentTypeRequiredDescription
frontfaceCullingBooleanYes

setInterpolation ​

Set the shading interpolation method for an object.

ArgumentTypeRequiredDescription
interpolationInterpolationYes

setInterpolationToFlat ​

Set interpolation to 0 means FLAT.

setInterpolationToGouraud ​

Set interpolation to 1 means GOURAUD.

setInterpolationToPhong ​

Set interpolation to 2 means PHONG.

setLighting ​

Set lighting flag for an object.

ArgumentTypeRequiredDescription
lightingBooleanYes

setLineWidth ​

Set the width of a Line. The width is expressed in screen units. !!! note This is only implemented for OpenGL.

ArgumentTypeRequiredDescription
lineWidthNumberYes

setMetallicTexture ​

Set the metallic texture.

ArgumentTypeRequiredDescription
metallicTexturevtkTextureYes

setNormalStrength ​

Set the normal map strength.

ArgumentTypeRequiredDescription
normalBooleanYes

setNormalTexture ​

Set the normal texture.

ArgumentTypeRequiredDescription
normalTexturevtkTextureYes

setORMTexture ​

Set the occlusion, roughness & metallic texture.

ArgumentTypeRequiredDescription
ORMTexturevtkTextureYes

setOpacity ​

Set the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent.

ArgumentTypeRequiredDescription
opacityNumberYesThe opacity of the object.

setPointSize ​

Set the diameter of a point. The size is expressed in screen units. !!! note This is only implemented for OpenGL.

ArgumentTypeRequiredDescription
pointSizeNumberYes

setRMTexture ​

Set the roughness & metallic texture.

ArgumentTypeRequiredDescription
RMTexturevtkTextureYes

setRepresentation ​

Control the surface geometry representation for the object.

ArgumentTypeRequiredDescription
representationRepresentationYes

setRepresentationToPoints ​

Set representation to 0 means POINT'

setRepresentationToSurface ​

Set representation to 2 means SURFAC'

setRepresentationToWireframe ​

Set representation to 1 means WIREFRAM'

setRoughnessTexture ​

Set the roughness texture.

ArgumentTypeRequiredDescription
roughnessTexturevtkTextureYes

setSpecular ​

Set the specular lighting coefficient.

ArgumentTypeRequiredDescription
specularBooleanYes

setSpecularColor ​

Set the specular surface color from an RGB array

ArgumentTypeRequiredDescription
specularColorRGBColorYesAn Array of the RGB color.

setSpecularColor ​

Set the specular surface color.

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1)
gNumberYesDefines the green component (between 0 and 1)
bNumberYesDefines the blue component (between 0 and 1)

setSpecularColorFrom ​

Set the specular surface color from an RGB array

ArgumentTypeRequiredDescription
specularColorRGBColorYesAn Array of the RGB color.

setSpecularPower ​

Set the specular power.

ArgumentTypeRequiredDescription
specularPowerNumberYes