Class Ifc4x2::IfcPixelTexture¶
Defined in File Ifc4x2.h
Nested Relationships¶
This class is a nested type of Struct Ifc4x2.
Inheritance Relationships¶
Base Type¶
public Ifc4x2::IfcSurfaceTexture
(Class Ifc4x2::IfcSurfaceTexture)
Class Documentation¶
-
class
Ifc4x2
::
IfcPixelTexture
: public Ifc4x2::IfcSurfaceTexture¶ An IfcPixelTexture provides a 2D image-based texture map as an explicit array of pixel values (list of Pixel binary attributes). In contrary to the IfcImageTexture the IfcPixelTexture holds a 2 dimensional list of pixel color (and opacity) directly, instead of referencing to an URL.
The following definitions from ISO/IEC 19775-1 X3D Architecture and base components (X3D Specification) apply:
The PixelTexture node defines a 2D image-based texture map as an explicit array of pixel values (image field) and parameters controlling tiling repetition of the texture onto geometry. Texture maps are defined in a 2D coordinate system (s, t) that ranges from 0.0 to 1.0 in both directions. The bottom edge of the pixel image corresponds to the S-axis of the texture map, and left edge of the pixel image corresponds to the T-axis of the texture map. The lower-left pixel of the pixel image corresponds to s=0.0, t=0.0, and the top-right pixel of the image corresponds to s = 1.0, t = 1.0. The Image field specifies a single uncompressed 2-dimensional pixel image. Image fields contain three integers representing the width, height and number of components in the image, followed by width×height hexadecimal values representing the pixels in the image. Pixel values are limited to 256 levels of intensity (that is, 0x00-0xFF hexadecimal).
A one-component image specifies one-byte hexadecimal value representing the intensity of the image. For example, 0xFF is full intensity in hexadecimal (255 in decimal), 0x00 is no intensity (0 in decimal). A two-component image specifies the intensity in the first (high) byte and the alpha opacity in the second (low) byte. Pixels in a three-component image specify the red component in the first (high) byte, followed by the green and blue components (for example, 0xFF0000 is red, 0x00FF00 is green, 0x0000FF is blue). Four-component images specify the alpha opacity byte after red/green/blue (e.g., 0x0000FF80 is semi-transparent blue). A value of 00 is completely transparent, FF is completely opaque, 80 is semi-transparent.
Note that alpha equals (1.0 -transparency), if alpha and transparency each range from 0.0 to 1.0.
HISTORY: New class in IFC2x2.
Public Types
-
typedef IfcTemplatedEntityList<IfcPixelTexture>
list
¶
Public Functions
-
int
Width
() const¶ The number of pixels in width (S) direction.
-
void
setWidth
(int v)¶
-
int
Height
() const¶ The number of pixels in height (T) direction.
-
void
setHeight
(int v)¶
-
int
ColourComponents
() const¶ Indication whether the pixel values contain a 1, 2, 3, or 4 colour component.
-
void
setColourComponents
(int v)¶
-
std::vector<boost::dynamic_bitset<>>
Pixel
() const¶ Flat list of hexadecimal values, each describing one pixel by 1, 2, 3, or 4 components.
IFC2x Edition 3 CHANGE The data type has been changed from STRING to BINARY.
-
void
setPixel
(std::vector<boost::dynamic_bitset<>> v)¶
-
IfcPixelTexture
(IfcEntityInstanceData *e)¶
-
IfcPixelTexture
(bool v1_RepeatS, bool v2_RepeatT, boost::optional<std::string> v3_Mode, ::Ifc4x2::IfcCartesianTransformationOperator2D *v4_TextureTransform, boost::optional<std::vector<std::string>> v5_Parameter, int v6_Width, int v7_Height, int v8_ColourComponents, std::vector<boost::dynamic_bitset<>> v9_Pixel)¶
-
typedef IfcTemplatedEntityList<IfcPixelTexture>