~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/gameengine/GameLogic/SCA_RandomActuator.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * Set random/camera stuff
3
3
 *
4
 
 * $Id: SCA_RandomActuator.cpp 14444 2008-04-16 22:40:48Z hos $
 
4
 * $Id: SCA_RandomActuator.cpp 16873 2008-10-02 00:22:28Z campbellbarton $
5
5
 *
6
6
 * ***** BEGIN GPL LICENSE BLOCK *****
7
7
 *
339
339
};
340
340
 
341
341
PyMethodDef SCA_RandomActuator::Methods[] = {
342
 
        {"setSeed",         (PyCFunction) SCA_RandomActuator::sPySetSeed, METH_VARARGS, SetSeed_doc},
343
 
        {"getSeed",         (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_VARARGS, GetSeed_doc},
344
 
        {"getPara1",        (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_VARARGS, GetPara1_doc},
345
 
        {"getPara2",        (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_VARARGS, GetPara2_doc},
346
 
        {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_VARARGS, GetDistribution_doc},
347
 
        {"setProperty",     (PyCFunction) SCA_RandomActuator::sPySetProperty, METH_VARARGS, SetProperty_doc},
348
 
        {"getProperty",     (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_VARARGS, GetProperty_doc},
349
 
        {"setBoolConst",    (PyCFunction) SCA_RandomActuator::sPySetBoolConst, METH_VARARGS, SetBoolConst_doc},
350
 
        {"setBoolUniform",  (PyCFunction) SCA_RandomActuator::sPySetBoolUniform, METH_VARARGS, SetBoolUniform_doc},
351
 
        {"setBoolBernouilli",(PyCFunction) SCA_RandomActuator::sPySetBoolBernouilli, METH_VARARGS, SetBoolBernouilli_doc},
352
 
        {"setIntConst",     (PyCFunction) SCA_RandomActuator::sPySetIntConst, METH_VARARGS, SetIntConst_doc},
353
 
        {"setIntUniform",   (PyCFunction) SCA_RandomActuator::sPySetIntUniform, METH_VARARGS, SetIntUniform_doc},
354
 
        {"setIntPoisson",   (PyCFunction) SCA_RandomActuator::sPySetIntPoisson, METH_VARARGS, SetIntPoisson_doc},
355
 
        {"setFloatConst",   (PyCFunction) SCA_RandomActuator::sPySetFloatConst, METH_VARARGS, SetFloatConst_doc},
356
 
        {"setFloatUniform", (PyCFunction) SCA_RandomActuator::sPySetFloatUniform, METH_VARARGS, SetFloatUniform_doc},
357
 
        {"setFloatNormal",  (PyCFunction) SCA_RandomActuator::sPySetFloatNormal, METH_VARARGS, SetFloatNormal_doc},
358
 
        {"setFloatNegativeExponential", (PyCFunction) SCA_RandomActuator::sPySetFloatNegativeExponential, METH_VARARGS, SetFloatNegativeExponential_doc},
 
342
        {"setSeed",         (PyCFunction) SCA_RandomActuator::sPySetSeed, METH_VARARGS, (PY_METHODCHAR)SetSeed_doc},
 
343
        {"getSeed",         (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_VARARGS, (PY_METHODCHAR)GetSeed_doc},
 
344
        {"getPara1",        (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_VARARGS, (PY_METHODCHAR)GetPara1_doc},
 
345
        {"getPara2",        (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_VARARGS, (PY_METHODCHAR)GetPara2_doc},
 
346
        {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_VARARGS, (PY_METHODCHAR)GetDistribution_doc},
 
347
        {"setProperty",     (PyCFunction) SCA_RandomActuator::sPySetProperty, METH_VARARGS, (PY_METHODCHAR)SetProperty_doc},
 
348
        {"getProperty",     (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_VARARGS, (PY_METHODCHAR)GetProperty_doc},
 
349
        {"setBoolConst",    (PyCFunction) SCA_RandomActuator::sPySetBoolConst, METH_VARARGS, (PY_METHODCHAR)SetBoolConst_doc},
 
350
        {"setBoolUniform",  (PyCFunction) SCA_RandomActuator::sPySetBoolUniform, METH_VARARGS, (PY_METHODCHAR)SetBoolUniform_doc},
 
351
        {"setBoolBernouilli",(PyCFunction) SCA_RandomActuator::sPySetBoolBernouilli, METH_VARARGS, (PY_METHODCHAR)SetBoolBernouilli_doc},
 
352
        {"setIntConst",     (PyCFunction) SCA_RandomActuator::sPySetIntConst, METH_VARARGS, (PY_METHODCHAR)SetIntConst_doc},
 
353
        {"setIntUniform",   (PyCFunction) SCA_RandomActuator::sPySetIntUniform, METH_VARARGS, (PY_METHODCHAR)SetIntUniform_doc},
 
354
        {"setIntPoisson",   (PyCFunction) SCA_RandomActuator::sPySetIntPoisson, METH_VARARGS, (PY_METHODCHAR)SetIntPoisson_doc},
 
355
        {"setFloatConst",   (PyCFunction) SCA_RandomActuator::sPySetFloatConst, METH_VARARGS, (PY_METHODCHAR)SetFloatConst_doc},
 
356
        {"setFloatUniform", (PyCFunction) SCA_RandomActuator::sPySetFloatUniform, METH_VARARGS, (PY_METHODCHAR)SetFloatUniform_doc},
 
357
        {"setFloatNormal",  (PyCFunction) SCA_RandomActuator::sPySetFloatNormal, METH_VARARGS, (PY_METHODCHAR)SetFloatNormal_doc},
 
358
        {"setFloatNegativeExponential", (PyCFunction) SCA_RandomActuator::sPySetFloatNegativeExponential, METH_VARARGS, (PY_METHODCHAR)SetFloatNegativeExponential_doc},
359
359
        {NULL,NULL} //Sentinel
360
360
};
361
361
 
364
364
}
365
365
 
366
366
/* 1. setSeed                                                            */
367
 
char SCA_RandomActuator::SetSeed_doc[] = 
 
367
const char SCA_RandomActuator::SetSeed_doc[] = 
368
368
"setSeed(seed)\n"
369
369
"\t- seed: integer\n"
370
370
"\tSet the initial seed of the generator. Equal seeds produce\n"
381
381
        Py_Return;
382
382
}
383
383
/* 2. getSeed                                                            */
384
 
char SCA_RandomActuator::GetSeed_doc[] = 
 
384
const char SCA_RandomActuator::GetSeed_doc[] = 
385
385
"getSeed()\n"
386
386
"\tReturns the initial seed of the generator. Equal seeds produce\n"
387
387
"\tequal series.\n";
390
390
}
391
391
 
392
392
/* 4. getPara1                                                           */
393
 
char SCA_RandomActuator::GetPara1_doc[] = 
 
393
const char SCA_RandomActuator::GetPara1_doc[] = 
394
394
"getPara1()\n"
395
395
"\tReturns the first parameter of the active distribution. Refer\n"
396
396
"\tto the documentation of the generator types for the meaning\n"
400
400
}
401
401
 
402
402
/* 6. getPara2                                                           */
403
 
char SCA_RandomActuator::GetPara2_doc[] = 
 
403
const char SCA_RandomActuator::GetPara2_doc[] = 
404
404
"getPara2()\n"
405
405
"\tReturns the first parameter of the active distribution. Refer\n"
406
406
"\tto the documentation of the generator types for the meaning\n"
410
410
}
411
411
 
412
412
/* 8. getDistribution                                                    */
413
 
char SCA_RandomActuator::GetDistribution_doc[] = 
 
413
const char SCA_RandomActuator::GetDistribution_doc[] = 
414
414
"getDistribution()\n"
415
415
"\tReturns the type of the active distribution.\n";
416
416
PyObject* SCA_RandomActuator::PyGetDistribution(PyObject* self, PyObject* args, PyObject* kwds) {
418
418
}
419
419
 
420
420
/* 9. setProperty                                                        */
421
 
char SCA_RandomActuator::SetProperty_doc[] = 
 
421
const char SCA_RandomActuator::SetProperty_doc[] = 
422
422
"setProperty(name)\n"
423
423
"\t- name: string\n"
424
424
"\tSet the property to which the random value is assigned. If the \n"
441
441
        Py_Return;
442
442
}
443
443
/* 10. getProperty                                                       */
444
 
char SCA_RandomActuator::GetProperty_doc[] = 
 
444
const char SCA_RandomActuator::GetProperty_doc[] = 
445
445
"getProperty(name)\n"
446
446
"\tReturn the property to which the random value is assigned. If the \n"
447
447
"\tgenerator and property types do not match, the assignment is ignored.\n";
450
450
}
451
451
 
452
452
/* 11. setBoolConst */
453
 
char SCA_RandomActuator::SetBoolConst_doc[] = 
 
453
const char SCA_RandomActuator::SetBoolConst_doc[] = 
454
454
"setBoolConst(value)\n"
455
455
"\t- value: 0 or 1\n"
456
456
"\tSet this generator to produce a constant boolean value.\n";
470
470
        Py_Return;
471
471
}
472
472
/* 12. setBoolUniform, */
473
 
