Skip to content

Documentation / device / PBTypeInfo

Abstract Class: PBTypeInfo<DetailType>

Defined in: libs/device/src/builder/types.ts:571

Abstract base class for any type

Extended by

Type Parameters

DetailType

DetailType extends TypeDetailInfo = TypeDetailInfo

Accessors

typeId

Get Signature

get typeId(): string

Defined in: libs/device/src/builder/types.ts:585

Get unique id for this type

Returns

string

Methods

isVoidType()

isVoidType(): this is PBVoidTypeInfo

Defined in: libs/device/src/builder/types.ts:592

returns true if this is a void type

Returns

this is PBVoidTypeInfo


isAnyType()

isAnyType(): this is PBAnyTypeInfo

Defined in: libs/device/src/builder/types.ts:596

returns true if this is an any type

Returns

this is PBAnyTypeInfo


isPrimitiveType()

isPrimitiveType(): this is PBPrimitiveTypeInfo

Defined in: libs/device/src/builder/types.ts:600

returns true if this is a primitive type

Returns

this is PBPrimitiveTypeInfo


haveAtomicMembers()

haveAtomicMembers(): boolean

Defined in: libs/device/src/builder/types.ts:604

Wether this type have atomic members

Returns

boolean


isStructType()

isStructType(): this is PBStructTypeInfo

Defined in: libs/device/src/builder/types.ts:608

returns true if this is a struct type

Returns

this is PBStructTypeInfo


isArrayType()

isArrayType(): this is PBArrayTypeInfo

Defined in: libs/device/src/builder/types.ts:612

returns true if this is an array type

Returns

this is PBArrayTypeInfo


isPointerType()

isPointerType(): this is PBPointerTypeInfo

Defined in: libs/device/src/builder/types.ts:616

returns true if this is a pointer type

Returns

this is PBPointerTypeInfo


isAtomicI32()

isAtomicI32(): this is PBAtomicI32TypeInfo

Defined in: libs/device/src/builder/types.ts:620

returns true if this is an atomic int type

Returns

this is PBAtomicI32TypeInfo


isAtomicU32()

isAtomicU32(): this is PBAtomicU32TypeInfo

Defined in: libs/device/src/builder/types.ts:624

returns true if this is an atomic uint type

Returns

this is PBAtomicU32TypeInfo


isSamplerType()

isSamplerType(): this is PBSamplerTypeInfo

Defined in: libs/device/src/builder/types.ts:628

returns true if this is a sampler type

Returns

this is PBSamplerTypeInfo


isTextureType()

isTextureType(): this is PBTextureTypeInfo

Defined in: libs/device/src/builder/types.ts:632

returns true if this is a texture type

Returns

this is PBTextureTypeInfo


isCompatibleType()

isCompatibleType(other): boolean

Defined in: libs/device/src/builder/types.ts:656

Check whether a given type is compatible with this type

Parameters

other

PBTypeInfo

The type to be checked

Returns

boolean

true if the given type is compatible with this type, othewise false


toBufferLayout()

abstract toBufferLayout(offset, layout): UniformBufferLayout

Defined in: libs/device/src/builder/types.ts:665

Creates a buffer layout from this type

Parameters

offset

number

Byte offset of the layout

layout

PBStructLayout

Type of the layout

Returns

UniformBufferLayout

The created buffer layout

Released under the MIT License.