Class Texture
Represents a texture image that can be applied to surfaces in the 3D view
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
Constructors
Texture()
Creates an empty texture.
Declaration
Texture(Bitmap)
Creates a texture from a Bitmap
Declaration
public Texture(Bitmap bitmap)
Parameters
Type |
Name |
Description |
Bitmap |
bitmap |
|
Texture(Bitmap, TextureType)
Creates a texture from a Bitmap
Declaration
public Texture(Bitmap bitmap, TextureType type)
Parameters
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.
|
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
DefaultEnvironmentMap
Returns a default texture suitable for simple environment mapping
Declaration
public static Texture DefaultEnvironmentMap { get; }
Property Value
FileName
Gets or sets path of the bitmap file that this texture was originally created from.
Declaration
public string FileName { get; set; }
Property Value
HasTransparency
Declaration
public bool HasTransparency { get; }
Property Value
IsCubeMap
Returns true if this texture is a cube map.
Declaration
public bool IsCubeMap { get; }
Property Value
NativeTexture
Declaration
public IntPtr NativeTexture { get; }
Property Value
Size
Returns the size (in pixels) of the texture image
Declaration
public Size Size { get; }
Property Value
TextureType
Declaration
public TextureType TextureType { get; }
Property Value
Methods
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
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
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
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
olete("No longer supported")]
public static Texture CreateNormalMapFromHeightMap(string fileName)
Parameters
Type |
Name |
Description |
String |
fileName |
|
Returns
CreateParallaxBumpMap(String, String)
Declaration
olete("No longer supported")]
public static Texture CreateParallaxBumpMap(string normalMap, string bumpMap)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
Finalize()
Declaration
protected void Finalize()
GetAllTextures()
Returns an array containing all textures that are currently in memory.
Declaration
public static Texture[] GetAllTextures()
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
GetImage()
Returns the texture as a Bitmap, if supported. Otherwise null is returned.
Declaration
Returns
SetImage(Bitmap)
Replaces the texture image with a new one
Declaration
public void SetImage(Bitmap bitmap)
Parameters
Type |
Name |
Description |
Bitmap |
bitmap |
|
ToString()
Declaration
public override string ToString()
Returns
Overrides