Class Ifc2x3::IfcSurfaceTexture

Nested Relationships

This class is a nested type of Struct Ifc2x3.

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class Ifc2x3::IfcSurfaceTexture : public IfcUtil::IfcBaseEntity

An IfcSurfaceTexture provides a 2-dimensional image-based texture map. It can either be given by referencing an external image file through an URL reference (IfcImageTexture), including the image file as a blob (long binary) into the data set (IfcBlobTexture), or by explicitly including an array of pixels (IfcPixelTexture). The following definitions from ISO/IEC 19775-1 X3D Architecture and base components (X3D Specification) apply:

Texture: An image used in a texture map to create visual appearance effects when applied to geometry nodes. Texture map: A texture plus the general parameters necessary for mapping the texture to geometry.

Texture are defined by 2D images that contain an array of colour values describing the texture. The texture values are interpreted differently depending on the number of components in the texture and the specifics of the image format. In general, texture may be described using one of the following forms:

Intensity textures (one-component) Intensity plus alpha opacity textures (two-component) Full RGB textures (three-component) Full RGB plus alpha opacity textures (four-component)

NOTE Image formats specify an alpha opacity, not transparency (where alpha = 1 - transparency).

Figure 295 illustrates the texture coordinate system.

Figure 295 — Surface texture coordinates

The following definitions from ISO/IEC 19775-1 X3D Architecture and base components (X3D Specification) on texture coordinates apply:

Texture maps are defined in a 2D coordinate system (s,t) that ranges from [0.0, 1.0] in both directions. The bottom edge of the image corresponds to the S-axis of the texture map, and left edge of the image corresponds to the T-axis of the texture map. The lower-left pixel of the image corresponds to s=0, t=0, and the top-right pixel of the image corresponds to s=1, t=1. Texture maps may be viewed as two dimensional colour functions that, given an (s,t) coordinate, return a colour value colour(s,t).

If multiple surface textures are included in the IfcSurfaceStyleWithTextures applying them to a geometric item, a mode and optional parameters can be included that blending operations. The RepeatS and RepeatT Boolean flags control whether the texture map is repeated outside the [0.0, 1.0] texture coordinate range, when applied to a geometric surface, or clamped to lie within the [0.0, 1.0] range. The TextureTransform applies a 2D non-uniform transformation to the texture before it is applied to a geometric surface. The following definitions from ISO/IEC 19775-1 X3D Architecture and base components (X3D Specification) apply:

These parameters support changes to the size, orientation, and position of textures on shapes. Note that these operations appear reversed when viewed on the surface of geometry. For example, a scale value of (2 2) will scale the texture coordinates and have the net effect of shrinking the texture size by a factor of 2 (texture coordinates are twice as large and thus cause the texture to repeat). A translation of (0.5 0.0) translates the texture coordinates +.5 units along the S-axis and has the net effect of translating the texture −0.5 along the S-axis on the geometry’s surface. A rotation of π/2 of the texture coordinates results in a −π/2 rotation of the texture on the geometry. The center field specifies a translation offset in texture coordinate space about which the rotation and scale fields are applied. The scale field specifies a scaling factor in S and T of the texture coordinates about the center point. scale values shall be in the range (−∞,∞). The rotation field specifies a rotation in radians of the texture coordinates about the center point after the scale has been applied. A positive rotation value makes the texture coordinates rotate counterclockwise about the centre, thereby rotating the appearance of the texture itself clockwise. The translation field specifies a translation of the texture coordinates. The following conventions apply:

center = TextureTransform.LocalOrigin; rotation = TextureTransform.Axis1 scale S = TextureTransform.Scale scale T = TextureTransform.Scale2

NOTE The definitions of texturing within this standard have been developed in dependence on the texture component of X3D. See ISO/IEC 19775-1.2:2008 X3D Architecture and base components Edition 2, Part 1, 18 Texturing component for the definitions in the international standard.

HISTORY New entity in IFC 2x2.

IFC2x4 CHANGE Attribute TextureType replaces by Mode, attributes Parameter and MapsTo aded, new inverse attribute UsedInStyle.

Subclassed by Ifc2x3::IfcBlobTexture, Ifc2x3::IfcImageTexture, Ifc2x3::IfcPixelTexture

Public Types

typedef IfcTemplatedEntityList<IfcSurfaceTexture> list

Public Functions

bool RepeatS() const

The RepeatS field specifies how the texture wraps in the S direction. If RepeatS is TRUE (the default), the texture map is repeated outside the [0.0, 1.0] texture coordinate range in the S direction so that it fills the shape. If RepeatS is FALSE, the texture coordinates are clamped in the S direction to lie within the [0.0, 1.0] range.

void setRepeatS(bool v)
bool RepeatT() const

The RepeatT field specifies how the texture wraps in the T direction. If RepeatT is TRUE (the default), the texture map is repeated outside the [0.0, 1.0] texture coordinate range in the T direction so that it fills the shape. If RepeatT is FALSE, the texture coordinates are clamped in the T direction to lie within the [0.0, 1.0] range.

void setRepeatT(bool v)
::Ifc2x3::IfcSurfaceTextureEnum::Value TextureType() const
void setTextureType(::Ifc2x3::IfcSurfaceTextureEnum::Value v)
bool hasTextureTransform() const

Whether the optional attribute TextureTransform is defined for this IfcSurfaceTexture.

::Ifc2x3::IfcCartesianTransformationOperator2D *TextureTransform() const

The TextureTransform defines a 2D transformation that is applied to the texture coordinates. It affects the way texture coordinates are applied to the surfaces of geometric representation itesm. The 2D transformation supports changes to the size, orientation, and position of textures on shapes.

Mirroring is not allowed to be used in the IfcCarteesianTransformationOperator

void setTextureTransform(::Ifc2x3::IfcCartesianTransformationOperator2D *v)
const IfcParse::entity &declaration() const
IfcSurfaceTexture(IfcEntityInstanceData *e)
IfcSurfaceTexture(bool v1_RepeatS, bool v2_RepeatT, ::Ifc2x3::IfcSurfaceTextureEnum::Value v3_TextureType, ::Ifc2x3::IfcCartesianTransformationOperator2D *v4_TextureTransform)

Public Static Functions

const IfcParse::entity &Class()