Class TPixelTextureNode

Unit

Declaration

type TPixelTextureNode = class(TAbstractTexture2DNode)

Description

Texture specified as an explicit array of pixel values (see FdImage field).

This is useful when authoring X3D, as you can place texture contents directly inside the X3D file (without the need for any external file).

PixelTexture is also comfortable when using Object Pascal to construct the X3D graph. In this case, it allows to provide an image as a ready TCastleImage instance, by changing the value of the TPixelTextrueNode.FdImage.Value.

An alternative to PixelTexture is to use "data URI". With "data URI", you can embed any file contents inside an URL. This way, you can use ImageTexture, and inside ImageTexture.url field you can place an embedded image contents (instead of a normal URL or filename). To convert your image file to a "data URI", you can our tool "to_data_uri". The image contents stay compressed this way (although expressed in base64), so it may be more compact than PixelTexture.

Hierarchy

Overview

Methods

Public function TextureDescription: string; override;
Public procedure CreateNode; override;
Public class function ClassX3DType: String; override;

Properties

Public property FdImage: TSFImage read FFdImage;

Description

Methods

Public function TextureDescription: string; override;

This item has no description. Showing description inherited from TAbstractTextureNode.TextureDescription.

Short description how texture is defined, is it inline or loaded from URL, is it video of simple image texture. "none" if it's not defined at all.

Calling this may not cause automatically loading the texture data (for exampe, from file in case of TAbstractTexture2DNode). So it cannot describe the actually loaded data.

In this class, simply returns X3DType. Override to say something more descriptive.

Public procedure CreateNode; override;

Create node fields and events.

Public class function ClassX3DType: String; override;

This item has no description. Showing description inherited from TX3DNode.ClassX3DType.

Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value.

Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there.

You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance.

Properties

Public property FdImage: TSFImage read FFdImage;

Internal wrapper for property Image. This wrapper API may change, we advise to access simpler Image instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart).


Generated by PasDoc 0.16.0-snapshot.