Blender V2.61 - r43446
Defines | Functions | Variables

mathutils.c File Reference

#include <Python.h>
#include "mathutils.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"

Go to the source code of this file.

Defines

#define SIGNMASK(i)   (-(int)(((unsigned int)(i))>>31))

Functions

 PyDoc_STRVAR (M_Mathutils_doc,"This module provides access to matrices, eulers, quaternions and vectors.")
static int mathutils_array_parse_fast (float *array, int size, PyObject *value_fast, const char *error_prefix)
int mathutils_array_parse (float *array, int array_min, int array_max, PyObject *value, const char *error_prefix)
int mathutils_array_parse_alloc (float **array, int array_min, PyObject *value, const char *error_prefix)
int mathutils_any_to_rotmat (float rmat[3][3], PyObject *value, const char *error_prefix)
int EXPP_FloatsAreEqual (float af, float bf, int maxDiff)
int EXPP_VectorsAreEqual (float *vecA, float *vecB, int size, int floatSteps)
PyObject * mathutils_dynstr_to_py (struct DynStr *ds)
int Mathutils_RegisterCallback (Mathutils_Callback *cb)
int _BaseMathObject_ReadCallback (BaseMathObject *self)
int _BaseMathObject_WriteCallback (BaseMathObject *self)
int _BaseMathObject_ReadIndexCallback (BaseMathObject *self, int index)
int _BaseMathObject_WriteIndexCallback (BaseMathObject *self, int index)
PyObject * BaseMathObject_owner_get (BaseMathObject *self, void *UNUSED(closure))
PyObject * BaseMathObject_is_wrapped_get (BaseMathObject *self, void *UNUSED(closure))
int BaseMathObject_traverse (BaseMathObject *self, visitproc visit, void *arg)
int BaseMathObject_clear (BaseMathObject *self)
void BaseMathObject_dealloc (BaseMathObject *self)
PyMODINIT_FUNC PyInit_mathutils (void)

Variables

static Mathutils_Callbackmathutils_callbacks [8] = {NULL}
char BaseMathObject_owner_doc [] = "The item this is wrapping or None (readonly)."
char BaseMathObject_is_wrapped_doc [] = "True when this object wraps external data (readonly).\n\n:type: boolean"
static struct PyMethodDef M_Mathutils_methods []
static struct PyModuleDef M_Mathutils_module_def

Detailed Description

Definition in file mathutils.c.


Define Documentation

#define SIGNMASK (   i)    (-(int)(((unsigned int)(i))>>31))

Definition at line 242 of file mathutils.c.

Referenced by EXPP_FloatsAreEqual().


Function Documentation

int _BaseMathObject_ReadCallback ( BaseMathObject self)

Definition at line 304 of file mathutils.c.

References Mathutils_Callback::get.

int _BaseMathObject_ReadIndexCallback ( BaseMathObject self,
int  index 
)

Definition at line 332 of file mathutils.c.

References Mathutils_Callback::get_index.

int _BaseMathObject_WriteCallback ( BaseMathObject self)

Definition at line 318 of file mathutils.c.

References Mathutils_Callback::set.

int _BaseMathObject_WriteIndexCallback ( BaseMathObject self,
int  index 
)

Definition at line 346 of file mathutils.c.

References Mathutils_Callback::set_index.

int BaseMathObject_clear ( BaseMathObject self)

Definition at line 381 of file mathutils.c.

Referenced by BaseMathObject_dealloc().

void BaseMathObject_dealloc ( BaseMathObject self)

Definition at line 387 of file mathutils.c.

References BaseMathObject_clear(), and Py_WRAP.

PyObject* BaseMathObject_is_wrapped_get ( BaseMathObject self,
void *  UNUSEDclosure 
)

Definition at line 370 of file mathutils.c.

References Py_WRAP.

PyObject* BaseMathObject_owner_get ( BaseMathObject self,
void *  UNUSEDclosure 
)

Definition at line 362 of file mathutils.c.

int BaseMathObject_traverse ( BaseMathObject self,
visitproc  visit,
void *  arg 
)

Definition at line 375 of file mathutils.c.

int EXPP_FloatsAreEqual ( float  af,
float  bf,
int  maxDiff 
)

Definition at line 244 of file mathutils.c.

References assert, KDL::diff(), SIGNMASK, and rna_array::test.

Referenced by EXPP_VectorsAreEqual(), and quat__axis_angle_sanitize().

int EXPP_VectorsAreEqual ( float *  vecA,
float *  vecB,
int  size,
int  floatSteps 
)
int mathutils_any_to_rotmat ( float  rmat[3][3],
PyObject *  value,
const char *  error_prefix 
)
int mathutils_array_parse ( float *  array,
int  array_min,
int  array_max,
PyObject *  value,
const char *  error_prefix 
)
int mathutils_array_parse_alloc ( float **  array,
int  array_min,
PyObject *  value,
const char *  error_prefix 
)
static int mathutils_array_parse_fast ( float *  array,
int  size,
PyObject *  value_fast,
const char *  error_prefix 
) [static]

Definition at line 43 of file mathutils.c.

References i, and size().

Referenced by mathutils_array_parse(), and mathutils_array_parse_alloc().

PyObject* mathutils_dynstr_to_py ( struct DynStr ds)
int Mathutils_RegisterCallback ( Mathutils_Callback cb)

Definition at line 289 of file mathutils.c.

References i.

Referenced by BPY_rna_init(), and PyInit_mathutils().

PyDoc_STRVAR ( M_Mathutils_doc  ,
"This module provides access to  matrices,
eulers  ,
quaternions and vectors."   
)
PyMODINIT_FUNC PyInit_mathutils ( void  )

Variable Documentation

char BaseMathObject_is_wrapped_doc[] = "True when this object wraps external data (readonly).\n\n:type: boolean"

Definition at line 369 of file mathutils.c.

char BaseMathObject_owner_doc[] = "The item this is wrapping or None (readonly)."

Definition at line 361 of file mathutils.c.

struct PyMethodDef M_Mathutils_methods[] [static]
Initial value:
 {
    {NULL, NULL, 0, NULL}
}

Definition at line 403 of file mathutils.c.

struct PyModuleDef M_Mathutils_module_def [static]
Initial value:
 {
    PyModuleDef_HEAD_INIT,
    "mathutils",  
    M_Mathutils_doc,  
    0,  
    M_Mathutils_methods,  
    NULL,  
    NULL,  
    NULL,  
    NULL,  
}

Definition at line 407 of file mathutils.c.

Mathutils_Callback* mathutils_callbacks[8] = {NULL} [static]

Definition at line 287 of file mathutils.c.