Methods Introduced:
The methods
wfcWSelection::GetVisibleAppearance and
wfcWSelection::SetVisibleAppearance enable you to retrieve and set the appearance properties for the specified model using an object of the class
wfcAppearance.
Note
To set the default surface appearance properties, pass the value NULL to the AppearanceProps parameter of the wfcWSelection::SetVisibleAppearance method.
The class
wfcAppearance is an interface to the appearance properties and contains the methods described below.
Use the method
wfcAppearance::Create to create an instance of the
wfcAppearance 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 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 wfcAppearance::GetAmbient and wfcAppearance::SetAmbient to get and set the ambience value.
Use the methods wfcAppearance::GetDescription and wfcAppearance::SetDescription to get and set the description for the specified model.
Use the methods wfcAppearance::GetDiffuse and wfcAppearance::SetDiffuse to get and set the value for the diffused light.
Use the methods wfcAppearance::GetHighlight and wfcAppearance::SetHighlight to get and set the intensity of the highlighted light.
Use the methods wfcAppearance::GetHighlightColor and wfcAppearance::SetHighlightColor to get and set the highlight color.
Use the methods wfcAppearance::GetKeywords and wfcAppearance::SetKeywords to get and set the keywords.
Use the methods wfcAppearance::GetLabel and wfcAppearance::SetLabel to get and set labels in the specified model.
Use the methods wfcAppearance::GetName and wfcAppearance::SetName to get and set the model name for the specified model.
Use the methods wfcAppearance::GetRGBColor and wfcAppearance::SetRGBColor to get and set the RGBColor.
Use the methods wfcAppearance::GetReflection and wfcAppearance::SetReflection to get and set the reflectivity of the surface.
Use the methods wfcAppearance::GetShininess and wfcAppearance::SetShininess to get and set the properties of a highlighted surface area.
Use the methods wfcAppearance::GetTransparency and wfcAppearance::SetTransparency to get and set the transparency value.
Use the methods wfcWSelection::GetVisibleTextures and wfcWSelection::SetVisibleTextures to get and set the properties related to the surface texture respectively using an object of the class wfcTexture. The class wfcTexture is an interface to the texture property and contains the methods described below.
Use the method
wfcTexture::Create to create an instance of the
wfcTexture 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
wfcTexture::GetType and
wfcTexture::SetType to get and set the type of the texture using the enumerated type
wfcTextureType.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 wfcTexture::GetFilePath and wfcTexture::SetFilePath to get and set the full path to the texture map.
Use the methods wfcTexture::GetPlacement and wfcTexture::SetPlacement to get and set the sequence of placements properties using an object of the class wfcTexturePlacement. The parameters of the class wfcTexturePlacement are as follows:
Use the method wfcTexturePlacement::Create to create an instance of the object wfcTexturePlacement. 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 wfcTexturePlacement::GetTextureProjectionType and wfcTexturePlacement::SetTextureProjectionType to get and set the texture projection type using the enumerated type wfcTextureProjectionType.
Use the methods wfcTexturePlacement::GetLocalSys and wfcTexturePlacement::SetLocalSys to get and set the line envelope.
Use the methods wfcTexturePlacement::GetHorizontalOffset and wfcTexturePlacement::SetHorizontalOffset to get and set the horizontal offset.
Use the methods wfcTexturePlacement::GetVerticalOffset and wfcTexturePlacement::SetVerticalOffset to get and set the vertical offset.
Use the methods wfcTexturePlacement::GetRotate and wfcTexturePlacement::SetRotate to get and set the rotating angle.
Use the methods wfcTexturePlacement::GetHorizontalScale and wfcTexturePlacement::SetHorizontalScale to get and set the horizontal scale.
Use the methods wfcTexturePlacement::GetVerticalScale and wfcTexturePlacement::SetVerticalScale to get and set the vertical scale.
Use the methods wfcTexturePlacement::GetBumpHeight and wfcTexturePlacement::SetBumpHeight to get and set the height of the bump.
Use the methods wfcTexturePlacement::GetDecalIntensity and wfcTexturePlacement::SetDecalIntensity to get and set the decal intensity.
Use the methods wfcTexturePlacement::GetHorizontalFlip and wfcTexturePlacement::SetHorizontalFlip to get and set the horizontal flip.
Use the methods wfcTexturePlacement::GetVerticalFlip and wfcTexturePlacement::SetVerticalFlip to get and set the vertical flip.
The method wfcWSession::IsTextureFileEmbedded checks if the specified texture, decal, or bump map file is embedded in the model.
The method wfcWSession::GetTextureFilePath 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.