Commit 77f7a676 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

Put a method to access raw values directly in particles containers

parent 8e9039ad
......@@ -285,6 +285,21 @@ public:
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
ValueClass* getRawData(){
return reinterpret_cast<AttributeClass*>(positions[2] + allocatedParticles);
}
const ValueClass* getRawData() const {
return reinterpret_cast<AttributeClass*>(positions[2] + allocatedParticles);
}
int getLeadingRawData() const {
return allocatedParticles;
}
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
/** The size to send a leaf */
int getSavedSize() const{
return int(sizeof(nbParticles) + nbParticles * (3 * sizeof(FReal) + NbAttributesPerParticle * sizeof(AttributeClass)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment