nvidia::apex::CustomBufferIterator Class Reference
This class is used to access specific elements in an untyped chunk of memory. More...
#include <CustomBufferIterator.h>
Public Member Functions | |
virtual void * | getVertex (uint32_t triangleIndex, uint32_t vertexIndex) const =0 |
Returns the memory start of a specific vertex. | |
virtual int32_t | getAttributeIndex (const char *attributeName) const =0 |
Returns the index of a certain custom buffer. | |
virtual void * | getVertexAttribute (uint32_t triangleIndex, uint32_t vertexIndex, const char *attributeName, RenderDataFormat::Enum &outFormat) const =0 |
Returns a pointer to a certain attribute of the specified vertex/triangle. | |
virtual void * | getVertexAttribute (uint32_t triangleIndex, uint32_t vertexIndex, uint32_t attributeIndex, RenderDataFormat::Enum &outFormat, const char *&outName) const =0 |
Returns a pointer to a certain attribute of the specified vertex/triangle. |
Detailed Description
This class is used to access specific elements in an untyped chunk of memory.
Member Function Documentation
virtual int32_t nvidia::apex::CustomBufferIterator::getAttributeIndex | ( | const char * | attributeName | ) | const [pure virtual] |
Returns the index of a certain custom buffer.
- Note:
- This is constant throughout the existence of this class.
virtual void* nvidia::apex::CustomBufferIterator::getVertex | ( | uint32_t | triangleIndex, |
uint32_t | vertexIndex | ||
) | const [pure virtual] |
Returns the memory start of a specific vertex.
All custom buffers are stored interleaved, so this is also the memory start of the first attribute of this vertex.
virtual void* nvidia::apex::CustomBufferIterator::getVertexAttribute | ( | uint32_t | triangleIndex, |
uint32_t | vertexIndex, | ||
const char * | attributeName, | ||
RenderDataFormat::Enum & | outFormat | ||
) | const [pure virtual] |
Returns a pointer to a certain attribute of the specified vertex/triangle.
- Parameters:
-
[in] triangleIndex Which triangle [in] vertexIndex Which of the vertices of this triangle (must be either 0, 1 or 2) [in] attributeName The name of the attribute you wish the data for [out] outFormat The format of the attribute, reinterpret_cast the void pointer accordingly.
virtual void* nvidia::apex::CustomBufferIterator::getVertexAttribute | ( | uint32_t | triangleIndex, |
uint32_t | vertexIndex, | ||
uint32_t | attributeIndex, | ||
RenderDataFormat::Enum & | outFormat, | ||
const char *& | outName | ||
) | const [pure virtual] |
Returns a pointer to a certain attribute of the specified vertex/triangle.
- Note:
- This is the faster method than the one above since it won't do any string comparisons
- Parameters:
-
[in] triangleIndex Which triangle [in] vertexIndex Which of the vertices of this triangle (must be either 0, 1 or 2) [in] attributeIndex The indexof the attribute you wish the data for (use CustomBufferIterator::getAttributeIndex to find the index to a certain attribute name [out] outFormat The format of the attribute, reinterpret_cast the void pointer accordingly. [out] outName The name associated with the attribute
The documentation for this class was generated from the following file:
Generated on Fri Dec 15 2017 13:58:38
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.