char SCA_RandomActuator::SetBoolUniform_doc[] = 
 
473
const char SCA_RandomActuator::SetBoolUniform_doc[] = 
474
474
"setBoolUniform()\n"
475
475
"\tSet this generator to produce true and false, each with 50%% chance of occuring\n";
476
476
PyObject* SCA_RandomActuator::PySetBoolUniform(PyObject* self, 
482
482
        Py_Return;
483
483
}
484
484
/* 13. setBoolBernouilli,  */
485
 
char SCA_RandomActuator::SetBoolBernouilli_doc[] = 
 
485
const char SCA_RandomActuator::SetBoolBernouilli_doc[] = 
486
486
"setBoolBernouilli(value)\n"
487
487
"\t- value: a float between 0 and 1\n"
488
488
"\tReturn false value * 100%% of the time.\n";
500
500
        Py_Return;
501
501
}
502
502
/* 14. setIntConst,*/
503
 
char SCA_RandomActuator::SetIntConst_doc[] = 
 
503
const char SCA_RandomActuator::SetIntConst_doc[] = 
504
504
"setIntConst(value)\n"
505
505
"\t- value: integer\n"
506
506
"\tAlways return value\n";
518
518
        Py_Return;
519
519
}
520
520
/* 15. setIntUniform,*/
521
 
