Blender  V2.59
Defines | Functions | Variables
mathutils.c File Reference
#include <Python.h>
#include "mathutils.h"
#include "BLI_math.h"
#include "BLI_utildefines.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 array_min, int array_max, 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_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)
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_getOwner (BaseMathObject *self, void *UNUSED(closure))
PyObject * BaseMathObject_getWrapped (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, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
char BaseMathObject_Owner_doc [] = "The item this is wrapping or None (readonly)."
char BaseMathObject_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

Define Documentation

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

Definition at line 183 of file mathutils.c.

Referenced by EXPP_FloatsAreEqual().


Function Documentation

int _BaseMathObject_ReadCallback ( BaseMathObject self)

Definition at line 233 of file mathutils.c.

References Mathutils_Callback::get.

int _BaseMathObject_ReadIndexCallback ( BaseMathObject self,
int  index 
)

Definition at line 261 of file mathutils.c.

References Mathutils_Callback::get_index.

int _BaseMathObject_WriteCallback ( BaseMathObject self)

Definition at line 247 of file mathutils.c.

References Mathutils_Callback::set.

int _BaseMathObject_WriteIndexCallback ( BaseMathObject self,
int  index 
)

Definition at line 275 of file mathutils.c.

References Mathutils_Callback::set_index.

int BaseMathObject_clear ( BaseMathObject self)

Definition at line 310 of file mathutils.c.

Referenced by BaseMathObject_dealloc().

void BaseMathObject_dealloc ( BaseMathObject self)

Definition at line 316 of file mathutils.c.

References BaseMathObject_clear(), and Py_WRAP.

PyObject* BaseMathObject_getOwner ( BaseMathObject self,
void *  UNUSEDclosure 
)

Definition at line 291 of file mathutils.c.

PyObject* BaseMathObject_getWrapped ( BaseMathObject self,
void *  UNUSEDclosure 
)

Definition at line 299 of file mathutils.c.

References Py_WRAP.

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

Definition at line 304 of file mathutils.c.

int EXPP_FloatsAreEqual ( float  af,
float  bf,
int  maxDiff 
)
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 
)
static int mathutils_array_parse_fast ( float *  array,
int  array_min,
int  array_max,
PyObject *  value,
const char *  error_prefix 
) [static]

Definition at line 44 of file mathutils.c.

References i, NULL, and size().

Referenced by mathutils_array_parse().

int Mathutils_RegisterCallback ( Mathutils_Callback cb)

Definition at line 218 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_Owner_doc[] = "The item this is wrapping or None (readonly)."

Definition at line 290 of file mathutils.c.

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

Definition at line 298 of file mathutils.c.

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

Definition at line 332 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 336 of file mathutils.c.

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

Definition at line 216 of file mathutils.c.