Show / Hide Table of Contents

Class Texture

Represents a texture image that can be applied to surfaces in the 3D view

Inheritance
object
Texture
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public class Texture

Constructors

View Source

Texture()

Creates an empty texture.

Declaration
public Texture()
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
Type Name Description
Bitmap bitmap
TextureType type
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
Type Description
Texture
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
Type Description
string
Remarks

Setting this property will not affect the actual texture image.

View Source

HasTransparency

Declaration
public bool HasTransparency { get; }
Property Value
Type Description
bool
View Source

IsCubeMap

Returns true if this texture is a cube map.

Declaration
public bool IsCubeMap { get; }
Property Value
Type Description
bool
View Source

NativeTexture

Internal use only.

Declaration
public IntPtr NativeTexture { get; }
Property Value
Type Description
IntPtr
View Source

Size

Returns the size (in pixels) of the texture image

Declaration
public Size Size { get; }
Property Value
Type Description
Size
View Source

TextureType

Gets the TextureType of this texture.

Declaration
public TextureType TextureType { get; }
Property Value
Type Description
TextureType

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
Type Description
Texture
Remarks

The order of the bitmaps are: posx, negx, posy, negy, posz, negz +y -x +z +x -z -y

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
Type Description
Texture
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
Type Description
Texture
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
Type Description
Texture
View Source

CreateParallaxBumpMap(string, string)

Declaration
[Obsolete("No longer supported")]
public static Texture CreateParallaxBumpMap(string normalMap, string bumpMap)
Parameters
Type Name Description
string normalMap
string bumpMap
Returns
Type Description
Texture
View Source

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

~Texture()

Declaration
protected ~Texture()
View Source

GetAllTextures()

Returns an array containing all textures that are currently in memory.

Declaration
public static Texture[] GetAllTextures()
Returns
Type Description
Texture[]
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

GetImage()

Returns the texture as a Bitmap, if supported. Otherwise null is returned.

Declaration
public Bitmap GetImage()
Returns
Type Description
Bitmap
Remarks

Only non-DDS 2D textures are supported.

View Source

SetImage(Bitmap)

Replaces the texture image with a new one

Declaration
public void SetImage(Bitmap bitmap)
Parameters
Type Name Description
Bitmap bitmap
Remarks

The new image must have the same width and height as the original!

View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
  • View Source
In this article
Back to top Copyright © 2025 ABB