SilverScreen Solid Modeler

TEXTURE_DATA        

TEXTURE_DATA        

Previous topic Next topic  

TEXTURE_DATA        

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

TEXTURE_DATA

 

Structure

A primitive-level data type that stores the data associated with a SilverScreen line.

 

 

 struct TEXTURE_DATA

    {

    USINT32  Flags;    // Properties of texture

    double   Width;    // Width (in inches) of texture map

    double   Height;   // Height (in inches) of texture map

    double   Rotation; // Angle (degrees)to rotate texture before applying

    };

 

 


Members

Member

Description

Flags

A bit flag that has the following values

 

Constant

Meaning

TEXTURE_MAP_SPHERE

Sphere-mapping is used to apply this texture

TEXTURE_MAP_CYLINDER

Cylinder-mapping is used to apply this texture

TEXTURE_MAP_PLANE

Plane-mapping is used to apply this texture

TEXTURE_MAP_BOX

Box-mapping is used to apply this texture



TEXTURE_MODE_REPLACE

The texture image will replace the pixels of the target geometry

TEXTURE_MODE_BLEND

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

TEXTURE_MODE_MODULATE

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



TEXTURE_FLAG_HORZFLIP

The texture will be flipped horizontally when it is applied

TEXTURE_FLAG_VERTFLIP

The texture will be flipped vertically when it is applied.

TEXTURE_FLAG_STRETCHTOFIT

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

TEXTURE_FLAG_IGNORE_ALPHA

If texture contains alpha data do not use it

 

Width

Width (in inches) of texture when it is applied

Height

Height (in inches) of texture when it is applied

Rotation

Angle (in degrees) to rotate the texture when it is applied.

 

 

Remarks

There are several macros that separates the 'Flags' field into groups, as well as one to extract the index. They are

 

Macro

Purpose

TEXTURE_INDEX

Extracts 0 if there is no texture associated with the 'Flags' field, otherwise it extracts the index into the texture table.

TEXTURE_MAP

Extracts the texture mapping (i.e. TEXTURE_MAP_BOX) from the 'Flags' field

TEXTURE_MODE

Extracts the texture mode (i.e. TEXTURE_MODE_MODULATE) from the 'Flags' field

TEXTURE_FLAGS

Extracts the texture flags (i.e. TEXTURE_FLAG_HORZFLIP) from the 'Flags' field

MAKE_TEXTURE_FLAG

Combines an index, texture mapping, texture mode, and any texture flags into a value appropriate for assignment to the 'Flags' field.

 

See Also

OBJECT_NODE

 

Header

silver.h, ssnodes.h