char SCA_RandomActuator::SetIntUniform_doc[] = 
 
521
const char SCA_RandomActuator::SetIntUniform_doc[] = 
522
522
"setIntUniform(lower_bound, upper_bound)\n"
523
523
"\t- lower_bound: integer\n"
524
524
"\t- upper_bound: integer\n"
539
539
        Py_Return;
540
540
}
541
541
/* 16. setIntPoisson,           */
542
 
char SCA_RandomActuator::SetIntPoisson_doc[] = 
 
542
const char SCA_RandomActuator::SetIntPoisson_doc[] = 
543
543
"setIntPoisson(value)\n"
544
544
"\t- value: float\n"
545
545
"\tReturn a Poisson-distributed number. This performs a series\n"
559
559
        Py_Return;
560
560
}
561
561
/* 17. setFloatConst,*/
562
 
char SCA_RandomActuator::SetFloatConst_doc[] = 
 
562
const char SCA_RandomActuator::SetFloatConst_doc[] = 
563
563
"setFloatConst(value)\n"
564
564
"\t- value: float\n"
565
565
"\tAlways return value\n";
577
577
        Py_Return;
578
578
}
579
579
/* 18. setFloatUniform, */
580
 
char SCA_RandomActuator::SetFloatUniform_doc[] = 
 
580
const char SCA_RandomActuator::SetFloatUniform_doc[] = 
581
581
"setFloatUniform(lower_bound, upper_bound)\n"
582
582
"\t- lower_bound: float\n"
583
583
"\t- upper_bound: float\n"
598
598
        Py_Return;
599
599
}
600
600
/* 19. setFloatNormal, */
601
 
char SCA_RandomActuator::SetFloatNormal_doc[] = 
 
601
const char SCA_RandomActuator::SetFloatNormal_doc[] = 
602
602
"setFloatNormal(mean, standard_deviation)\n"
603
603
"\t- mean: float\n"
604
604
"\t- standard_deviation: float\n"
619
619
        Py_Return;
620
620
}
621
621
/* 20. setFloatNegativeExponential, */
622
 
char SCA_RandomActuator::SetFloatNegativeExponential_doc[] = 
 
622
const char SCA_RandomActuator::SetFloatNegativeExponential_doc[] = 
623
623
"setFloatNegativeExponential(half_life)\n"
624
624
"\t- half_life: float\n"
625
625
"\tReturn negative-exponentially distributed numbers. The half-life 'time'\n"