H3D API  2.4.1
Static Public Member Functions | List of all members
H3D::PyVec3d Class Reference

Python C Type wrapper around Vec3d. More...

#include <H3D/PythonTypes.h>

Inheritance diagram for H3D::PyVec3d:
Inheritance graph

Static Public Member Functions

static int init (PyVec3d *self, PyObject *args, PyObject *kwds)
 Python type initialisation: will set the Vec3d value from a python string argument list.
 
static PyObject * length (PyObject *self, PyObject *args)
 Get the length of the PyVec3d.
 
static PyObject * lengthSqr (PyObject *self, PyObject *args)
 Get the length squared of the PyVec3d.
 
static PyObject * normalize (PyObject *self, PyObject *args)
 Normalizes the PyVec3d to be of length 1.
 
static PyObject * normalizeSafe (PyObject *self, PyObject *args)
 Normalize the vector to be of length 1. More...
 
static PyObject * dotProduct (PyObject *self, PyObject *args)
 Returns the dot product between two vectors.
 
static PyObject * crossProduct (PyObject *self, PyObject *args)
 Returns the dot product between two vectors.
 
- Static Public Member Functions inherited from H3D::PyVecTypeWrapper< Vec3d, &PyVec3d_Type, PyVec3d_Name, PythonInternals::PyVec3d3f_Check, PythonInternals::PyVec3d3f_AsVec3d, PyVec3d_FromVec3d >
static PyObject * mul (PyObject *veca, PyObject *vecb)
 Performs vector dot product of two vector instances.
 
- Static Public Member Functions inherited from H3D::PyNumberTypeWrapperBase< Type, TypeObject, NameFunc, CheckFunc, ValueFunc, NewFunc >
static PyObject * add (PyObject *veca, PyObject *vecb)
 Performs addition between two instances.
 
static PyObject * sub (PyObject *veca, PyObject *vecb)
 Performs subtraction between two instances.
 
static PyObject * mul (PyObject *veca, PyObject *vecb)
 Performs multiplication between a instance of the type and a float, long or int.
 
static PyObject * div (PyObject *veca, PyObject *floatb)
 Performs division with a float, long or int instance.
 
static PyObject * neg (PyObject *vec)
 Negation.
 
- Static Public Member Functions inherited from H3D::PyTypeWrapper< Type, TypeObject, NameFunc, CheckFunc, ValueFunc, NewFunc >
static void installType (PyObject *_H3D_module)
 Install type in the given python module. More...
 
static PyObject * create ()
 create() a new instance of Type using Python to allocate the memory and initialise the PyObject headers - to be called by PythonScript's internals.
 
static void dealloc (PyObject *self)
 Python type deallocation.
 
static PyObject * repr (PyObject *myself, PyObject *)
 Converts to a char* string.
 
static int compare (PyObject *veca, PyObject *vecb)
 Test if two PyTypes are equal or not.
 

Detailed Description

Python C Type wrapper around Vec3d.


Member Function Documentation

◆ normalizeSafe()

PyObject * H3D::PyVec3d::normalizeSafe ( PyObject *  self,
PyObject *  args 
)
static

Normalize the vector to be of length 1.

If the vector is of zero length nothing will be done.

References normalizeSafe(), and Vec3d().

Referenced by normalizeSafe().


The documentation for this class was generated from the following files: