SilverScreen Solid Modeler

TEXTURE_DATA

TEXTURE_DATA

Previous topic Next topic  

TEXTURE_DATA

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

SilverSharp.TEXTURE_DATA

 

Structure

A SilverSharp.TEXTURE_DATA object is a value type that stores information about SilverScreen textures

 

 

 

C# Code

 

 struct TEXTURE_DATA

    {

    enum TextureMapTypes

       {    

       MAP_SPHERE,

       MAP_CYLINDER,

       MAP_PLANE,

       MAP_BOX,

       };

   

    enum TextureModeTypes

       {

       MODE_REPLACE,

       MODE_BLEND,

       MODE_MODULATE,

       };

       

    [System.Flags]

    enum TextureBits

       {

       FLAG_HORZFLIP,

       FLAG_VERTFLIP,

       FLAG_STRETCHTOFIT,

       FLAG_IGNOREALPHA,

       };

 

    property uint             Index     { get; }

    property TextureMapTypes  Map       { get; }

    property TextureModeTypes Mode      { get; }

    property TextureBits      Flags     { get; }

    property double           Width     { get; }

    property double           Height    { get; }

    property double           Rotation  { get; }

    };  

 

 

 

Properties

The following read-only properties mimic the purpose of their counter-parts in the SilverC TEXTURE_DATA data type:

 

Name

Description

Height

Height (in inches) of texture when it is applied

Rotation

Angle (in degrees) to rotate the texture when it is applied. This angle is relative to the alignment of the texture space (t-space).

Width

Width (in inches) of texture when it is applied

 

The following read-only properties extend TEXTURE_DATA for SilverSharp:

 

Name

Description

Flags

A bit flag that has the following values

 

Constant

Meaning

FLAG_HORZFLIP

The texture will be flipped horizontally when it is applied

FLAG_IGNOREALPHA

If texture contains alpha data do not use it

FLAG_STRETCHTOFIT

The texture will stretch to fit the measured extents of the target geometry

FLAG_VERTFLIP

The texture will be flipped vertically when it is applied.

Index

The index of the texture in the texture table or 0, if there is no texture associated with the TEXTURE_DATA object

Map

A texture mapping technique whose meaning is as follows:

 

Constant

Meaning

MAP_BOX

Box-mapping is used to apply this texture

MAP_CYLINDER

Cylinder-mapping is used to apply this texture

MAP_PLANE

Plane-mapping is used to apply this texture

MAP_SPHERE

Sphere-mapping is used to apply this texture

Mode

A texture mode whose meaning is as follows:

 

Constant

Meaning

MODE_BLEND

The texture image will blend with the pixel color of the target geometry

MODE_MODULATE

The texture image will mix with the pixel color and lighting of the target geometry

MODE_REPLACE

The texture image will replace the pixels of the target geometry

 

 

Remarks

The Flags property has a different meaning than it does in SilverC. Only a subset of the values are applicable in SilverSharp.

 

 

See Also

OBJECT_NODE, SilverC TEXTURE_DATA