SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::core::collision::TDetectionOutputVector< CM1, CM2 > Class Template Reference

#include <DetectionOutput.h>

Generic description of a set of contact point between two specific collision models. More...

Inheritance diagram for sofa::core::collision::TDetectionOutputVector< CM1, CM2 >:

Detailed Description

template<class CM1, class CM2>
class sofa::core::collision::TDetectionOutputVector< CM1, CM2 >

Generic description of a set of contact point between two specific collision models.

Public Member Functions

 ~TDetectionOutputVector () override
 
void clear () override
 Clear the content of this vector. More...
 
unsigned int size () const override
 Current size (number of detected contacts) More...
 
- Public Member Functions inherited from sofa::core::collision::DetectionOutputVector
bool empty () const
 Test if the vector is empty. More...
 
virtual void release ()
 Delete this vector from memory once the contact pair is no longer active. More...
 
- Public Member Functions inherited from sofa::helper::vector< DetectionOutput >
 vector ()
 
 vector (size_type n)
 
 vector (const vector< DetectionOutput, MemoryManager > &v)
 
bool isHostValid () const
 
bool isDeviceValid (unsigned gpu) const
 
void clear ()
 
void operator= (const vector< DetectionOutput, MemoryManager > &v)
 
 ~vector ()
 
size_type size () const
 
size_type capacity () const
 
bool empty () const
 
void reserve (size_type s, size_type WARP_SIZE=MemoryManager::BSIZE)
 
void fastResize (size_type s, size_type WARP_SIZE=MemoryManager::BSIZE)
 resize the vector without calling constructors or destructors, and without synchronizing the device and host copy More...
 
void recreate (size_type s, size_type WARP_SIZE=MemoryManager::BSIZE)
 resize the vector discarding any old values, without calling constructors or destructors, and without synchronizing the device and host copy More...
 
void invalidateDevice ()
 
void invalidateHost ()
 
void memsetDevice (int v=0)
 
void memsetHost (int v=0)
 
void resize (size_type s, size_type WARP_SIZE=MemoryManager::BSIZE)
 
void swap (vector< DetectionOutput, MemoryManager > &v)
 
const device_pointer deviceReadAt (int i, int gpu=MemoryManager::getBufferDevice()) const
 
const device_pointer deviceRead (int gpu=MemoryManager::getBufferDevice()) const
 
device_pointer deviceWriteAt (int i, int gpu=MemoryManager::getBufferDevice())
 
device_pointer deviceWrite (int gpu=MemoryManager::getBufferDevice())
 
const DetectionOutputhostRead () const
 
DetectionOutputhostWrite ()
 
const DetectionOutputhostReadAt (int i) const
 
DetectionOutputhostWriteAt (int i)
 
GLuint bufferRead (bool create=false)
 Get the OpenGL Buffer Object ID for reading. More...
 
GLuint bufferWrite (bool create=false)
 Get the OpenGL Buffer Object ID for writing. More...
 
void push_back (const DetectionOutput &t)
 
void pop_back ()
 
const DetectionOutputoperator[] (size_type i) const
 
DetectionOutputoperator[] (size_type i)
 
const DetectionOutputdata () const
 
DetectionOutputdata ()
 
const DetectionOutputgetCached (size_type i) const
 
const DetectionOutputgetSingle (size_type i) const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
iterator erase (iterator position)
 
iterator insert (iterator position, const DetectionOutput &x)
 

Additional Inherited Members

- Protected Attributes inherited from sofa::helper::vector< DetectionOutput >
size_type vectorSize
 Current size of the vector. More...
 
size_type allocSize
 Allocated size on host. More...
 
size_type deviceVectorSize [MemoryManager::MAX_DEVICES]
 Initialized size on each device. More...
 
size_type deviceAllocSize [MemoryManager::MAX_DEVICES]
 Allocated size on each device. More...
 
device_pointer devicePointer [MemoryManager::MAX_DEVICES]
 Pointer to the data on the GPU side. More...
 
size_type clearSize
 when initializing missing device data, up to where entries should be set to zero ? More...
 
DetectionOutputhostPointer
 Pointer to the data on the CPU side. More...
 
int deviceIsValid
 True if the data on the GPU is currently valid (up to the given deviceVectorSize of each device, i.e. additionnal space may need to be allocated and/or initialized) More...
 
bool hostIsValid
 True if the data on the CPU is currently valid. More...
 
bool bufferIsRegistered
 True if the OpenGL buffer is registered with CUDA. More...
 
GLuint bufferObject
 Optionnal associated OpenGL buffer ID. More...
 
- Protected Member Functions inherited from sofa::core::collision::DetectionOutputVector
virtual ~DetectionOutputVector ()
 
- Protected Member Functions inherited from sofa::helper::vector< DetectionOutput >
void allocate (int d) const
 
void copyToHost () const
 
void copyToDevice (int d=0) const
 
void copyToHostSingle (size_type i) const
 
void checkIndex (size_type i) const
 
void registerBuffer () const
 
void mapBuffer () const
 
void unmapBuffer () const
 
void unregisterBuffer () const
 
void createBuffer ()
 

Constructor details

template<class CM1 , class CM2 >
sofa::core::collision::TDetectionOutputVector< CM1, CM2 >::~TDetectionOutputVector ( )
inlineoverride

Function details

template<class CM1 , class CM2 >
void sofa::core::collision::TDetectionOutputVector< CM1, CM2 >::clear ( )
inlineoverridevirtual

Clear the content of this vector.

Implements sofa::core::collision::DetectionOutputVector.

template<class CM1 , class CM2 >
unsigned int sofa::core::collision::TDetectionOutputVector< CM1, CM2 >::size ( ) const
inlineoverridevirtual

Current size (number of detected contacts)

Implements sofa::core::collision::DetectionOutputVector.