1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FreeMat: vtkProperty</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">FreeMat
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('vtkrendering_vtkproperty.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">vtkProperty </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Section: <a class="el" href="sec_vtkrendering.html">Visualization Toolkit Rendering Classes</a> </p>
<h1><a class="anchor" id="Usage"></a>
Usage</h1>
<p>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.</p>
<p>To create an instance of class vtkProperty, simply invoke its constructor as follows </p>
<pre class="fragment"> obj = vtkProperty
</pre> <h1><a class="anchor" id="Methods"></a>
Methods</h1>
<p>The class vtkProperty has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, <code>obj</code> is an instance of the vtkProperty class. </p>
<ul>
<li>
<code>string = obj.GetClassName ()</code> </li>
<li>
<code>int = obj.IsA (string name)</code> </li>
<li>
<code>vtkProperty = obj.NewInstance ()</code> </li>
<li>
<code>vtkProperty = obj.SafeDownCast (vtkObject o)</code> </li>
<li>
<code>obj.DeepCopy (vtkProperty p)</code> - Assign one property to another. </li>
<li>
<code>obj.Render (vtkActor , vtkRenderer )</code> - 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. </li>
<li>
<code>obj.BackfaceRender (vtkActor , vtkRenderer )</code> - 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. </li>
<li>
<code>bool = obj.GetLighting ()</code> - Set/Get lighting flag for an object. Initial value is true. </li>
<li>
<code>obj.SetLighting (bool )</code> - Set/Get lighting flag for an object. Initial value is true. </li>
<li>
<code>obj.LightingOn ()</code> - Set/Get lighting flag for an object. Initial value is true. </li>
<li>
<code>obj.LightingOff ()</code> - Set/Get lighting flag for an object. Initial value is true. </li>
<li>
<code>obj.SetInterpolation (int )</code> - Set the shading interpolation method for an object. </li>
<li>
<code>int = obj.GetInterpolationMinValue ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>int = obj.GetInterpolationMaxValue ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>int = obj.GetInterpolation ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>obj.SetInterpolationToFlat ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>obj.SetInterpolationToGouraud ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>obj.SetInterpolationToPhong ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>string = obj.GetInterpolationAsString ()</code> - Set the shading interpolation method for an object. </li>
<li>
<code>obj.SetRepresentation (int )</code> - Control the surface geometry representation for the object. </li>
<li>
<code>int = obj.GetRepresentationMinValue ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>int = obj.GetRepresentationMaxValue ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>int = obj.GetRepresentation ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>obj.SetRepresentationToPoints ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>obj.SetRepresentationToWireframe ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>obj.SetRepresentationToSurface ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>string = obj.GetRepresentationAsString ()</code> - Control the surface geometry representation for the object. </li>
<li>
<code>obj.SetColor (double r, double g, double b)</code> - 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. </li>
<li>
<code>obj.SetColor (double a[3])</code> - 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. </li>
<li>
<code>double = obj.GetColor ()</code> - 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. </li>
<li>
<code>obj.GetColor (double rgb[3])</code> - 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. </li>
<li>
<code>obj.SetAmbient (double )</code> - Set/Get the ambient lighting coefficient. </li>
<li>
<code>double = obj.GetAmbientMinValue ()</code> - Set/Get the ambient lighting coefficient. </li>
<li>
<code>double = obj.GetAmbientMaxValue ()</code> - Set/Get the ambient lighting coefficient. </li>
<li>
<code>double = obj.GetAmbient ()</code> - Set/Get the ambient lighting coefficient. </li>
<li>
<code>obj.SetDiffuse (double )</code> - Set/Get the diffuse lighting coefficient. </li>
<li>
<code>double = obj.GetDiffuseMinValue ()</code> - Set/Get the diffuse lighting coefficient. </li>
<li>
<code>double = obj.GetDiffuseMaxValue ()</code> - Set/Get the diffuse lighting coefficient. </li>
<li>
<code>double = obj.GetDiffuse ()</code> - Set/Get the diffuse lighting coefficient. </li>
<li>
<code>obj.SetSpecular (double )</code> - Set/Get the specular lighting coefficient. </li>
<li>
<code>double = obj.GetSpecularMinValue ()</code> - Set/Get the specular lighting coefficient. </li>
<li>
<code>double = obj.GetSpecularMaxValue ()</code> - Set/Get the specular lighting coefficient. </li>
<li>
<code>double = obj.GetSpecular ()</code> - Set/Get the specular lighting coefficient. </li>
<li>
<code>obj.SetSpecularPower (double )</code> - Set/Get the specular power. </li>
<li>
<code>double = obj.GetSpecularPowerMinValue ()</code> - Set/Get the specular power. </li>
<li>
<code>double = obj.GetSpecularPowerMaxValue ()</code> - Set/Get the specular power. </li>
<li>
<code>double = obj.GetSpecularPower ()</code> - Set/Get the specular power. </li>
<li>
<code>obj.SetOpacity (double )</code> - Set/Get the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent. </li>
<li>
<code>double = obj.GetOpacityMinValue ()</code> - Set/Get the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent. </li>
<li>
<code>double = obj.GetOpacityMaxValue ()</code> - Set/Get the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent. </li>
<li>
<code>double = obj.GetOpacity ()</code> - Set/Get the object's opacity. 1.0 is totally opaque and 0.0 is completely transparent. </li>
<li>
<code>obj.SetAmbientColor (double , double , double )</code> - 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. </li>
<li>
<code>obj.SetAmbientColor (double a[3])</code> - 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. </li>
<li>
<code>double = obj. GetAmbientColor ()</code> - 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. </li>
<li>
<code>obj.SetDiffuseColor (double , double , double )</code> - Set/Get the diffuse surface color. </li>
<li>
<code>obj.SetDiffuseColor (double a[3])</code> - Set/Get the diffuse surface color. </li>
<li>
<code>double = obj. GetDiffuseColor ()</code> - Set/Get the diffuse surface color. </li>
<li>
<code>obj.SetSpecularColor (double , double , double )</code> - Set/Get the specular surface color. </li>
<li>
<code>obj.SetSpecularColor (double a[3])</code> - Set/Get the specular surface color. </li>
<li>
<code>double = obj. GetSpecularColor ()</code> - Set/Get the specular surface color. </li>
<li>
<code>int = obj.GetEdgeVisibility ()</code> - Turn on/off the visibility of edges. On some renderers it is possible to render the edges of geometric primitives separately from the interior. </li>
<li>
<code>obj.SetEdgeVisibility (int )</code> - Turn on/off the visibility of edges. On some renderers it is possible to render the edges of geometric primitives separately from the interior. </li>
<li>
<code>obj.EdgeVisibilityOn ()</code> - Turn on/off the visibility of edges. On some renderers it is possible to render the edges of geometric primitives separately from the interior. </li>
<li>
<code>obj.EdgeVisibilityOff ()</code> - Turn on/off the visibility of edges. On some renderers it is possible to render the edges of geometric primitives separately from the interior. </li>
<li>
<code>obj.SetEdgeColor (double , double , double )</code> - Set/Get the color of primitive edges (if edge visibility is enabled). </li>
<li>
<code>obj.SetEdgeColor (double a[3])</code> - Set/Get the color of primitive edges (if edge visibility is enabled). </li>
<li>
<code>double = obj. GetEdgeColor ()</code> - Set/Get the color of primitive edges (if edge visibility is enabled). </li>
<li>
<code>obj.SetLineWidth (float )</code> - Set/Get the width of a Line. The width is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>float = obj.GetLineWidthMinValue ()</code> - Set/Get the width of a Line. The width is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>float = obj.GetLineWidthMaxValue ()</code> - Set/Get the width of a Line. The width is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>float = obj.GetLineWidth ()</code> - Set/Get the width of a Line. The width is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>obj.SetLineStipplePattern (int )</code> - Set/Get the stippling pattern of a Line, as a 16-bit binary pattern (1 = pixel on, 0 = pixel off). This is only implemented for OpenGL. The default is 0xFFFF. </li>
<li>
<code>int = obj.GetLineStipplePattern ()</code> - Set/Get the stippling pattern of a Line, as a 16-bit binary pattern (1 = pixel on, 0 = pixel off). This is only implemented for OpenGL. The default is 0xFFFF. </li>
<li>
<code>obj.SetLineStippleRepeatFactor (int )</code> - Set/Get the stippling repeat factor of a Line, which specifies how many times each bit in the pattern is to be repeated. This is only implemented for OpenGL. The default is 1. </li>
<li>
<code>int = obj.GetLineStippleRepeatFactorMinValue ()</code> - Set/Get the stippling repeat factor of a Line, which specifies how many times each bit in the pattern is to be repeated. This is only implemented for OpenGL. The default is 1. </li>
<li>
<code>int = obj.GetLineStippleRepeatFactorMaxValue ()</code> - Set/Get the stippling repeat factor of a Line, which specifies how many times each bit in the pattern is to be repeated. This is only implemented for OpenGL. The default is 1. </li>
<li>
<code>int = obj.GetLineStippleRepeatFactor ()</code> - Set/Get the stippling repeat factor of a Line, which specifies how many times each bit in the pattern is to be repeated. This is only implemented for OpenGL. The default is 1. </li>
<li>
<code>obj.SetPointSize (float )</code> - Set/Get the diameter of a point. The size is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>float = obj.GetPointSizeMinValue ()</code> - Set/Get the diameter of a point. The size is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>float = obj.GetPointSizeMaxValue ()</code> - Set/Get the diameter of a point. The size is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>float = obj.GetPointSize ()</code> - Set/Get the diameter of a point. The size is expressed in screen units. This is only implemented for OpenGL. The default is 1.0. </li>
<li>
<code>int = obj.GetBackfaceCulling ()</code> - 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. </li>
<li>
<code>obj.SetBackfaceCulling (int )</code> - 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. </li>
<li>
<code>obj.BackfaceCullingOn ()</code> - 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. </li>
<li>
<code>obj.BackfaceCullingOff ()</code> - 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. </li>
<li>
<code>int = obj.GetFrontfaceCulling ()</code> - 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. </li>
<li>
<code>obj.SetFrontfaceCulling (int )</code> - 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. </li>
<li>
<code>obj.FrontfaceCullingOn ()</code> - 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. </li>
<li>
<code>obj.FrontfaceCullingOff ()</code> - 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. </li>
<li>
<code>vtkXMLMaterial = obj.GetMaterial ()</code> - Get the material representation used for shading. The material will be used only when shading is enabled. </li>
<li>
<code>string = obj.GetMaterialName ()</code> - Returns the name of the material currenly loaded, if any. </li>
<li>
<code>obj.LoadMaterial (string name)</code> - Load the material. The material can be the name of a built-on material or the filename for a VTK material XML description. </li>
<li>
<code>obj.LoadMaterialFromString (string materialxml)</code> - Load the material given the contents of the material file. </li>
<li>
<code>obj.LoadMaterial (vtkXMLMaterial )</code> - Load the material given the material representation. </li>
<li>
<code>obj.SetShading (int )</code> - Enable/Disable shading. When shading is enabled, the Material must be set. </li>
<li>
<code>int = obj.GetShading ()</code> - Enable/Disable shading. When shading is enabled, the Material must be set. </li>
<li>
<code>obj.ShadingOn ()</code> - Enable/Disable shading. When shading is enabled, the Material must be set. </li>
<li>
<code>obj.ShadingOff ()</code> - Enable/Disable shading. When shading is enabled, the Material must be set. </li>
<li>
<code>vtkShaderProgram = obj.GetShaderProgram ()</code> - Get the Shader program. If Material is not set/or not loaded properly, this will return null. </li>
<li>
<code>obj.AddShaderVariable (string name, int numVars, int x)</code> - Provide values to initialize shader variables. Useful to initialize shader variables that change over time (animation, GUI widgets inputs, etc. )<ul>
<li><code>name</code> - hardware name of the uniform variable</li>
<li><code>numVars</code> - number of variables being set</li>
<li><code>x</code> - values </li>
</ul>
</li>
<li>
<code>obj.AddShaderVariable (string name, int numVars, float x)</code> - Provide values to initialize shader variables. Useful to initialize shader variables that change over time (animation, GUI widgets inputs, etc. )<ul>
<li><code>name</code> - hardware name of the uniform variable</li>
<li><code>numVars</code> - number of variables being set</li>
<li><code>x</code> - values </li>
</ul>
</li>
<li>
<code>obj.AddShaderVariable (string name, int numVars, double x)</code> - Provide values to initialize shader variables. Useful to initialize shader variables that change over time (animation, GUI widgets inputs, etc. )<ul>
<li><code>name</code> - hardware name of the uniform variable</li>
<li><code>numVars</code> - number of variables being set</li>
<li><code>x</code> - values </li>
</ul>
</li>
<li>
<code>obj.AddShaderVariable (string name, int v)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, float v)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, double v)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, int v1, int v2)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, float v1, float v2)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, double v1, double v2)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, int v1, int v2, int v3)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, float v1, float v2, float v3)</code> - Methods to provide to add shader variables from tcl. </li>
<li>
<code>obj.AddShaderVariable (string name, double v1, double v2, double v3)</code> - Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. A property does not need to have an associated texture map and multiple properties can share one texture. Textures must be assigned unique names. </li>
<li>
<code>obj.SetTexture (string name, vtkTexture texture)</code> - Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. A property does not need to have an associated texture map and multiple properties can share one texture. Textures must be assigned unique names. </li>
<li>
<code>vtkTexture = obj.GetTexture (string name)</code> - Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. A property does not need to have an associated texture map and multiple properties can share one texture. Textures must be assigned unique names. </li>
<li>
<code>obj.SetTexture (int unit, vtkTexture texture)</code> - Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. A property does not need to have an associated texture map and multiple properties can share one texture. Textures must be assigned unique names. </li>
<li>
<code>vtkTexture = obj.GetTexture (int unit)</code> - Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. A property does not need to have an associated texture map and multiple properties can share one texture. Textures must be assigned unique names. </li>
<li>
<code>obj.RemoveTexture (int unit)</code> - Set/Get the texture object to control rendering texture maps. This will be a vtkTexture object. A property does not need to have an associated texture map and multiple properties can share one texture. Textures must be assigned unique names. </li>
<li>
<code>obj.RemoveTexture (string name)</code> - Remove a texture from the collection. Note that the indices of all the subsquent textures, if any, will change. </li>
<li>
<code>obj.RemoveAllTextures ()</code> - Remove all the textures. </li>
<li>
<code>int = obj.GetNumberOfTextures ()</code> - Returns the number of textures in this property. </li>
<li>
<code>obj.ReleaseGraphicsResources (vtkWindow win)</code> - Release any graphics resources that are being consumed by this property. The parameter window could be used to determine which graphic resources to release. </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">FreeMat Documentation</a></li><li class="navelem"><a class="el" href="sec_vtkrendering.html">Visualization Toolkit Rendering Classes</a></li>
<li class="footer">Generated on Thu Jul 25 2013 17:18:35 for FreeMat by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1.1 </li>
</ul>
</div>
</body>
</html>
|