Class Texture
Represents a texture image that can be applied to surfaces in the 3D view
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
Constructors
View Source
Texture()
Creates an empty texture.
Declaration
View Source
Texture(Bitmap)
Creates a texture from a Bitmap
Declaration
public Texture(Bitmap bitmap)
Parameters
| Type |
Name |
Description |
| Bitmap |
bitmap |
|
View Source
Texture(Bitmap, TextureType)
Creates a texture from a Bitmap
Declaration
public Texture(Bitmap bitmap, TextureType type)
Parameters
View Source
Texture(string)
Creates a texture from a file
Declaration
public Texture(string fileName)
Parameters
| Type |
Name |
Description |
| string |
fileName |
Texture file, can be either an image or a video.
|
View Source
Texture(string, TextureType)
Creates a texture from a file
Declaration
public Texture(string fileName, TextureType type)
Parameters
| Type |
Name |
Description |
| string |
fileName |
Texture file, can be either an image or a video.
|
| TextureType |
type |
|
Properties
View Source
DefaultEnvironmentMap
Returns a default texture suitable for simple environment mapping
Declaration
public static Texture DefaultEnvironmentMap { get; }
Property Value
View Source
FileName
Gets or sets path of the bitmap file that this texture was originally created from.
Declaration
public string FileName { get; set; }
Property Value
View Source
HasTransparency
Declaration
public bool HasTransparency { get; }
Property Value
View Source
IsCubeMap
Returns true if this texture is a cube map.
Declaration
public bool IsCubeMap { get; }
Property Value
View Source
NativeTexture
Declaration
public IntPtr NativeTexture { get; }
Property Value
View Source
Size
Returns the size (in pixels) of the texture image
Declaration
public Size Size { get; }
Property Value
View Source
TextureType
Declaration
public TextureType TextureType { get; }
Property Value
Methods
View Source
CreateCubeMap(Bitmap[])
Creates a cube map texture from 6 individual bitmaps.
Declaration
public static Texture CreateCubeMap(Bitmap[] bitmaps)
Parameters
| Type |
Name |
Description |
| Bitmap[] |
bitmaps |
|
Returns
View Source
CreateCubeMap(string)
Creates a cube map texture from a single image with the six sides stacked
horizontally
Declaration
public static Texture CreateCubeMap(string fileName)
Parameters
| Type |
Name |
Description |
| string |
fileName |
|
Returns
View Source
CreateCubeMap(string[])
Creates a cube map texture from 6 individual images.
Declaration
public static Texture CreateCubeMap(string[] fileNames)
Parameters
| Type |
Name |
Description |
| string[] |
fileNames |
|
Returns
View Source
CreateNormalMapFromHeightMap(string)
This method is obsolete. RobotStudio will automatically detect grayscale images and treat them as height maps
if TextureType is set to NormalMap when creating new Textures.
Declaration
[Obsolete("No longer supported")]
public static Texture CreateNormalMapFromHeightMap(string fileName)
Parameters
| Type |
Name |
Description |
| string |
fileName |
|
Returns
View Source
CreateParallaxBumpMap(string, string)
Declaration
[Obsolete("No longer supported")]
public static Texture CreateParallaxBumpMap(string normalMap, string bumpMap)
Parameters
Returns
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
~Texture()
Declaration
View Source
GetAllTextures()
Returns an array containing all textures that are currently in memory.
Declaration
public static Texture[] GetAllTextures()
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
GetImage()
Returns the texture as a Bitmap, if supported. Otherwise null is returned.
Declaration
Returns
View Source
SetImage(Bitmap)
Replaces the texture image with a new one
Declaration
public void SetImage(Bitmap bitmap)
Parameters
| Type |
Name |
Description |
| Bitmap |
bitmap |
|
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides