Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2013-02-10 10:13:26 +0400
committerMitchell Stokes <mogurijin@gmail.com>2013-02-10 10:13:26 +0400
commit372cf9330955c7d7b16529ffc7d39265ada47474 (patch)
tree1a28773cfdce0f10079cf3b4212dc07cba7c104f /doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst
parenta4a1c667257e493bdeb5354f87083291af122a68 (diff)
BGE: Splitting up the bge.types docs so they are not all on the same page. This should make them much easier to browse.
Diffstat (limited to 'doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst')
-rw-r--r--doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst127
1 files changed, 127 insertions, 0 deletions
diff --git a/doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst b/doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst
new file mode 100644
index 00000000000..68357229262
--- /dev/null
+++ b/doc/python_api/rst/bge_types/bge.types.SCA_RandomActuator.rst
@@ -0,0 +1,127 @@
+SCA_RandomActuator(SCA_IActuator)
+=================================
+
+.. module:: bge.types
+
+base class --- :class:`SCA_IActuator`
+
+.. class:: SCA_RandomActuator(SCA_IActuator)
+
+ Random Actuator
+
+ .. attribute:: seed
+
+ Seed of the random number generator.
+
+ :type: integer.
+
+ Equal seeds produce equal series. If the seed is 0, the generator will produce the same value on every call.
+
+ .. attribute:: para1
+
+ the first parameter of the active distribution.
+
+ :type: float, read-only.
+
+ Refer to the documentation of the generator types for the meaning of this value.
+
+ .. attribute:: para2
+
+ the second parameter of the active distribution.
+
+ :type: float, read-only
+
+ Refer to the documentation of the generator types for the meaning of this value.
+
+ .. attribute:: distribution
+
+ Distribution type. (read-only). Can be one of :ref:`these constants <logic-random-distributions>`
+
+ :type: integer
+
+ .. attribute:: propName
+
+ the name of the property to set with the random value.
+
+ :type: string
+
+ If the generator and property types do not match, the assignment is ignored.
+
+ .. method:: setBoolConst(value)
+
+ Sets this generator to produce a constant boolean value.
+
+ :arg value: The value to return.
+ :type value: boolean
+
+ .. method:: setBoolUniform()
+
+ Sets this generator to produce a uniform boolean distribution.
+
+ The generator will generate True or False with 50% chance.
+
+ .. method:: setBoolBernouilli(value)
+
+ Sets this generator to produce a Bernouilli distribution.
+
+ :arg value: Specifies the proportion of False values to produce.
+
+ * 0.0: Always generate True
+ * 1.0: Always generate False
+ :type value: float
+
+ .. method:: setIntConst(value)
+
+ Sets this generator to always produce the given value.
+
+ :arg value: the value this generator produces.
+ :type value: integer
+
+ .. method:: setIntUniform(lower_bound, upper_bound)
+
+ Sets this generator to produce a random value between the given lower and
+ upper bounds (inclusive).
+
+ :type lower_bound: integer
+ :type upper_bound: integer
+
+ .. method:: setIntPoisson(value)
+
+ Generate a Poisson-distributed number.
+
+ This performs a series of Bernouilli tests with parameter value.
+ It returns the number of tries needed to achieve succes.
+
+ :type value: float
+
+ .. method:: setFloatConst(value)
+
+ Always generate the given value.
+
+ :type value: float
+
+ .. method:: setFloatUniform(lower_bound, upper_bound)
+
+ Generates a random float between lower_bound and upper_bound with a
+ uniform distribution.
+
+ :type lower_bound: float
+ :type upper_bound: float
+
+ .. method:: setFloatNormal(mean, standard_deviation)
+
+ Generates a random float from the given normal distribution.
+
+ :arg mean: The mean (average) value of the generated numbers
+ :type mean: float
+ :arg standard_deviation: The standard deviation of the generated numbers.
+ :type standard_deviation: float
+
+ .. method:: setFloatNegativeExponential(half_life)
+
+ Generate negative-exponentially distributed numbers.
+
+ The half-life 'time' is characterized by half_life.
+
+ :type half_life: float
+