CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::IndexType Struct Referencefinal

#include <CeresEngine/Mesh/IndexType.hpp>

Inheritance diagram for CeresEngine::IndexType:
CeresEngine::StructEnum< IndexType >

Public Types

enum  : UnderlyingType { UInt16 , UInt32 }
 
using RawType = decltype(raw)
 
- Public Types inherited from CeresEngine::StructEnum< IndexType >
using UnderlyingType = UInt32
 
using Self = IndexType
 

Public Member Functions

constexpr IndexType ()=default
 
constexpr IndexType (RawType raw)
 
constexpr IndexType (UnderlyingType raw)
 
StringView toString () const noexcept
 Gets a string representation of IndexType.
 
std::size_t getSize () const noexcept
 Gets the size of index.
 
- Public Member Functions inherited from CeresEngine::StructEnum< IndexType >
 operator UnderlyingType () const noexcept
 Converts the enum into it's underlying type.
 
void toString (std::ostream &stream) const noexcept
 Writes a string representation of the ShaderType to the given stream.
 

Static Public Member Functions

static Optional< IndexTypefromString (StringView string) noexcept
 Creates a new IndexType from a string representation.
 
- Static Public Member Functions inherited from CeresEngine::StructEnum< IndexType >
static Self fromRawUnderlying (UnderlyingType underlying) noexcept
 Creates a new Self from it's underlying numeric representation.
 

Public Attributes

enum CeresEngine::IndexType:: { ... }  raw
 

Member Typedef Documentation

◆ RawType

Member Enumeration Documentation

◆ anonymous enum

Enumerator
UInt16 

The index buffer is represented as a 16-bit unsigned integer.

UInt32 

The index buffer is represented as a 32-bit unsigned integer.

Constructor & Destructor Documentation

◆ IndexType() [1/3]

constexpr CeresEngine::IndexType::IndexType ( )
constexprdefault

◆ IndexType() [2/3]

constexpr CeresEngine::IndexType::IndexType ( RawType  raw)
inlineconstexpr

◆ IndexType() [3/3]

constexpr CeresEngine::IndexType::IndexType ( UnderlyingType  raw)
inlineexplicitconstexpr

Member Function Documentation

◆ fromString()

static Optional< IndexType > CeresEngine::IndexType::fromString ( StringView  string)
staticnoexcept

Creates a new IndexType from a string representation.

If the string value is invalid, an empty optional is returned.

◆ getSize()

std::size_t CeresEngine::IndexType::getSize ( ) const
noexcept

Gets the size of index.

◆ toString()

StringView CeresEngine::IndexType::toString ( ) const
noexcept

Gets a string representation of IndexType.

Member Data Documentation

◆ []

enum { ... } CeresEngine::IndexType::raw

The documentation for this struct was generated from the following file: