#include "papi.h"
#include "ParticleState.h"
Go to the source code of this file.
Functions | |
PARTICLEDLL_API void | pAvoid (float magnitude, float epsilon, float look_ahead, const pDomain &dom) |
PARTICLEDLL_API void | pBounce (float friction, float resilience, float cutoff, const pDomain &dom) |
PARTICLEDLL_API void | pCopyVertexB (bool copy_pos, bool copy_vel) |
PARTICLEDLL_API void | pDamping (const pVec &damping, float vlow, float vhigh) |
PARTICLEDLL_API void | pRotDamping (const pVec &damping, float vlow, float vhigh) |
PARTICLEDLL_API void | pExplosion (const pVec ¢er, float velocity, float magnitude, float stdev, float epsilon, float age) |
PARTICLEDLL_API void | pFollow (float magnitude, float epsilon, float max_radius) |
PARTICLEDLL_API void | pFountain () |
PARTICLEDLL_API void | pGravitate (float magnitude, float epsilon, float max_radius) |
PARTICLEDLL_API void | pGravity (const pVec &dir) |
PARTICLEDLL_API void | pJet (const pDomain &dom, const pDomain &accel) |
PARTICLEDLL_API void | pKillOld (float age_limit, bool kill_less_than) |
PARTICLEDLL_API void | pMatchVelocity (float magnitude, float epsilon, float max_radius) |
PARTICLEDLL_API void | pMatchRotVelocity (float magnitude, float epsilon, float max_radius) |
PARTICLEDLL_API void | pMove () |
PARTICLEDLL_API void | pOrbitLine (const pVec &p, const pVec &axis, float magnitude, float epsilon, float max_radius) |
PARTICLEDLL_API void | pOrbitPoint (const pVec ¢er, float magnitude, float epsilon, float max_radius) |
PARTICLEDLL_API void | pRandomAccel (const pDomain &dom) |
PARTICLEDLL_API void | pRandomDisplace (const pDomain &dom) |
PARTICLEDLL_API void | pRandomVelocity (const pDomain &dom) |
PARTICLEDLL_API void | pRandomRotVelocity (const pDomain &dom) |
PARTICLEDLL_API void | pRestore (float time_left, bool vel, bool rvel) |
PARTICLEDLL_API void | pSink (bool kill_inside, const pDomain &dom) |
PARTICLEDLL_API void | pSinkVelocity (bool kill_inside, const pDomain &dom) |
PARTICLEDLL_API void | pSort (const pVec &eye, const pVec &look) |
PARTICLEDLL_API void | pSource (float particle_rate, const pDomain &dom) |
PARTICLEDLL_API void | pSpeedLimit (float min_speed, float max_speed) |
PARTICLEDLL_API void | pTargetColor (const pVec &color, float alpha, float scale) |
PARTICLEDLL_API void | pTargetSize (const pVec &size, const pVec &scale) |
PARTICLEDLL_API void | pTargetVelocity (const pVec &vel, float scale) |
PARTICLEDLL_API void | pTargetRotVelocity (const pVec &vel, float scale) |
PARTICLEDLL_API void | pVertex (const pVec &pos, long data) |
PARTICLEDLL_API void | pVortex (const pVec &tip, const pVec &axis, float magnitude, float tightnessExponent, float rotSpeed, float epsilon, float max_radius) |
PARTICLEDLL_API void pAvoid | ( | float | magnitude, | |
float | epsilon, | |||
float | look_ahead, | |||
const pDomain & | dom | |||
) |
Definition at line 12 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PAAvoid::epsilon, PAAvoid::look_ahead, PAAvoid::magnitude, PAAvoid::position, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00013 { 00014 PAAvoid *S = new PAAvoid(); 00015 00016 S->position = dom.copy(); 00017 S->magnitude = magnitude; 00018 S->epsilon = epsilon; 00019 S->look_ahead = look_ahead; 00020 00021 S->SetKillsParticles(false); 00022 S->SetDoNotSegment(false); 00023 00024 _GetPState().SendAction(S); 00025 }
PARTICLEDLL_API void pBounce | ( | float | friction, | |
float | resilience, | |||
float | cutoff, | |||
const pDomain & | dom | |||
) |
Definition at line 27 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PABounce::cutoffSqr, fsqr(), PABounce::oneMinusFriction, PABounce::position, PABounce::resilience, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
Referenced by gSpark::Timestep().
00028 { 00029 PABounce *S = new PABounce(); 00030 00031 S->position = dom.copy(); 00032 S->oneMinusFriction = 1.0f - friction; 00033 S->resilience = resilience; 00034 S->cutoffSqr = fsqr(cutoff); 00035 00036 S->SetKillsParticles(false); 00037 S->SetDoNotSegment(false); 00038 00039 _GetPState().SendAction(S); 00040 }
PARTICLEDLL_API void pCopyVertexB | ( | bool | copy_pos, | |
bool | copy_vel | |||
) |
Definition at line 42 of file action_api.cpp.
References _GetPState(), PACopyVertexB::copy_pos, PACopyVertexB::copy_vel, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00043 { 00044 PACopyVertexB *S = new PACopyVertexB; 00045 00046 S->copy_pos = copy_pos; 00047 S->copy_vel = copy_vel; 00048 00049 S->SetKillsParticles(false); 00050 S->SetDoNotSegment(false); 00051 00052 _GetPState().SendAction(S); 00053 }
PARTICLEDLL_API void pDamping | ( | const pVec & | damping, | |
float | vlow, | |||
float | vhigh | |||
) |
Definition at line 55 of file action_api.cpp.
References _GetPState(), PADamping::damping, fsqr(), ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), PADamping::vhighSqr, and PADamping::vlowSqr.
00057 { 00058 PADamping *S = new PADamping; 00059 00060 S->damping = damping; 00061 S->vlowSqr = fsqr(vlow); 00062 S->vhighSqr = fsqr(vhigh); 00063 00064 S->SetKillsParticles(false); 00065 S->SetDoNotSegment(false); 00066 00067 _GetPState().SendAction(S); 00068 }
PARTICLEDLL_API void pExplosion | ( | const pVec & | center, | |
float | velocity, | |||
float | magnitude, | |||
float | stdev, | |||
float | epsilon, | |||
float | age | |||
) |
Definition at line 85 of file action_api.cpp.
References _GetPState(), PAExplosion::age, PAExplosion::center, PAExplosion::epsilon, PAExplosion::magnitude, P_EPS, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), PAExplosion::stdev, and PAExplosion::velocity.
00087 { 00088 PAExplosion *S = new PAExplosion; 00089 00090 S->center = center; 00091 S->velocity = velocity; 00092 S->magnitude = magnitude; 00093 S->stdev = stdev; 00094 S->epsilon = epsilon; 00095 S->age = age; 00096 00097 if(S->epsilon < 0.0f) 00098 S->epsilon = P_EPS; 00099 00100 S->SetKillsParticles(false); 00101 S->SetDoNotSegment(false); 00102 00103 _GetPState().SendAction(S); 00104 }
PARTICLEDLL_API void pFollow | ( | float | magnitude, | |
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 106 of file action_api.cpp.
References _GetPState(), PAFollow::epsilon, PAFollow::magnitude, PAFollow::max_radius, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00107 { 00108 PAFollow *S = new PAFollow; 00109 00110 S->magnitude = magnitude; 00111 S->epsilon = epsilon; 00112 S->max_radius = max_radius; 00113 00114 S->SetKillsParticles(false); 00115 S->SetDoNotSegment(true); 00116 00117 _GetPState().SendAction(S); 00118 }
PARTICLEDLL_API void pFountain | ( | ) |
Definition at line 120 of file action_api.cpp.
References _GetPState(), ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00121 { 00122 PAFollow *S = new PAFollow; 00123 00124 S->SetKillsParticles(true); 00125 S->SetDoNotSegment(true); 00126 00127 _GetPState().SendAction(S); 00128 }
PARTICLEDLL_API void pGravitate | ( | float | magnitude, | |
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 130 of file action_api.cpp.
References _GetPState(), PAGravitate::epsilon, PAGravitate::magnitude, PAGravitate::max_radius, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00131 { 00132 PAGravitate *S = new PAGravitate; 00133 00134 S->magnitude = magnitude; 00135 S->epsilon = epsilon; 00136 S->max_radius = max_radius; 00137 00138 S->SetKillsParticles(false); 00139 S->SetDoNotSegment(true); 00140 00141 _GetPState().SendAction(S); 00142 }
PARTICLEDLL_API void pGravity | ( | const pVec & | dir | ) |
Definition at line 144 of file action_api.cpp.
References _GetPState(), PAGravity::direction, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
Referenced by gSpark::Timestep().
00145 { 00146 PAGravity *S = new PAGravity; 00147 00148 S->direction = dir; 00149 00150 S->SetKillsParticles(false); 00151 S->SetDoNotSegment(false); 00152 00153 _GetPState().SendAction(S); 00154 }
Definition at line 156 of file action_api.cpp.
References _GetPState(), PAJet::acc, pDomain::copy(), PAJet::dom, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00157 { 00158 // ParticleState &PS = _GetPState(); 00159 00160 PAJet *S = new PAJet(); 00161 00162 S->dom = dom.copy(); 00163 S->acc = accel.copy(); 00164 00165 S->SetKillsParticles(false); 00166 S->SetDoNotSegment(false); 00167 00168 _GetPState().SendAction(S); 00169 }
PARTICLEDLL_API void pKillOld | ( | float | age_limit, | |
bool | kill_less_than | |||
) |
Definition at line 171 of file action_api.cpp.
References _GetPState(), PAKillOld::age_limit, PAKillOld::kill_less_than, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
Referenced by gSpark::Timestep().
00172 { 00173 PAKillOld *S = new PAKillOld; 00174 00175 S->age_limit = age_limit; 00176 S->kill_less_than = kill_less_than; 00177 00178 S->SetKillsParticles(true); 00179 S->SetDoNotSegment(false); 00180 00181 _GetPState().SendAction(S); 00182 }
PARTICLEDLL_API void pMatchRotVelocity | ( | float | magnitude, | |
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 198 of file action_api.cpp.
References _GetPState(), PAMatchRotVelocity::epsilon, PAMatchRotVelocity::magnitude, PAMatchRotVelocity::max_radius, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00199 { 00200 PAMatchRotVelocity *S = new PAMatchRotVelocity; 00201 00202 S->magnitude = magnitude; 00203 S->epsilon = epsilon; 00204 S->max_radius = max_radius; 00205 00206 S->SetKillsParticles(false); 00207 S->SetDoNotSegment(true); 00208 00209 _GetPState().SendAction(S); 00210 }
PARTICLEDLL_API void pMatchVelocity | ( | float | magnitude, | |
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 184 of file action_api.cpp.
References _GetPState(), PAMatchVelocity::epsilon, PAMatchVelocity::magnitude, PAMatchVelocity::max_radius, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00185 { 00186 PAMatchVelocity *S = new PAMatchVelocity; 00187 00188 S->magnitude = magnitude; 00189 S->epsilon = epsilon; 00190 S->max_radius = max_radius; 00191 00192 S->SetKillsParticles(false); 00193 S->SetDoNotSegment(true); 00194 00195 _GetPState().SendAction(S); 00196 }
PARTICLEDLL_API void pMove | ( | ) |
Definition at line 212 of file action_api.cpp.
References _GetPState(), ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
Referenced by gSpark::Timestep().
00213 { 00214 PAMove *S = new PAMove; 00215 00216 S->SetKillsParticles(false); 00217 S->SetDoNotSegment(false); 00218 00219 _GetPState().SendAction(S); 00220 }
PARTICLEDLL_API void pOrbitLine | ( | const pVec & | p, | |
const pVec & | axis, | |||
float | magnitude, | |||
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 222 of file action_api.cpp.
References _GetPState(), PAOrbitLine::axis, PAOrbitLine::epsilon, PAOrbitLine::magnitude, PAOrbitLine::max_radius, pVec::normalize(), PAOrbitLine::p, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00224 { 00225 PAOrbitLine *S = new PAOrbitLine; 00226 00227 S->p = p; 00228 S->axis = axis; 00229 S->axis.normalize(); 00230 S->magnitude = magnitude; 00231 S->epsilon = epsilon; 00232 S->max_radius = max_radius; 00233 00234 S->SetKillsParticles(false); 00235 S->SetDoNotSegment(false); 00236 00237 _GetPState().SendAction(S); 00238 }
PARTICLEDLL_API void pOrbitPoint | ( | const pVec & | center, | |
float | magnitude, | |||
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 240 of file action_api.cpp.
References _GetPState(), PAOrbitPoint::center, PAOrbitPoint::epsilon, PAOrbitPoint::magnitude, PAOrbitPoint::max_radius, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00241 { 00242 PAOrbitPoint *S = new PAOrbitPoint; 00243 00244 S->center = center; 00245 S->magnitude = magnitude; 00246 S->epsilon = epsilon; 00247 S->max_radius = max_radius; 00248 00249 S->SetKillsParticles(false); 00250 S->SetDoNotSegment(false); 00251 00252 _GetPState().SendAction(S); 00253 }
PARTICLEDLL_API void pRandomAccel | ( | const pDomain & | dom | ) |
Definition at line 255 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PARandomAccel::gen_acc, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00256 { 00257 PARandomAccel *S = new PARandomAccel(); 00258 00259 S->gen_acc = dom.copy(); 00260 S->SetKillsParticles(false); 00261 S->SetDoNotSegment(false); 00262 00263 _GetPState().SendAction(S); 00264 }
PARTICLEDLL_API void pRandomDisplace | ( | const pDomain & | dom | ) |
Definition at line 266 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PARandomDisplace::gen_disp, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00267 { 00268 PARandomDisplace *S = new PARandomDisplace(); 00269 00270 S->gen_disp = dom.copy(); 00271 S->SetKillsParticles(false); 00272 S->SetDoNotSegment(false); 00273 00274 _GetPState().SendAction(S); 00275 }
PARTICLEDLL_API void pRandomRotVelocity | ( | const pDomain & | dom | ) |
Definition at line 288 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PARandomRotVelocity::gen_vel, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00289 { 00290 PARandomRotVelocity *S = new PARandomRotVelocity(); 00291 00292 S->gen_vel = dom.copy(); 00293 S->SetKillsParticles(false); 00294 S->SetDoNotSegment(false); 00295 00296 _GetPState().SendAction(S); 00297 }
PARTICLEDLL_API void pRandomVelocity | ( | const pDomain & | dom | ) |
Definition at line 277 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PARandomVelocity::gen_vel, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00278 { 00279 PARandomVelocity *S = new PARandomVelocity(); 00280 00281 S->gen_vel = dom.copy(); 00282 S->SetKillsParticles(false); 00283 S->SetDoNotSegment(false); 00284 00285 _GetPState().SendAction(S); 00286 }
PARTICLEDLL_API void pRestore | ( | float | time_left, | |
bool | vel, | |||
bool | rvel | |||
) |
Definition at line 299 of file action_api.cpp.
References _GetPState(), PARestore::restore_rvelocity, PARestore::restore_velocity, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), and PARestore::time_left.
00300 { 00301 PARestore *S = new PARestore; 00302 00303 S->time_left = time_left; 00304 S->restore_velocity = vel; 00305 S->restore_rvelocity = rvel; 00306 00307 S->SetKillsParticles(false); 00308 S->SetDoNotSegment(false); 00309 00310 _GetPState().SendAction(S); 00311 }
PARTICLEDLL_API void pRotDamping | ( | const pVec & | damping, | |
float | vlow, | |||
float | vhigh | |||
) |
Definition at line 70 of file action_api.cpp.
References _GetPState(), PADamping::damping, fsqr(), ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), PADamping::vhighSqr, and PADamping::vlowSqr.
00072 { 00073 PADamping *S = new PADamping; 00074 00075 S->damping = damping; 00076 S->vlowSqr = fsqr(vlow); 00077 S->vhighSqr = fsqr(vhigh); 00078 00079 S->SetKillsParticles(false); 00080 S->SetDoNotSegment(false); 00081 00082 _GetPState().SendAction(S); 00083 }
PARTICLEDLL_API void pSink | ( | bool | kill_inside, | |
const pDomain & | dom | |||
) |
Definition at line 313 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PASink::kill_inside, PASink::position, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
Referenced by gSpark::Timestep().
00314 { 00315 PASink *S = new PASink(); 00316 00317 S->position = dom.copy(); 00318 S->kill_inside = kill_inside; 00319 00320 S->SetKillsParticles(true); 00321 S->SetDoNotSegment(false); 00322 00323 _GetPState().SendAction(S); 00324 }
PARTICLEDLL_API void pSinkVelocity | ( | bool | kill_inside, | |
const pDomain & | dom | |||
) |
Definition at line 326 of file action_api.cpp.
References _GetPState(), pDomain::copy(), PASinkVelocity::kill_inside, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), and PASinkVelocity::velocity.
00327 { 00328 PASinkVelocity *S = new PASinkVelocity(); 00329 00330 S->velocity = dom.copy(); 00331 S->kill_inside = kill_inside; 00332 00333 S->SetKillsParticles(true); 00334 S->SetDoNotSegment(false); 00335 00336 _GetPState().SendAction(S); 00337 }
Definition at line 339 of file action_api.cpp.
References _GetPState(), PASort::Eye, PASort::Look, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00340 { 00341 PASort *S = new PASort; 00342 00343 S->Eye = eye; 00344 S->Look= look; 00345 00346 S->SetKillsParticles(false); 00347 S->SetDoNotSegment(true); // WARNING: Particles aren't a function of other particles, but since it can screw up the working set thing, I'm setting it true. 00348 00349 _GetPState().SendAction(S); 00350 }
PARTICLEDLL_API void pSource | ( | float | particle_rate, | |
const pDomain & | dom | |||
) |
Definition at line 352 of file action_api.cpp.
References _GetPState(), ParticleState::Age, PASource::age, PASource::age_sigma, ParticleState::AgeSigma, ParticleState::Alpha, PASource::alpha, ParticleState::Color, PASource::color, pDomain::copy(), PASource::particle_rate, PASource::position, PASource::positionB, ParticleState::RotVel, PASource::rvelocity, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), ParticleState::Size, PASource::size, ParticleState::Up, PASource::upVec, ParticleState::Vel, PASource::velocity, ParticleState::VertexB, ParticleState::vertexB_tracks, and PASource::vertexB_tracks.
Referenced by gSpark::gSpark(), and pVertex().
00353 { 00354 ParticleState &PS = _GetPState(); 00355 00356 PASource *S = new PASource(); 00357 00358 S->position = dom.copy(); 00359 S->positionB = PS.VertexB->copy(); 00360 S->upVec = PS.Up->copy(); 00361 S->velocity = PS.Vel->copy(); 00362 S->rvelocity = PS.RotVel->copy(); 00363 S->size = PS.Size->copy(); 00364 S->color = PS.Color->copy(); 00365 S->alpha = PS.Alpha->copy(); 00366 S->particle_rate = particle_rate; 00367 S->age = PS.Age; 00368 S->age_sigma = PS.AgeSigma; 00369 S->vertexB_tracks = PS.vertexB_tracks; 00370 00371 S->SetKillsParticles(false); 00372 S->SetDoNotSegment(true); // WARNING: Particles aren't a function of other particles, but does affect the working sets optimizations 00373 00374 _GetPState().SendAction(S); 00375 }
PARTICLEDLL_API void pSpeedLimit | ( | float | min_speed, | |
float | max_speed | |||
) |
Definition at line 377 of file action_api.cpp.
References _GetPState(), PASpeedLimit::max_speed, PASpeedLimit::min_speed, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00378 { 00379 PASpeedLimit *S = new PASpeedLimit; 00380 00381 S->min_speed = min_speed; 00382 S->max_speed = max_speed; 00383 00384 S->SetKillsParticles(false); 00385 S->SetDoNotSegment(false); 00386 00387 _GetPState().SendAction(S); 00388 }
PARTICLEDLL_API void pTargetColor | ( | const pVec & | color, | |
float | alpha, | |||
float | scale | |||
) |
Definition at line 390 of file action_api.cpp.
References _GetPState(), PATargetColor::alpha, PATargetColor::color, PATargetColor::scale, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), and PActionBase::SetKillsParticles().
00391 { 00392 PATargetColor *S = new PATargetColor; 00393 00394 S->color = color; 00395 S->alpha = alpha; 00396 S->scale = scale; 00397 00398 S->SetKillsParticles(false); 00399 S->SetDoNotSegment(false); 00400 00401 _GetPState().SendAction(S); 00402 }
PARTICLEDLL_API void pTargetRotVelocity | ( | const pVec & | vel, | |
float | scale | |||
) |
Definition at line 430 of file action_api.cpp.
References _GetPState(), PATargetRotVelocity::scale, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), and PATargetRotVelocity::velocity.
00431 { 00432 PATargetRotVelocity *S = new PATargetRotVelocity; 00433 00434 S->velocity = vel; 00435 S->scale = scale; 00436 00437 S->SetKillsParticles(false); 00438 S->SetDoNotSegment(false); 00439 00440 _GetPState().SendAction(S); 00441 }
Definition at line 404 of file action_api.cpp.
References _GetPState(), PATargetSize::scale, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), and PATargetSize::size.
00405 { 00406 PATargetSize *S = new PATargetSize; 00407 00408 S->size = size; 00409 S->scale = scale; 00410 00411 S->SetKillsParticles(false); 00412 S->SetDoNotSegment(false); 00413 00414 _GetPState().SendAction(S); 00415 }
PARTICLEDLL_API void pTargetVelocity | ( | const pVec & | vel, | |
float | scale | |||
) |
Definition at line 417 of file action_api.cpp.
References _GetPState(), PATargetVelocity::scale, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), and PATargetVelocity::velocity.
00418 { 00419 PATargetVelocity *S = new PATargetVelocity; 00420 00421 S->velocity = vel; 00422 S->scale = scale; 00423 00424 S->SetKillsParticles(false); 00425 S->SetDoNotSegment(false); 00426 00427 _GetPState().SendAction(S); 00428 }
PARTICLEDLL_API void pVertex | ( | const pVec & | pos, | |
long | data | |||
) |
Definition at line 445 of file action_api.cpp.
References _GetPState(), ParticleGroup::Add(), ParticleState::Age, ParticleState::Alpha, Particle::alpha, ParticleState::Color, pDomain::Generate(), ParticleState::GetPGroup(), ParticleState::in_new_list, ParticleState::Mass, ParticleState::pgroup_id, Particle::posB, pSource(), ParticleState::RotVel, Particle::rvel, ParticleState::Size, ParticleState::Up, Particle::up, ParticleState::Vel, Particle::vel, ParticleState::VertexB, ParticleState::vertexB_tracks, and pVec::x().
00446 { 00447 ParticleState &PS = _GetPState(); 00448 00449 if(PS.in_new_list) { 00450 pSource(1, PDPoint(pos)); 00451 return; 00452 } 00453 00454 // Immediate mode. Quickly add the vertex. 00455 pVec siz, up, vel, rvel, col, alpha, posB; 00456 if(PS.vertexB_tracks) 00457 posB = pos; 00458 else 00459 posB = PS.VertexB->Generate(); 00460 siz = PS.Size->Generate(); 00461 up = PS.Up->Generate(); 00462 vel = PS.Vel->Generate(); 00463 rvel = PS.RotVel->Generate(); 00464 col = PS.Color->Generate(); 00465 alpha = PS.Alpha->Generate(); 00466 PS.GetPGroup(PS.pgroup_id).Add(pos, posB, up, vel, rvel, siz, col, alpha.x(), PS.Age, PS.Mass, data); 00467 }
PARTICLEDLL_API void pVortex | ( | const pVec & | tip, | |
const pVec & | axis, | |||
float | magnitude, | |||
float | tightnessExponent, | |||
float | rotSpeed, | |||
float | epsilon, | |||
float | max_radius | |||
) |
Definition at line 469 of file action_api.cpp.
References _GetPState(), PAVortex::axis, PAVortex::epsilon, PAVortex::magnitude, PAVortex::max_radius, PAVortex::rotSpeed, ParticleState::SendAction(), PActionBase::SetDoNotSegment(), PActionBase::SetKillsParticles(), PAVortex::tightnessExponent, and PAVortex::tip.
00472 { 00473 PAVortex *S = new PAVortex; 00474 00475 S->tip = tip; 00476 S->axis = axis; 00477 S->magnitude = magnitude; 00478 S->tightnessExponent = tightnessExponent; 00479 S->rotSpeed = rotSpeed; 00480 S->epsilon = epsilon; 00481 S->max_radius = max_radius; 00482 00483 S->SetKillsParticles(false); 00484 S->SetDoNotSegment(false); 00485 00486 _GetPState().SendAction(S); 00487 }