Methods Introduced:
The methods
wfcSelect.WSelection.GetVisibleAppearance and
wfcSelect.WSelection.SetVisibleAppearance enable you to retrieve and set the appearance properties for the specified model using an object of the class
WSelection.AppearanceProperties.
Note
To set the default surface appearance properties, pass the value NULL to the Appearance parameter of the wfcModel.WModel.SetVisibleAppearance method.
The class
wfcDisplay.Appearance is an interface to the appearance properties and contains the methods described below.
Use the method
wfcDisplay.wfcDisplay.Appearance_Create to create an instance of the
wfcDisplay.Appearance object.
|
• |
Ambient—Specifies the indirect, scattered light the model receives from its surroundings. The valid range is from 0.0 to 1.0. |
|
• |
Description—Specifies the model description. |
|
• |
Diffuse—Specifies the reflected light that comes from directional, point, or spot lights. The valid range is from 0.0 to 1.0. |
|
• |
Highlight—Specifies the intensity of the light reflected from a highlighted surface area. The valid range is from 0.0 to 1.0. |
|
• |
HighlightColor—Specifies the highlight color, in terms of red, green, and blue. The valid range is from 0.0 to 1.0. |
|
• |
Keywords—Specifies the keywords in the specified model. |
|
• |
Label—Specifies the labels in the model. |
|
• |
Name— Specifies the name of the model. |
|
• |
RGBColor— Specifies the color, in the RGB format. The valid range is from 0.0. to 1.0. |
|
• |
Reflection—Specifies how reflective the surface is. The valid range is from 0, that is dull to 100, that is shiny. |
|
• |
Shininess—Specifies the properties of a highlighted surface area. A plastic model would have a lower shininess value, while a metallic
model would have a higher value. The valid range is from from 0.0. to 1.0. |
|
• |
Transparency— Specifies the transparency value, which is between 0 that is completely opaque to 1.0 that is completely transparent. |
Use the methods wfcDisplay.Appearance.GetAmbient and wfcDisplay.Appearance.SetAmbient to get and set the ambience value.
Use the methods wfcDisplay.Appearance.GetDescription and wfcDisplay.Appearance.SetDescription to get and set the description for the specified model.
Use the methods wfcDisplay.Appearance.GetDiffuse and wfcDisplay.Appearance.SetDiffuse to get and set the value for the diffused light.
Use the methods wfcDisplay.Appearance.GetHighlight and wfcDisplay.Appearance.SetHighlight to get and set the intensity of the highlighted light.
Use the methods wfcDisplay.Appearance.GetHighlightColor and wfcDisplay.Appearance.SetHighlightColor to get and set the highlight color.
Use the methods wfcDisplay.Appearance.GetKeywords and wfcDisplay.Appearance.SetKeywords to get and set the keywords.
Use the methods wfcDisplay.Appearance.GetLabel and wfcDisplay.Appearance.SetLabel to get and set labels in the specified model.
Use the methods wfcDisplay.Appearance.GetName and wfcDisplay.Appearance.SetName to get and set the model name for the specified model.
Use the methods wfcDisplay.Appearance.GetRGBColor and wfcDisplay.Appearance.SetRGBColor to get and set the RGBColor.
Use the methods wfcDisplay.Appearance.GetReflection and wfcDisplay.Appearance.SetReflection to get and set the reflectivity of the surface.
Use the methods wfcDisplay.Appearance.GetShininess and wfcDisplay.Appearance.SetShininess to get and set the properties of a highlighted surface area.
Use the methods wfcDisplay.Appearance.GetTransparency and wfcDisplay.Appearance.SetTransparency to get and set the transparency value.
Use the methods wfcSelect.WSelection.GetVisibleTextures and wfcSelect.WSelection.SetVisibleTextures to get and set the properties related to the surface texture respectively using an object of the class WSelection. The class wfcDisplay.Texture is an interface to the texture property and contains the methods described below.
Use the method
wfcDisplay.wfcDisplay.Texture_Create to create an instance of the
wfcDisplay.wfcDisplay.Texture object. The parameters of this method are given below:
|
• |
Type—Specifies the type of the texture. |
|
• |
FilePath—Specifies the full path to the texture. |
|
• |
Placement—Specifies the properties related to the placement of surface texture. |
Use the methods
wfcDisplay.Texture.GetType and
wfcDisplay.Texture.SetType to get and set the type of the texture using the enumerated type
wfcDisplay.TextureType.The valid values of the enumerated type
wfcTextureType are as follows:
|
• |
NULL_TEXTURE—Specifies that no texture map is assigned. |
|
• |
BUMP_TEXTURE—Specifies the single-channel texture maps that represent height fields. This texture results in shaded surface and has a
wrinkled or irregular appearance. |
|
• |
COLOR_TEXTURE—Specifies the surface color such as woodgrain, geometric patterns, and pictures applied to the texture. |
|
• |
DECAL_TEXTURE—Specifies the specialized texture maps such as company logos or text that are applied to a surface. A decal is a texture
with an alpha or transparency mask. |
Use the methods wfcDisplay.Texture.GetFilePath and wfcDisplay.Texture.SetFilePath to get and set the full path to the texture map.
Use the methods wfcDisplay.Texture.GetPlacement and wfcDisplay.Texture.SetPlacement to get and set the sequence of placements properties using an object of the class wfcDisplay.TexturePlacement. The parameters of the class wfcDisplay.TexturePlacement are as follows:
Use the method wfcDisplay.wfcDisplay.TexturePlacement_Create to create an instance of the object wfcDisplay.TexturePlacement. The parameters of this method are as follows:
|
• |
TextureProjectionType—Specifies the projection type of the texture on the selected surface or surfaces. |
|
• |
LineEnvelope—Specifies the coordinate system that defines the direction for the planar projection, or the center for the other projection
types. |
|
• |
HorizontalOffset—Specifies the percentage of horizontal shift of the texture map on the surface. |
|
• |
VerticalOffset—Specifies the percentage of vertical shift of the texture map on the surface. |
|
• |
Rotate—Specifies the angle to rotate the texture map on the surface. |
|
• |
HorizontalScale—Specifies the horizontal scaling of the texture map. |
|
• |
VerticalScale—Specifies the vertical scaling of the texture map. |
|
• |
BumpHeight—Specifies the height of the bump on the surface of the texture map. |
|
• |
DecalIntensity—Specifies the alpha or transparency mask intensity on the surface. |
|
• |
HorizontalFlip—Specifies that the texture map on the surface should be flipped horizontally. |
|
• |
VerticalFlip—Specifies that the texture map on the surface should be flipped vertically. |
Use the methods wfcDisplay.TexturePlacement.GetTextureProjectionType and wfcDisplay.TexturePlacement.SetTextureProjectionType to get and set the texture projection type using the enumerated type wfcDisplay.TextureProjectionType.
Use the methods wfcDisplay.TexturePlacement.GetTextureType and wfcDisplay.TexturePlacement.SetTextureType to get and set the type of texture using the enumerated type wfcTextureType
Use the methods wfcDisplay.TexturePlacement.GetHorizontalOffset and wfcDisplay.TexturePlacement.SetHorizontalOffset to get and set the horizontal offset.
Use the methods wfcDisplay.TexturePlacement.GetVerticalOffset and wfcDisplay.TexturePlacement.SetVerticalOffset to get and set the vertical offset.
Use the methods wfcDisplay.TexturePlacement.GetRotate and wfcDisplay.TexturePlacement.SetRotate to get and set the rotating angle.
Use the methods wfcDisplay.TexturePlacement.GetHorizontalScale and wfcDisplay.TexturePlacement.SetHorizontalScale to get and set the horizontal scale.
Use the methods wfcDisplay.TexturePlacement.GetVerticalScale and wfcDisplay.TexturePlacement.SetVerticalScale to get and set the vertical scale.
Use the methods wfcDisplay.TexturePlacement.GetBumpHeight and wfcDisplay.TexturePlacement.SetBumpHeight to get and set the height of the bump.
Use the methods wfcDisplay.TexturePlacement.GetDecalIntensity and wfcDisplay.TexturePlacement.SetDecalIntensity to get and set the decal intensity.
Use the methods wfcDisplay.TexturePlacement.GetHorizontalFlip and wfcDisplay.TexturePlacement.SetHorizontalFlip to get and set the horizontal flip.
Use the methods wfcDisplay.TexturePlacement.GetVerticalFlip and wfcDisplay.TexturePlacement.SetVerticalFlip to get and set the vertical flip.
The method wfcSession.WSession.IsTextureFileEmbedded checks if the specified texture, decal, or bump map file is embedded in the model.
The method wfcSession.WSession.IsTextureFileEmbedded returns the full path of the specified texture, decal, or bump map file and loads the file from the path. If you specify
the input argument CreateTempFile as true, the method creates a temporary copy of the texture file.