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
- TObject
- TPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractAppearanceChildNode
- TAbstractTextureNode
- TAbstractSingleTextureNode
- TAbstractTexture2DNode
- TPixelTextureNode
Overview
Methods
function TextureDescription: string; override; |
|
procedure CreateNode; override; |
|
class function ClassX3DType: String; override; |
Properties
property FdImage: TSFImage read FFdImage; |
Description
Methods
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. |
procedure CreateNode; override; |
|
Create node fields and events. |
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
property FdImage: TSFImage read FFdImage; |
|
Internal wrapper for property |
Generated by PasDoc 0.16.0-snapshot.