#include "papi.h"
#include "ParticleState.h"
#include <iostream>
Go to the source code of this file.
Functions | |
PARTICLEDLL_API void | pColor (float red, float green, float blue, float alpha) |
PARTICLEDLL_API void | pColorD (const pDomain &cdom) |
PARTICLEDLL_API void | pColorD (const pDomain &cdom, const pDomain &adom) |
PARTICLEDLL_API void | pUpVec (const pVec &up) |
PARTICLEDLL_API void | pUpVecD (const pDomain &dom) |
PARTICLEDLL_API void | pVelocity (const pVec &v) |
PARTICLEDLL_API void | pVelocityD (const pDomain &dom) |
PARTICLEDLL_API void | pRotVelocity (const pVec &v) |
PARTICLEDLL_API void | pRotVelocityD (const pDomain &dom) |
PARTICLEDLL_API void | pVertexB (const pVec &v) |
PARTICLEDLL_API void | pVertexBD (const pDomain &dom) |
PARTICLEDLL_API void | pVertexBTracks (bool trackVertex) |
PARTICLEDLL_API void | pSize (const pVec &size) |
PARTICLEDLL_API void | pSizeD (const pDomain &dom) |
PARTICLEDLL_API void | pMass (float mass) |
PARTICLEDLL_API void | pStartingAge (float age, float sigma) |
PARTICLEDLL_API void | pTimeStep (float newDT) |
PARTICLEDLL_API int | pGenActionLists (int action_list_count) |
PARTICLEDLL_API void | pNewActionList (int action_list_num) |
PARTICLEDLL_API void | pEndActionList () |
PARTICLEDLL_API void | pDeleteActionLists (int action_list_num, int action_list_count) |
PARTICLEDLL_API void | pCallActionList (int action_list_num) |
PARTICLEDLL_API int | pGenParticleGroups (int p_group_count, size_t max_particles) |
PARTICLEDLL_API void | pDeleteParticleGroups (int p_group_num, int p_group_count) |
PARTICLEDLL_API void | pCurrentGroup (int p_group_num) |
PARTICLEDLL_API size_t | pSetMaxParticles (size_t max_count) |
PARTICLEDLL_API void | pCopyGroup (int p_src_group_num, size_t index, size_t copy_count) |
PARTICLEDLL_API size_t | pGetParticles (size_t index, size_t count, float *verts, float *color, float *vel, float *size, float *age) |
PARTICLEDLL_API size_t | pGetParticlePointer (float *&ptr, size_t &stride, size_t &pos3Ofs, size_t &posB3Ofs, size_t &size3Ofs, size_t &vel3Ofs, size_t &velB3Ofs, size_t &color3Ofs, size_t &alpha1Ofs, size_t &age1Ofs) |
PARTICLEDLL_API size_t | pGetGroupCount () |
PARTICLEDLL_API size_t | pGetMaxParticles () |
PARTICLEDLL_API void | pBirthCallback (P_PARTICLE_CALLBACK callback, void *data) |
PARTICLEDLL_API void | pDeathCallback (P_PARTICLE_CALLBACK callback, void *data) |
PARTICLEDLL_API void | pReset () |
PARTICLEDLL_API void | pSeed (unsigned int seed) |
PARTICLEDLL_API void pBirthCallback | ( | P_PARTICLE_CALLBACK | callback, | |
void * | data | |||
) |
Definition at line 546 of file other_api.cpp.
References _GetPState(), ParticleState::GetPGroup(), ParticleState::in_new_list, ParticleState::pgroup_id, and ParticleGroup::SetBirthCallback().
00547 { 00548 ParticleState &PS = _GetPState(); 00549 if(PS.in_new_list) 00550 return; // ERROR 00551 00552 PS.GetPGroup(PS.pgroup_id).SetBirthCallback(callback, data); 00553 }
PARTICLEDLL_API void pCallActionList | ( | int | action_list_num | ) |
Definition at line 249 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), PACallActionList::action_list_num, ParticleState::ALists, ParticleState::ExecuteActionList(), ParticleState::in_new_list, and ParticleState::SendAction().
00250 { 00251 ParticleState &PS = _GetPState(); 00252 00253 if(PS.in_new_list) { 00254 // Add this call as an action to the current list. 00255 PACallActionList *S = new PACallActionList; 00256 S->action_list_num = action_list_num; 00257 00258 PS.SendAction(S); 00259 } else { 00260 // Execute the specified action list. 00261 _PLock(); 00262 00263 if(action_list_num < 0 || action_list_num >= (int)PS.ALists.size()) 00264 return; // ERROR 00265 00266 ActionList &AList = PS.ALists[action_list_num]; 00267 00268 // Not sure it's safe to unlock here since AList can be accessed by another thread while 00269 // we're executing it, but we can't stay locked while doing all the actions or it's not parallel. 00270 _PUnLock(); 00271 00272 PS.ExecuteActionList(AList); 00273 } 00274 }
PARTICLEDLL_API void pColor | ( | float | red, | |
float | green, | |||
float | blue, | |||
float | alpha | |||
) |
Definition at line 36 of file other_api.cpp.
References _GetPState(), ParticleState::Alpha, and ParticleState::Color.
00037 { 00038 ParticleState &PS = _GetPState(); 00039 00040 delete PS.Color; 00041 delete PS.Alpha; 00042 PS.Color = new PDPoint(pVec(red, green, blue)); 00043 PS.Alpha = new PDPoint(pVec(alpha)); 00044 }
Definition at line 55 of file other_api.cpp.
References _GetPState(), ParticleState::Alpha, ParticleState::Color, and pDomain::copy().
00056 { 00057 ParticleState &PS = _GetPState(); 00058 00059 delete PS.Color; 00060 delete PS.Alpha; 00061 PS.Color = cdom.copy(); 00062 PS.Alpha = adom.copy(); 00063 }
PARTICLEDLL_API void pColorD | ( | const pDomain & | cdom | ) |
Definition at line 46 of file other_api.cpp.
References _GetPState(), ParticleState::Alpha, ParticleState::Color, and pDomain::copy().
Referenced by gSpark::Timestep().
00047 { 00048 ParticleState &PS = _GetPState(); 00049 delete PS.Color; 00050 delete PS.Alpha; 00051 PS.Color = cdom.copy(); 00052 PS.Alpha = new PDPoint(pVec(1)); 00053 }
PARTICLEDLL_API void pCopyGroup | ( | int | p_src_group_num, | |
size_t | index, | |||
size_t | copy_count | |||
) |
Definition at line 357 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleGroup::Add(), ParticleGroup::GetList(), ParticleGroup::GetMaxParticles(), ParticleState::GetPGroup(), ParticleState::in_new_list, ParticleState::pgroup_id, ParticleState::PGroups, and ParticleGroup::size().
00358 { 00359 ParticleState &PS = _GetPState(); 00360 00361 if(PS.in_new_list) 00362 return; // ERROR 00363 00364 _PLock(); 00365 00366 if(p_src_group_num < 0 || p_src_group_num >= (int)PS.PGroups.size()) 00367 return; // ERROR 00368 00369 ParticleGroup &srcgrp = PS.GetPGroup(p_src_group_num); 00370 00371 ParticleGroup &destgrp = PS.GetPGroup(PS.pgroup_id); 00372 00373 // Find out exactly how many to copy. 00374 size_t ccount = copy_count; 00375 if(ccount > srcgrp.size() - index) 00376 ccount = srcgrp.size() - index; 00377 if(ccount > destgrp.GetMaxParticles() - destgrp.size()) 00378 ccount = destgrp.GetMaxParticles() - destgrp.size(); 00379 00380 // useless test, can never be negative 00381 // if(ccount<0) 00382 // ccount = 0; 00383 00384 // Directly copy the particles to the current list. 00385 for(size_t i=0; i<ccount; i++) { 00386 // Is it bad to call a birth callback while locked? 00387 destgrp.Add(srcgrp.GetList()[index+i]); 00388 } 00389 00390 _PUnLock(); 00391 }
PARTICLEDLL_API void pCurrentGroup | ( | int | p_group_num | ) |
Definition at line 321 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::in_new_list, ParticleState::pgroup_id, and ParticleState::PGroups.
Referenced by gSpark::gSpark(), gSpark::Render(), and gSpark::Timestep().
00322 { 00323 ParticleState &PS = _GetPState(); 00324 00325 if(PS.in_new_list) 00326 return; // ERROR 00327 00328 _PLock(); 00329 00330 if(p_group_num < 0 || p_group_num >= (int)PS.PGroups.size()) 00331 return; // ERROR 00332 00333 _PUnLock(); 00334 00335 PS.pgroup_id = p_group_num; 00336 }
PARTICLEDLL_API void pDeathCallback | ( | P_PARTICLE_CALLBACK | callback, | |
void * | data | |||
) |
Definition at line 555 of file other_api.cpp.
References _GetPState(), ParticleState::GetPGroup(), ParticleState::in_new_list, ParticleState::pgroup_id, and ParticleGroup::SetDeathCallback().
00556 { 00557 ParticleState &PS = _GetPState(); 00558 if(PS.in_new_list) 00559 return; // ERROR 00560 00561 PS.GetPGroup(PS.pgroup_id).SetDeathCallback(callback, data); 00562 }
PARTICLEDLL_API void pDeleteActionLists | ( | int | action_list_num, | |
int | action_list_count | |||
) |
Definition at line 226 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::ALists, and ParticleState::in_new_list.
00227 { 00228 ParticleState &PS = _GetPState(); 00229 00230 if(PS.in_new_list) 00231 return; // ERROR 00232 00233 if(action_list_num < 0) 00234 return; // ERROR 00235 00236 _PLock(); 00237 00238 if(action_list_num + action_list_count > (int)PS.ALists.size()) 00239 return; // ERROR 00240 00241 for(int i = action_list_num; i < action_list_num + action_list_count; i++) { 00242 PS.ALists[i].resize(0); 00243 // XXX Does that delete the actions? 00244 } 00245 00246 _PUnLock(); 00247 }
PARTICLEDLL_API void pDeleteParticleGroups | ( | int | p_group_num, | |
int | p_group_count | |||
) |
Definition at line 300 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::ALists, and ParticleState::PGroups.
Referenced by gSpark::Timestep().
00301 { 00302 ParticleState &PS = _GetPState(); 00303 00304 if(p_group_num < 0) 00305 return; // ERROR 00306 00307 _PLock(); 00308 00309 if(p_group_num + p_group_count > (int)PS.ALists.size()) 00310 return; // ERROR 00311 00312 for(int i = p_group_num; i < p_group_num + p_group_count; i++) { 00313 PS.PGroups[i].SetMaxParticles(0); 00314 PS.PGroups[i].GetList().resize(0); 00315 } 00316 00317 _PUnLock(); 00318 }
PARTICLEDLL_API void pEndActionList | ( | ) |
Definition at line 214 of file other_api.cpp.
References _GetPState(), ParticleState::alist_id, and ParticleState::in_new_list.
00215 { 00216 ParticleState &PS = _GetPState(); 00217 00218 if(!PS.in_new_list) 00219 return; // ERROR 00220 00221 PS.in_new_list = false; 00222 00223 PS.alist_id = -1; 00224 }
PARTICLEDLL_API int pGenActionLists | ( | int | action_list_count | ) |
Definition at line 178 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::GenerateALists(), and ParticleState::in_new_list.
00179 { 00180 ParticleState &PS = _GetPState(); 00181 00182 if(PS.in_new_list) 00183 return -1; // ERROR 00184 00185 _PLock(); 00186 00187 int ind = PS.GenerateALists(action_list_count); 00188 00189 _PUnLock(); 00190 00191 return ind; 00192 }
PARTICLEDLL_API int pGenParticleGroups | ( | int | p_group_count, | |
size_t | max_particles | |||
) |
Definition at line 280 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::GeneratePGroups(), ParticleState::in_new_list, and ParticleState::PGroups.
Referenced by gSpark::gSpark().
00281 { 00282 ParticleState &PS = _GetPState(); 00283 00284 if(PS.in_new_list) 00285 return -1; // ERROR 00286 00287 _PLock(); 00288 00289 int ind = PS.GeneratePGroups(p_group_count); 00290 00291 for(int i = ind; i < ind + p_group_count; i++) { 00292 PS.PGroups[i].SetMaxParticles(max_particles); 00293 } 00294 00295 _PUnLock(); 00296 00297 return ind; 00298 }
PARTICLEDLL_API size_t pGetGroupCount | ( | ) |
Definition at line 507 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::GetPGroup(), ParticleState::in_new_list, ParticleState::pgroup_id, and ParticleState::PGroups.
Referenced by gSpark::Render(), and gSpark::Timestep().
00508 { 00509 ParticleState &PS = _GetPState(); 00510 00511 if(PS.in_new_list) 00512 return 0; // ERROR 00513 00514 PS.GetPGroup(PS.pgroup_id); 00515 _PLock(); 00516 00517 if(PS.pgroup_id < 0 || PS.pgroup_id >= (int)PS.PGroups.size()) 00518 return static_cast< size_t >( -2 ); // ERROR 00519 00520 _PUnLock(); 00521 00522 return PS.PGroups[PS.pgroup_id].size(); 00523 }
PARTICLEDLL_API size_t pGetMaxParticles | ( | ) |
Definition at line 526 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::in_new_list, ParticleState::pgroup_id, and ParticleState::PGroups.
00527 { 00528 ParticleState &PS = _GetPState(); 00529 00530 if(PS.in_new_list) 00531 return 0; // ERROR 00532 00533 _PLock(); 00534 00535 if(PS.pgroup_id < 0 || PS.pgroup_id >= (int)PS.PGroups.size()) 00536 return static_cast< size_t >( -2 ); // ERROR 00537 00538 _PUnLock(); 00539 00540 return PS.PGroups[PS.pgroup_id].GetMaxParticles(); 00541 }
PARTICLEDLL_API size_t pGetParticlePointer | ( | float *& | ptr, | |
size_t & | stride, | |||
size_t & | pos3Ofs, | |||
size_t & | posB3Ofs, | |||
size_t & | size3Ofs, | |||
size_t & | vel3Ofs, | |||
size_t & | velB3Ofs, | |||
size_t & | color3Ofs, | |||
size_t & | alpha1Ofs, | |||
size_t & | age1Ofs | |||
) |
Definition at line 470 of file other_api.cpp.
References _GetPState(), Particle::age, Particle::alpha, ParticleGroup::begin(), Particle::color, ParticleState::in_new_list, ParticleState::pgroup_id, ParticleState::PGroups, Particle::pos, Particle::posB, Particle::size, ParticleGroup::size(), Particle::vel, Particle::velB, and pVec::x().
Referenced by gSpark::Render().
00473 { 00474 ParticleState &PS = _GetPState(); 00475 00476 if(PS.in_new_list) 00477 return static_cast< size_t >( -1 ); // ERROR 00478 00479 ParticleGroup &pg = PS.PGroups[PS.pgroup_id]; 00480 00481 if(pg.size() < 1) { 00482 return static_cast< size_t >( -4 ); // ERROR index out of bounds. 00483 } 00484 00485 ParticleList::iterator it = pg.begin(); 00486 Particle *p0 = &(*it); 00487 ++it; 00488 Particle *p1 = &(*it); 00489 float *fp0 = (float *)p0; 00490 float *fp1 = (float *)p1; 00491 00492 ptr = (float *)p0; 00493 stride = fp1 - fp0; 00494 pos3Ofs = (float *)&(p0->pos.x()) - fp0; 00495 posB3Ofs = (float *)&(p0->posB.x()) - fp0; 00496 size3Ofs = (float *)&(p0->size.x()) - fp0; 00497 vel3Ofs = (float *)&(p0->vel.x()) - fp0; 00498 velB3Ofs = (float *)&(p0->velB.x()) - fp0; 00499 color3Ofs = (float *)&(p0->color.x()) - fp0; 00500 alpha1Ofs = (float *)&(p0->alpha) - fp0; 00501 age1Ofs = (float *)&(p0->age) - fp0; 00502 00503 return pg.size(); 00504 }
PARTICLEDLL_API size_t pGetParticles | ( | size_t | index, | |
size_t | count, | |||
float * | verts, | |||
float * | color, | |||
float * | vel, | |||
float * | size, | |||
float * | age | |||
) |
Definition at line 394 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), Particle::age, ai, Particle::alpha, Particle::color, ParticleGroup::GetList(), ParticleState::in_new_list, ParticleState::pgroup_id, ParticleState::PGroups, Particle::pos, si, Particle::size, ParticleGroup::size(), Particle::vel, pVec::x(), pVec::y(), and pVec::z().
00396 { 00397 ParticleState &PS = _GetPState(); 00398 00399 // XXX I should think about whether color means color3, color4, or what. 00400 // For now, it means color4. 00401 00402 if(PS.in_new_list) 00403 return static_cast< size_t >( -1 ); // ERROR 00404 00405 _PLock(); 00406 00407 if(PS.pgroup_id < 0 || PS.pgroup_id >= (int)PS.PGroups.size()) 00408 return static_cast< size_t >( -2 ); // ERROR 00409 00410 // useless test, both are never negative 00411 // if(index < 0 || count < 0) 00412 // return static_cast< size_t >( -3 ); // ERROR 00413 00414 ParticleGroup &pg = PS.PGroups[PS.pgroup_id]; 00415 00416 _PUnLock(); 00417 00418 if(index + count > pg.size()) { 00419 count = pg.size() - index; 00420 if(count <= 0) 00421 return static_cast< size_t >( -4 ); // ERROR index out of bounds. 00422 } 00423 00424 int vi = 0, ci = 0, li = 0, si = 0, ai = 0; 00425 00426 // This should be optimized. 00427 for(size_t i=index; i<index+count; i++) { 00428 const Particle &m = pg.GetList()[i]; 00429 00430 if(verts) { 00431 verts[vi++] = m.pos.x(); 00432 verts[vi++] = m.pos.y(); 00433 verts[vi++] = m.pos.z(); 00434 } 00435 00436 if(color) { 00437 color[ci++] = m.color.x(); 00438 color[ci++] = m.color.y(); 00439 color[ci++] = m.color.z(); 00440 color[ci++] = m.alpha; 00441 } 00442 00443 if(vel) { 00444 vel[li++] = m.vel.x(); 00445 vel[li++] = m.vel.y(); 00446 vel[li++] = m.vel.z(); 00447 } 00448 00449 if(size) { 00450 size[si++] = m.size.x(); 00451 size[si++] = m.size.y(); 00452 size[si++] = m.size.z(); 00453 } 00454 00455 if(age) { 00456 age[ai++] = m.age; 00457 } 00458 } 00459 00460 return count; 00461 }
PARTICLEDLL_API void pMass | ( | float | mass | ) |
Definition at line 153 of file other_api.cpp.
References _GetPState(), and ParticleState::Mass.
00154 { 00155 ParticleState &PS = _GetPState(); 00156 00157 PS.Mass = mass; 00158 }
PARTICLEDLL_API void pNewActionList | ( | int | action_list_num | ) |
Definition at line 194 of file other_api.cpp.
References _GetPState(), _PLock(), _PUnLock(), ParticleState::alist_id, ParticleState::ALists, and ParticleState::in_new_list.
00195 { 00196 ParticleState &PS = _GetPState(); 00197 00198 if(PS.in_new_list) 00199 return; // ERROR 00200 00201 _PLock(); 00202 00203 PS.alist_id = action_list_num; 00204 if(PS.alist_id < 0 || PS.alist_id >= (int)PS.ALists.size()) 00205 return; // ERROR 00206 00207 PS.in_new_list = true; 00208 PS.ALists[PS.alist_id].resize(0); // Remove any old actions 00209 // XXX Does that delete the actions? 00210 00211 _PUnLock(); 00212 }
PARTICLEDLL_API void pReset | ( | ) |
Definition at line 564 of file other_api.cpp.
References _GetPState(), ParticleGroup::GetList(), ParticleState::GetPGroup(), ParticleState::in_new_list, and ParticleState::pgroup_id.
00565 { 00566 ParticleState &PS = _GetPState(); 00567 if(PS.in_new_list) 00568 return; // ERROR 00569 00570 PS.GetPGroup(PS.pgroup_id).GetList().clear(); 00571 }
PARTICLEDLL_API void pRotVelocity | ( | const pVec & | v | ) |
Definition at line 97 of file other_api.cpp.
References _GetPState(), and ParticleState::RotVel.
00098 { 00099 ParticleState &PS = _GetPState(); 00100 00101 delete PS.RotVel; 00102 PS.RotVel = new PDPoint(v); 00103 }
PARTICLEDLL_API void pRotVelocityD | ( | const pDomain & | dom | ) |
Definition at line 105 of file other_api.cpp.
References _GetPState(), pDomain::copy(), and ParticleState::RotVel.
00106 { 00107 ParticleState &PS = _GetPState(); 00108 00109 delete PS.RotVel; 00110 PS.RotVel = dom.copy(); 00111 }
PARTICLEDLL_API void pSeed | ( | unsigned int | seed | ) |
Definition at line 573 of file other_api.cpp.
References pSRandf.
00574 { 00575 pSRandf(seed); 00576 }
PARTICLEDLL_API size_t pSetMaxParticles | ( | size_t | max_count | ) |
Definition at line 339 of file other_api.cpp.
References _GetPState(), ParticleState::GetPGroup(), ParticleState::in_new_list, ParticleState::pgroup_id, and ParticleGroup::SetMaxParticles().
00340 { 00341 ParticleState &PS = _GetPState(); 00342 00343 if(PS.in_new_list) 00344 return 0; // ERROR 00345 00346 // useless test, can never be negative 00347 // if(max_count < 0) 00348 // return 0; // ERROR 00349 00350 // This can kill them and call their death callback. 00351 PS.GetPGroup(PS.pgroup_id).SetMaxParticles(max_count); 00352 00353 return max_count; 00354 }
PARTICLEDLL_API void pSize | ( | const pVec & | size | ) |
Definition at line 137 of file other_api.cpp.
References _GetPState(), and ParticleState::Size.
Referenced by gSpark::Timestep().
00138 { 00139 ParticleState &PS = _GetPState(); 00140 00141 delete PS.Size; 00142 PS.Size = new PDPoint(size); 00143 }
PARTICLEDLL_API void pSizeD | ( | const pDomain & | dom | ) |
Definition at line 145 of file other_api.cpp.
References _GetPState(), pDomain::copy(), and ParticleState::Size.
00146 { 00147 ParticleState &PS = _GetPState(); 00148 00149 delete PS.Size; 00150 PS.Size = dom.copy(); 00151 }
PARTICLEDLL_API void pStartingAge | ( | float | age, | |
float | sigma | |||
) |
Definition at line 160 of file other_api.cpp.
References _GetPState(), ParticleState::Age, and ParticleState::AgeSigma.
00161 { 00162 ParticleState &PS = _GetPState(); 00163 00164 PS.Age = age; 00165 PS.AgeSigma = sigma; 00166 }
PARTICLEDLL_API void pTimeStep | ( | float | newDT | ) |
Definition at line 168 of file other_api.cpp.
References _GetPState(), and ParticleState::dt.
00169 { 00170 ParticleState &PS = _GetPState(); 00171 00172 PS.dt = newDT; 00173 }
PARTICLEDLL_API void pUpVec | ( | const pVec & | up | ) |
Definition at line 65 of file other_api.cpp.
References _GetPState(), and ParticleState::Up.
00066 { 00067 ParticleState &PS = _GetPState(); 00068 00069 delete PS.Up; 00070 PS.Up = new PDPoint(up); 00071 }
PARTICLEDLL_API void pUpVecD | ( | const pDomain & | dom | ) |
Definition at line 73 of file other_api.cpp.
References _GetPState(), pDomain::copy(), and ParticleState::Up.
00074 { 00075 ParticleState &PS = _GetPState(); 00076 00077 delete PS.Up; 00078 PS.Up = dom.copy(); 00079 }
PARTICLEDLL_API void pVelocity | ( | const pVec & | v | ) |
Definition at line 81 of file other_api.cpp.
References _GetPState(), and ParticleState::Vel.
00082 { 00083 ParticleState &PS = _GetPState(); 00084 00085 delete PS.Vel; 00086 PS.Vel = new PDPoint(v); 00087 }
PARTICLEDLL_API void pVelocityD | ( | const pDomain & | dom | ) |
Definition at line 89 of file other_api.cpp.
References _GetPState(), pDomain::copy(), and ParticleState::Vel.
Referenced by gSpark::Timestep().
00090 { 00091 ParticleState &PS = _GetPState(); 00092 00093 delete PS.Vel; 00094 PS.Vel = dom.copy(); 00095 }
PARTICLEDLL_API void pVertexB | ( | const pVec & | v | ) |
Definition at line 113 of file other_api.cpp.
References _GetPState(), and ParticleState::VertexB.
00114 { 00115 ParticleState &PS = _GetPState(); 00116 00117 delete PS.VertexB; 00118 PS.VertexB = new PDPoint(v); 00119 }
PARTICLEDLL_API void pVertexBD | ( | const pDomain & | dom | ) |
Definition at line 121 of file other_api.cpp.
References _GetPState(), pDomain::copy(), and ParticleState::VertexB.
00122 { 00123 ParticleState &PS = _GetPState(); 00124 00125 delete PS.VertexB; 00126 PS.VertexB = dom.copy(); 00127 }
PARTICLEDLL_API void pVertexBTracks | ( | bool | trackVertex | ) |
Definition at line 130 of file other_api.cpp.
References _GetPState(), and ParticleState::vertexB_tracks.
00131 { 00132 ParticleState &PS = _GetPState(); 00133 00134 PS.vertexB_tracks = trackVertex; 00135 }