|
AGX Dynamics 2.41.3.0
|
Type-specific Array used for fast access into the data held by a Buffer. More...
#include <Array.h>
Inheritance diagram for agxData::Array< T >:Public Types | |
| typedef const T * | const_iterator |
| typedef const T * | const_pointer |
| typedef const T & | const_reference |
| typedef ptrdiff_t | difference_type |
| typedef T * | iterator |
| typedef std::random_access_iterator_tag | iterator_category |
| typedef T * | pointer |
| typedef T & | reference |
| typedef size_t | size_type |
| typedef T | Type |
| typedef T | value_type |
Public Member Functions | |
| Array () | |
| Create a new invalid array. | |
| Array (agx::Vector< T > &vec) | |
| Create a new array view from a vector. | |
| Array (agx::Vector< T > &vec, agx::IndexRange32 range) | |
| Array (agx::VectorPOD< T > &vec) | |
| Array (agx::VectorPOD< T > &vec, agx::IndexRange32 range) | |
| Array (agxData::Buffer *buffer) | |
| Create a new array covering the entire given buffer. | |
| Array (agxData::Buffer *buffer, agx::IndexRange32 range) | |
| Create a new array covering the given range of the given buffer. | |
| Array (const agxData::Array< T > &other, agx::IndexRange32 localRange) | |
| Create a new array that covers a subset of another array. | |
| agx::GlobalResult::Transaction | allocateResult (size_t numElements) |
| T & | at (size_t index) |
| const T & | at (size_t index) const |
| T & | back () |
| const T & | back () const |
| iterator | begin () |
| const_iterator | begin () const |
| template<typename T2 > | |
| size_t | commitResult (const T2 &vector) |
| template<typename T2 > | |
| size_t | commitResult (const T2 &vector, agx::Index sortIndex) |
| size_t | commitResult (size_t numElements, const void *localResult) |
| size_t | commitResult (size_t numElements, const void *localResult, agx::Index sortIndex) |
| template<typename T2 > | |
| bool | contains (const T2 &element) const |
| iterator | end () |
| const_iterator | end () const |
| template<typename T2 > | |
| size_t | find (const T2 &element) const |
| The index of the first occurrence of an element that is equal to the given element. | |
| T & | front () |
| const T & | front () const |
| agx::GlobalResult * | getGlobalResult () |
| agxData::Array< T > | operator[] (agx::IndexRange32 subRange) const |
| T & | operator[] (size_t index) |
| const T & | operator[] (size_t index) const |
| T * | ptr () |
| const T * | ptr () const |
| agxData::Array< T > | slice (agx::IndexRange32 subRange) const |
Public Member Functions inherited from agxData::AbstractArray | |
| AbstractArray () | |
| Create a new invalid array. | |
| AbstractArray (agxData::Buffer *buffer) | |
| Create a new array that covers the entire given buffer. | |
| AbstractArray (agxData::Buffer *buffer, agx::IndexRange32 range) | |
| Create a new array for the given buffer that covers the specified range. | |
| AbstractArray (const agxData::AbstractArray &other, agx::IndexRange32 localRange) | |
| Create a new array that covers a subset of another array. | |
| void | _setBuffer (agxData::Buffer *buffer) |
| Set the buffer while maintaining the current range, should normally not be used. | |
| agxData::Buffer * | buffer () |
| const agxData::Buffer * | buffer () const |
| bool | empty () const |
| agxData::Format * | getFormat () |
| const agxData::Format * | getFormat () const |
| void | init () |
| Set to empty array. | |
| void | init (agxData::Buffer *buffer) |
| Set the buffer that the array will access. The range is set to the entire buffer. | |
| void | init (agxData::Buffer *buffer, agx::IndexRange32 range) |
| Set the buffer that the array will access, as well as the range of the buffer that is to be covered. | |
| bool | isValid () const |
| agx::IndexRange32 & | range () |
| const agx::IndexRange32 & | range () const |
| void | setRange (agx::IndexRange32 range) |
| Set the range of the buffer that the array will cover. | |
| void | setRange (size_t startIndex, size_t endIndex) |
| Set the range of the buffer that the array will cover. | |
| size_t | size () const |
| void | sync () |
| Updates the internal data access pointer. Called when the back end buffer is reallocated. | |
Public Member Functions inherited from agxData::Data | |
| Data (void *ptr=nullptr) | |
| AbstractArray & | asArray () |
| template<typename T > | |
| Array< T > & | asArray () |
| const AbstractArray & | asArray () const |
| template<typename T > | |
| const Array< T > & | asArray () const |
| AbstractScalar & | asScalar () |
| template<typename T > | |
| Scalar< T > & | asScalar () |
| const AbstractScalar & | asScalar () const |
| template<typename T > | |
| const Scalar< T > & | asScalar () const |
| void * | ptr () |
| const void * | ptr () const |
Static Public Member Functions | |
| static const agxData::Array< T > | raw (const T *buffer, agx::Index size) |
| static agxData::Array< T > | raw (T *buffer, agx::Index size) |
| Array creation helper method that creates an array covering the given memory area. | |
Static Public Attributes | |
| static const bool | IsScalar = false |
Additional Inherited Members | |
Protected Attributes inherited from agxData::AbstractArray | |
| agxData::Buffer * | m_buffer |
| agx::IndexRange32 | m_range |
Protected Attributes inherited from agxData::Data | |
| void * | m_ptr |
Type-specific Array used for fast access into the data held by a Buffer.
| typedef const T* agxData::Array< T >::const_iterator |
| typedef const T* agxData::Array< T >::const_pointer |
| typedef const T& agxData::Array< T >::const_reference |
| typedef ptrdiff_t agxData::Array< T >::difference_type |
| typedef T* agxData::Array< T >::iterator |
| typedef std::random_access_iterator_tag agxData::Array< T >::iterator_category |
| typedef T* agxData::Array< T >::pointer |
| typedef T& agxData::Array< T >::reference |
| typedef size_t agxData::Array< T >::size_type |
| typedef T agxData::Array< T >::Type |
| typedef T agxData::Array< T >::value_type |
| agxData::Array< T >::Array |
| agxData::Array< T >::Array | ( | agxData::Buffer * | buffer | ) |
Create a new array covering the entire given buffer.
Definition at line 760 of file Buffer.h.
References agxAssert, agxData::AbstractArray::buffer(), agxData::Buffer::getFormat(), agxData::Format::getSize(), agx::Model::is(), and agxCore::isShutdown().
| agxData::Array< T >::Array | ( | agxData::Buffer * | buffer, |
| agx::IndexRange32 | range | ||
| ) |
Create a new array covering the given range of the given buffer.
Definition at line 769 of file Buffer.h.
References agxAssert, agxData::AbstractArray::buffer(), agxData::Buffer::getFormat(), agxData::Format::getSize(), agx::Model::is(), and agxCore::isShutdown().
| agxData::Array< T >::Array | ( | const agxData::Array< T > & | other, |
| agx::IndexRange32 | localRange | ||
| ) |
| agxData::Array< T >::Array | ( | agx::Vector< T > & | vec | ) |
Create a new array view from a vector.
Definition at line 782 of file Buffer.h.
References agx::Vector< T, Allocator >::ptr(), and agx::Container::size().
| agxData::Array< T >::Array | ( | agx::Vector< T > & | vec, |
| agx::IndexRange32 | range | ||
| ) |
Definition at line 789 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::begin(), agx::IndexRangeT< T >::end(), agx::Vector< T, Allocator >::ptr(), and agx::Container::size().
| agxData::Array< T >::Array | ( | agx::VectorPOD< T > & | vec | ) |
Definition at line 797 of file Buffer.h.
References agx::VectorPOD< T, Allocator >::ptr(), and agx::Container::size().
| agxData::Array< T >::Array | ( | agx::VectorPOD< T > & | vec, |
| agx::IndexRange32 | range | ||
| ) |
Definition at line 804 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::begin(), agx::IndexRangeT< T >::end(), agx::VectorPOD< T, Allocator >::ptr(), and agx::Container::size().
| agx::GlobalResult::Transaction agxData::Array< T >::allocateResult | ( | size_t | numElements | ) |
| T & agxData::Array< T >::at | ( | size_t | index | ) |
Definition at line 860 of file Buffer.h.
References agxAssert, and agxVerifyN.
| const T & agxData::Array< T >::at | ( | size_t | index | ) | const |
| T & agxData::Array< T >::back |
Definition at line 820 of file Buffer.h.
References agxAssert, and agxAssert1.
Referenced by agx::createCell().
| const T & agxData::Array< T >::back |
Definition at line 812 of file Buffer.h.
References agxAssert, and agxAssert1.
| Array< T >::iterator agxData::Array< T >::begin |
| Array< T >::const_iterator agxData::Array< T >::begin |
| size_t agxData::Array< T >::commitResult | ( | const T2 & | vector | ) |
Definition at line 606 of file Buffer.h.
References agx::InvalidIndex.
| size_t agxData::Array< T >::commitResult | ( | const T2 & | vector, |
| agx::Index | sortIndex | ||
| ) |
Definition at line 596 of file Buffer.h.
References agx::InvalidIndex.
| size_t agxData::Array< T >::commitResult | ( | size_t | numElements, |
| const void * | localResult | ||
| ) |
Definition at line 587 of file Buffer.h.
References agx::InvalidIndex.
| size_t agxData::Array< T >::commitResult | ( | size_t | numElements, |
| const void * | localResult, | ||
| agx::Index | sortIndex | ||
| ) |
Definition at line 578 of file Buffer.h.
References agx::InvalidIndex.
| bool agxData::Array< T >::contains | ( | const T2 & | element | ) | const |
Definition at line 920 of file Buffer.h.
References agx::InvalidIndex.
| Array< T >::iterator agxData::Array< T >::end |
| Array< T >::const_iterator agxData::Array< T >::end |
| size_t agxData::Array< T >::find | ( | const T2 & | element | ) | const |
The index of the first occurrence of an element that is equal to the given element.
If there is no such element, then InvalidIndex is returned.
| element | The value to search for. |
Definition at line 908 of file Buffer.h.
References agx::InvalidIndex.
| T & agxData::Array< T >::front |
Definition at line 836 of file Buffer.h.
References agxAssert, and agxAssert1.
| const T & agxData::Array< T >::front |
Definition at line 828 of file Buffer.h.
References agxAssert, and agxAssert1.
| agx::GlobalResult * agxData::Array< T >::getGlobalResult |
| Array< T > agxData::Array< T >::operator[] | ( | agx::IndexRange32 | subRange | ) | const |
| T & agxData::Array< T >::operator[] | ( | size_t | index | ) |
Definition at line 845 of file Buffer.h.
References agxAssert1, and agxAssertN.
| const T & agxData::Array< T >::operator[] | ( | size_t | index | ) | const |
| T * agxData::Array< T >::ptr |
Definition at line 900 of file Buffer.h.
Referenced by agx::JacobianAccessorT< T >::setup().
| const T * agxData::Array< T >::ptr |
|
static |
Definition at line 744 of file Buffer.h.
References agxData::Data::m_ptr, and agxData::AbstractArray::m_range.
|
static |
Array creation helper method that creates an array covering the given memory area.
The created array will not have a back end Buffer object and is therefore invalid. The given memory area will be interpreted as an array of elements of type T.
| buffer | Memory area that the array should index into. |
| size | The length, in number of elements, that the array should cover. |
Definition at line 733 of file Buffer.h.
References agxData::Data::m_ptr, and agxData::AbstractArray::m_range.
Referenced by agxData::EntityStorage::getInstances().
| Array< T > agxData::Array< T >::slice | ( | agx::IndexRange32 | subRange | ) | const |
Definition at line 875 of file Buffer.h.
References agx::IndexRangeT< T >::begin(), and agx::IndexRangeT< T >::end().
|
static |