NAME
vtkProperty - represent surface properties of a geometric object
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkProperty.h"
class VTK_EXPORT vtkProperty : public vtkObject
vtkProperty();
static vtkProperty *New();
const char *GetClassName() {return "vtkProperty";};
void PrintSelf(ostream& os, vtkIndent indent);
vtkProperty &operator=(const vtkProperty& p);
virtual void Render(vtkActor *,vtkRenderer *) {};
virtual void BackfaceRender(vtkActor *,vtkRenderer *) {};
void SetInterpolation(int);
int GetInterpolation();
void SetInterpolationToFlat() {this->SetInterpolation(VTK_FLAT);};
void SetInterpolationToGouraud() {this->SetInterpolation(VTK_GOURAUD);};
void SetInterpolationToPhong() {this->SetInterpolation(VTK_PHONG);};
char *GetInterpolationAsString();
void SetRepresentation(int);
int GetRepresentation();
void SetRepresentationToPoints() {this->SetRepresentation(VTK_POINTS);};
void SetRepresentationToWireframe() {this->SetRepresentation(VTK_WIREFRAME);};
void SetRepresentationToSurface() {this->SetRepresentation(VTK_SURFACE);};
char *GetRepresentationAsString();
void SetColor(float r,float g,float b);
void SetColor(float a[3]) { this->SetColor(a[0], a[1], a[2]); };
float *GetColor();
void GetColor(float data[3]);
void SetAmbient(float);
float GetAmbient();
void SetDiffuse(float);
float GetDiffuse();
void SetSpecular(float);
float GetSpecular();
void SetSpecularPower(float);
float GetSpecularPower();
void SetOpacity(float);
float GetOpacity();
int GetEdgeVisibility();
void SetEdgeVisibility(int);
void EdgeVisibilityOn();
void EdgeVisibilityOff();
void SetAmbientColor(float, float, float);
void SetAmbientColor(float *);
float *GetAmbientColor();
void GetAmbientColor(float data[3]);
void SetDiffuseColor(float, float, float);
void SetDiffuseColor(float *);
float *GetDiffuseColor();
void GetDiffuseColor(float data[3]);
void SetSpecularColor(float, float, float);
void SetSpecularColor(float *);
float *GetSpecularColor();
void GetSpecularColor(float data[3]);
void SetEdgeColor(float, float, float);
void SetEdgeColor(float *);
float *GetEdgeColor();
void GetEdgeColor(float data[3]);
int GetBackfaceCulling();
void SetBackfaceCulling(int);
void BackfaceCullingOn();
void BackfaceCullingOff();
int GetFrontfaceCulling();
void SetFrontfaceCulling(int);
void FrontfaceCullingOn();
void FrontfaceCullingOff();
DESCRIPTION
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.
SEE ALSO
vtkActor vtkPropertyDevice
SUMMARY
virtual void Render(vtkActor *,vtkRenderer *) {};
This method causes the property to set up whatever is required for its instance variables. This is actually handled by a subclass of vtkProperty, which is created automatically. This method includes the invoking actor as an argument which can be used by property devices that require the actor.
virtual void BackfaceRender(vtkActor *,vtkRenderer *) {}; This method renders the property as a backface property. TwoSidedLighting must be turned off to see any backface properties. Note that only colors and opacity are used for backface properties. Other properties such as Representation, Culling are specified by the Property.
void SetInterpolation(int)
Set the shading interpolation method for an object.
void SetRepresentation(int)
Control the surface geometry representation for the object.
float *GetColor()
void GetColor(float data[3])
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.
void SetAmbient(float)
Set/Get the ambient lighting coefficient.
void SetDiffuse(float)
Set/Get the diffuse lighting coefficient.
void SetSpecular(float)
Set/Get the specular lighting coefficient.
void SetSpecularPower(float)
Set/Get the specular power.
void SetOpacity(float)
Set/Get the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent.
int GetEdgeVisibility()
Turn on/off the visibility of edges. On some renderers it is possible to render the edges of geometric primitives separately from the interior.
void SetAmbientColor(float, float, float)
void SetAmbientColor(float *)
Set/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.
void SetDiffuseColor(float, float, float)
void SetDiffuseColor(float *)
Set/Get the diffuse surface color.
void SetSpecularColor(float, float, float)
void SetSpecularColor(float *)
Set/Get the specular surface color.
void SetEdgeColor(float, float, float)
void SetEdgeColor(float *)
Set/Get the color of primitive edges (if edge visibility enabled).
int GetBackfaceCulling()
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.
int GetFrontfaceCulling()
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.
char *GetInterpolationAsString(void)
Return the method of shading as a descriptive character string.
char *GetRepresentationAsString(void)
Return the method of shading as a descriptive character string.
vtkProperty()
Construct object 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.
vtkProperty& operator=(const vtkProperty& p)
Assign one property to another.