Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TIndexedPolygonBuffer< N > Class Template Referencefinal

#include <TIndexedPolygonBuffer.h>

Public Member Functions

 TIndexedPolygonBuffer ()
 
std::array< math::Vector3R, N > getPositions (std::size_t faceIndex) const
 
std::array< math::Vector3R, N > getTexCoords (std::size_t faceIndex) const
 
std::array< math::Vector3R, N > getNormals (std::size_t faceIndex) const
 
std::array< math::Vector3R, N > getFaceAttribute (EVertexAttribute attribute, std::size_t faceIndex) const
 
std::size_t numFaces () const
 
bool hasTexCoord () const
 
bool hasNormal () const
 
bool hasFaceAttribute (EVertexAttribute attribute) const
 
std::size_t memoryUsage () const
 
float averagePerPolygonMemoryUsage () const
 
IndexedVertexBuffergetVertexBuffer ()
 
const IndexedVertexBuffergetVertexBuffer () const
 
IndexedUIntBuffergetIndexBuffer ()
 
const IndexedUIntBuffergetIndexBuffer () const
 

Static Public Member Functions

static constexpr std::size_t numPolygonVertices ()
 
static constexpr bool isTriangular ()
 

Detailed Description

template<std::size_t N>
class ph::TIndexedPolygonBuffer< N >
Template Parameters
NNumber of polygon vertices.

Constructor & Destructor Documentation

◆ TIndexedPolygonBuffer()

template<std::size_t N>
ph::TIndexedPolygonBuffer< N >::TIndexedPolygonBuffer ( )
inline

Member Function Documentation

◆ averagePerPolygonMemoryUsage()

template<std::size_t N>
float ph::TIndexedPolygonBuffer< N >::averagePerPolygonMemoryUsage ( ) const
inline
Returns
Number of bytes used by a single polygon.

◆ getFaceAttribute()

template<std::size_t N>
std::array< math::Vector3R, N > ph::TIndexedPolygonBuffer< N >::getFaceAttribute ( EVertexAttribute attribute,
std::size_t faceIndex ) const
inline

◆ getIndexBuffer() [1/2]

template<std::size_t N>
IndexedUIntBuffer & ph::TIndexedPolygonBuffer< N >::getIndexBuffer ( )
inline

◆ getIndexBuffer() [2/2]

template<std::size_t N>
const IndexedUIntBuffer & ph::TIndexedPolygonBuffer< N >::getIndexBuffer ( ) const
inline

◆ getNormals()

template<std::size_t N>
std::array< math::Vector3R, N > ph::TIndexedPolygonBuffer< N >::getNormals ( std::size_t faceIndex) const
inline

◆ getPositions()

template<std::size_t N>
std::array< math::Vector3R, N > ph::TIndexedPolygonBuffer< N >::getPositions ( std::size_t faceIndex) const
inline

◆ getTexCoords()

template<std::size_t N>
std::array< math::Vector3R, N > ph::TIndexedPolygonBuffer< N >::getTexCoords ( std::size_t faceIndex) const
inline

◆ getVertexBuffer() [1/2]

template<std::size_t N>
IndexedVertexBuffer & ph::TIndexedPolygonBuffer< N >::getVertexBuffer ( )
inline

◆ getVertexBuffer() [2/2]

template<std::size_t N>
const IndexedVertexBuffer & ph::TIndexedPolygonBuffer< N >::getVertexBuffer ( ) const
inline

◆ hasFaceAttribute()

template<std::size_t N>
bool ph::TIndexedPolygonBuffer< N >::hasFaceAttribute ( EVertexAttribute attribute) const
inline

◆ hasNormal()

template<std::size_t N>
bool ph::TIndexedPolygonBuffer< N >::hasNormal ( ) const
inline

◆ hasTexCoord()

template<std::size_t N>
bool ph::TIndexedPolygonBuffer< N >::hasTexCoord ( ) const
inline

◆ isTriangular()

template<std::size_t N>
bool ph::TIndexedPolygonBuffer< N >::isTriangular ( )
inlinestaticconstexpr

◆ memoryUsage()

template<std::size_t N>
std::size_t ph::TIndexedPolygonBuffer< N >::memoryUsage ( ) const
inline
Returns
Number of bytes used by the polygons.

◆ numFaces()

template<std::size_t N>
std::size_t ph::TIndexedPolygonBuffer< N >::numFaces ( ) const
inline

◆ numPolygonVertices()

template<std::size_t N>
std::size_t ph::TIndexedPolygonBuffer< N >::numPolygonVertices ( )
inlinestaticconstexpr

The documentation for this class was generated from the following files: