[Bf-python] Mathutils.AngleBetweenVecs Fixed..
Joseph Gilbert
models at paposo.com
Fri Apr 29 22:42:49 CEST 2005
Campbell Barton wrote:
> Joseph Gilbert wrote:
>
>> Stephen Swaney wrote:
>>
>>> On Thu, Apr 28, 2005 at 05:27:55PM +1000, Campbell Barton wrote:
>>>
>>>
>>>> Hi, details in the patch tracker, Is this bad form? Like
>>>> crossposting?
>>>
>>>
>>>
>>> Nah, it's good to mention new tracker entries here, especially if they
>>> need some discussion. As long as the actual patch ends up in the
>>> tracker...
>>>
>>> Joseph is in the process of reworking the MathUtils, so let's
>>> put this on his list. Modifying the input vectors is definitly
>>> 'unwanted' behavior. Same returning NAN for identical vectors.
>>>
>>>
>>>
>> Should already be fixed in the upcoming update to mathutils. Thx for
>> pointing this out.
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-python
>>
>>
> Hi Joseph, How can I be updated on what your doing in Mathutls? -
> Could you post your todo/done list, so other people dont do them? :)
> - Even if you have alredy done it. mabe have a look at my patch
> anyhow. see if theres anything you could use.
>
> - Cam
>
This is my work list of 'done' items so far: This is a rough draft only.
Not much left on the todo list right now for this patch. There is a
section on the wiki as to the mathutils update.
- fixed Rand() so that it doesn't seed everytime and should generate
better random numbers
- changed a few error return types
- deprecated:
* CopyVec() - replaced by Vector() functionality
* CopyMat() - replaced by Matrix() functionality
* CopyQuat() - replace by Quaternion() functionality
* CopyEuler() - replaced by Euler() functionality
* RotateEuler() - replaced by Euler.rotate() funtionality
* MatMultVec() - replaced by matrix * vector
* VecMultMat() - replaced by vector * matrix
- clean up of uninitialized variables & removal of unneccessary objects
- NMesh returns wrapped vectors now
- World returns wrapped matrices now
- Removal of vector_proxy and replacement with internal struct in all
PyObject types. New struct containers references to python object data
or internally allocated blender data for wrapping
- Vector, Euler, Mat, Quat, call all now internally wrap object without
destroying internal datablocks
- Removed memory allocation (unneeded) from all methods
- Vector's resize methods are only applicable to new vectors not wrapped
data.
- Matrix(), Quat(), Euler(), Vector() now accepts ANY sequence list,
including tuples, list, or a self object to copy - matrices accept
multiple sequences
- Fixed Slerp() so that it now works correctly values are clamped
between 0 and 1
- Euler.rotate does internal rotation now
- Slice assignment now works better for all types
- Vector * Vector and Quat * Quat are defined and return the DOT product
- Mat * Vec and Vec * Mat are defined now
- Moved #includes to .c file from headers. Also fixed prototypes in
mathutils
- Added new helper functions for incref'ing to genutils
- Major cleanup of header files includes - include Mathutils.h for
access to math types
- matrix.toQuat() and .toEuler() now fixed take appropriate matrix sizes
- Matrix() with no parameters now returns an identity matrix by default
not a zero matrix
- printf() now prints with 6 digits instead of 4
- printf() now prints output with object descriptor
- Matrices now support [x][y] assignment (e.g. matrix[x][y] = 5.4)
- Matrix[index] = value now expectes a sequence not an integer. This
will now set a ROW of the matrix through a sequence. index cannot go
above the row size of the matrix.
- slice operations on matrices work with sequences now (rows of the
matrix) example: mymatrix[0:2] returns a list of 2 wrapped vectors with
access to the matrix data.
- slice assignment will no longer modify the data if the assignment
operation fails
- fixed error in matrix * scalar multiplication
- euler.toMatrix(), toQuat() no longer causes "creep" from repeated use
- Wrapped data will generate wrapped objects when toEuler(), toQuat(),
toMatrix() is used
- Quats can be created with angle/axis, axis/angle
- Fixed anywhere where newXXXObject() is created to use proper internal
code and memory allocation
- Object.getEuler() and Object.getBoundingBox() return Wrapped data when
data is present
- Object.getMatrix() returns wrapped data if it's worldspace,
'localspace' returns a new matrix
- 4x4 matrices can be multiplied by 3D vectors
- vec *quat / quat * vec is now defined
- vec.magnitude alias for vec.length
- all self, internal methods return a pointer to self now so you can do
print vector.internalmethod() or vector.internalmethod().nextmethod()
More information about the Bf-python
mailing list