class Surface

The FidelityFX Cauldron Framework surface representation.

File location: framework/cauldron/framework/inc/render/mesh.h

Construction

Return type

Description

Construction.
Surface (uint32_t surfaceID)
Constructor, sets the surfaceID [0,surfaces in the mesh].

Methods

Return type

Description

Vec4 &

Returns the geometric center of all surface geometry.

Vec4

Center () const

Vec4 &

Returns the geometric radius of all surface geometry.

Vec4

Radius () const

const IndexBufferInformation &

Returns the index buffer information for the surface geometry.

IndexBufferInformation &

GetIndexBuffer ()

const VertexBufferInformation &

GetVertexBuffer (VertexAttributeType Type) const
Returns the vertex buffer information for a specific vertex attribute of the surface geometry.

VertexBufferInformation &

GetVertexBuffer (VertexAttributeType type)

uint32_t

GetAttributeStride (VertexAttributeType type) const
Returns the vertex buffer stream stride for a specific vertex attribute.

void

SetMaterial (const Material * pMaterial)
Sets the surface’s material for rendering.

const Material *

GetMaterial () const
Gets the surface’s material for rendering.

bool

Returns true if the material has translucent texture or geometric information.

uint32_t

Returns an ORed bitmask representing all vertex attributes in a surface’s geometry.

const uint32_t

GetSurfaceID () const
Returns the ID of the surface in the Mesh.

static void

GetVertexAttributeDefines (uint32_t attributes, DefineList & defines)
Returns the shader defines necessary to build all surface vertex attribute fetchers in a shader.

Detailed description

The FidelityFX Cauldron Framework surface representation. A surface has a Material and is one of a number of surfaces that make up a Mesh.

Construction

Surface

Copied!

Surface ()

Construction.


Surface

Copied!

Surface (uint32_t surfaceID)

Constructor, sets the surfaceID [0,surfaces in the mesh].


Methods

Center

Copied!

Vec4 & Center ()

Returns the geometric center of all surface geometry.


Radius

Copied!

Vec4 & Radius ()

Returns the geometric radius of all surface geometry.


GetIndexBuffer

Copied!

const IndexBufferInformation & GetIndexBuffer () const

Returns the index buffer information for the surface geometry.


GetVertexBuffer

Copied!

const VertexBufferInformation & GetVertexBuffer (VertexAttributeType  Type) const

Returns the vertex buffer information for a specific vertex attribute of the surface geometry.


GetAttributeStride

Copied!

uint32_t GetAttributeStride (VertexAttributeType  type) const

Returns the vertex buffer stream stride for a specific vertex attribute.


SetMaterial

Copied!

void SetMaterial (const Material * pMaterial)

Sets the surface’s material for rendering.


GetMaterial

Copied!

const Material * GetMaterial () const

Gets the surface’s material for rendering.


HasTranslucency

Copied!

bool HasTranslucency () const

Returns true if the material has translucent texture or geometric information.


GetVertexAttributes

Copied!

uint32_t GetVertexAttributes () const

Returns an ORed bitmask representing all vertex attributes in a surface’s geometry.


GetSurfaceID

Copied!

const uint32_t GetSurfaceID () const

Returns the ID of the surface in the Mesh.


GetVertexAttributeDefines

Copied!

static void GetVertexAttributeDefines (
    uint32_t attributes,
    DefineList & defines
)

Returns the shader defines necessary to build all surface vertex attribute fetchers in a shader.