This method sets the image file texture and its scaling parameters, used by the wall, this method also sets the FillType to FACE_TEXTURE (= 1).
HRESULT SetSideTexture(
[in] int SegmentNum,
[in] BSTR FileName,
[in, defaultvalue(0)] TilingMethodCode Method,
[in, defaultvalue(1)] double ScaleX,
[in, defaultvalue(1)] double ScaleY,
[in, defaultvalue(0)] long DontDraw);
Parameters:
SegmentNum – The number of the segment. The number of segments is a value between 0, for the first wall, and ITerrainBuilding5::NumOfVertices –1, for the last wall.
FileName – A full pathname or a URL to the texture image file.
Method – An enum determining the tiling method used for the textures. The TextureTilingMethod enum can use any of the following values:
TM_TILES_PER_AXIS = 0
TM_METERS_PER_TILE = 1
ScaleX – If Tiling Method is Tiles per Side – returns the number of repetitions, for each side, of the image file in the X-axis. If Tiling Method is Meters per Tile – returns the size of the side texture in the X-axis.
ScaleY – If Tiling Method is Tiles per Side – returns the number of repetitions, for each side, of the image file in the Y-axis. If Tiling Method is Meters per Tile – returns the size of the side texture in the Y-axis.
DontDraw – When set to TRUE, the building is not redrawn after the method is called. When set to FALSE redraws every time the method is called.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |