[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38849] branches/soc-2011-salad: Merging soc-2011-pepper into soc-2011-salad.

Sergey Sharybin g.ulairi at gmail.com
Sat Jul 30 13:03:18 CEST 2011


Revision: 38849
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38849
Author:   nazgul
Date:     2011-07-30 11:03:18 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
Merging soc-2011-pepper into soc-2011-salad.

It's a bit difficult to tell which revisions were merged exactly,
it was a bit tricky process.

Also, reverted changed to matrix functions so hundreds of
warnings are gone.

Please, do not make changes which confuses other areas of code
without changing that areas to not to be confused. Expecially
if this changes aren't really important.

Modified Paths:
--------------
    branches/soc-2011-salad/build_files/cmake/cmake_consistency_check.py
    branches/soc-2011-salad/doc/python_api/rst/bge.types.rst
    branches/soc-2011-salad/intern/audaspace/CMakeLists.txt
    branches/soc-2011-salad/intern/audaspace/FX/AUD_DoubleReader.cpp
    branches/soc-2011-salad/intern/audaspace/FX/AUD_LimiterReader.cpp
    branches/soc-2011-salad/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_3DMath.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_C-API.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_C-API.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_ChannelMapperReader.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_ChannelMapperReader.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_I3DHandle.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_IHandle.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_LinearResampleReader.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_Mixer.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_NULLDevice.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_ReadDevice.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_ReadDevice.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_Reference.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerFactory.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerFactory.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerReader.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerReader.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SoftwareDevice.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SoftwareDevice.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_Space.h
    branches/soc-2011-salad/intern/ghost/SConscript
    branches/soc-2011-salad/release/datafiles/blenderbuttons
    branches/soc-2011-salad/release/scripts/modules/bpy_extras/io_utils.py
    branches/soc-2011-salad/release/scripts/modules/mocap_constraints.py
    branches/soc-2011-salad/release/scripts/modules/mocap_tools.py
    branches/soc-2011-salad/release/scripts/modules/retarget.py
    branches/soc-2011-salad/release/scripts/startup/bl_operators/object_align.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_armature.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_render.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_scene.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_dopesheet.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_graph.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_nla.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_sequencer.py
    branches/soc-2011-salad/release/scripts/startup/ui_mocap.py
    branches/soc-2011-salad/source/blender/blenkernel/BKE_animsys.h
    branches/soc-2011-salad/source/blender/blenkernel/BKE_fcurve.h
    branches/soc-2011-salad/source/blender/blenkernel/BKE_sequencer.h
    branches/soc-2011-salad/source/blender/blenkernel/BKE_sound.h
    branches/soc-2011-salad/source/blender/blenkernel/intern/action.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/anim.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/anim_sys.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/blender.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/fcurve.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/key.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/nla.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/object.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/scene.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/seqeffects.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-salad/source/blender/blenkernel/intern/sound.c
    branches/soc-2011-salad/source/blender/blenlib/BLI_math_matrix.h
    branches/soc-2011-salad/source/blender/blenlib/intern/math_matrix.c
    branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-salad/source/blender/collada/AnimationExporter.cpp
    branches/soc-2011-salad/source/blender/collada/AnimationExporter.h
    branches/soc-2011-salad/source/blender/collada/AnimationImporter.cpp
    branches/soc-2011-salad/source/blender/collada/AnimationImporter.h
    branches/soc-2011-salad/source/blender/collada/ArmatureExporter.cpp
    branches/soc-2011-salad/source/blender/collada/ArmatureExporter.h
    branches/soc-2011-salad/source/blender/collada/ArmatureImporter.cpp
    branches/soc-2011-salad/source/blender/collada/ArmatureImporter.h
    branches/soc-2011-salad/source/blender/collada/CameraExporter.cpp
    branches/soc-2011-salad/source/blender/collada/DocumentImporter.cpp
    branches/soc-2011-salad/source/blender/collada/DocumentImporter.h
    branches/soc-2011-salad/source/blender/collada/EffectExporter.cpp
    branches/soc-2011-salad/source/blender/editors/animation/anim_channels_defines.c
    branches/soc-2011-salad/source/blender/editors/animation/anim_channels_edit.c
    branches/soc-2011-salad/source/blender/editors/animation/anim_draw.c
    branches/soc-2011-salad/source/blender/editors/animation/keyframing.c
    branches/soc-2011-salad/source/blender/editors/armature/armature_intern.h
    branches/soc-2011-salad/source/blender/editors/armature/armature_ops.c
    branches/soc-2011-salad/source/blender/editors/armature/editarmature.c
    branches/soc-2011-salad/source/blender/editors/armature/poseUtils.c
    branches/soc-2011-salad/source/blender/editors/armature/poselib.c
    branches/soc-2011-salad/source/blender/editors/armature/poseobject.c
    branches/soc-2011-salad/source/blender/editors/datafiles/blenderbuttons.c
    branches/soc-2011-salad/source/blender/editors/datafiles/startup.blend.c
    branches/soc-2011-salad/source/blender/editors/gpencil/editaction_gpencil.c
    branches/soc-2011-salad/source/blender/editors/include/ED_anim_api.h
    branches/soc-2011-salad/source/blender/editors/include/UI_icons.h
    branches/soc-2011-salad/source/blender/editors/sound/sound_ops.c
    branches/soc-2011-salad/source/blender/editors/space_action/action_edit.c
    branches/soc-2011-salad/source/blender/editors/space_graph/graph_draw.c
    branches/soc-2011-salad/source/blender/editors/space_graph/space_graph.c
    branches/soc-2011-salad/source/blender/editors/space_nla/nla_draw.c
    branches/soc-2011-salad/source/blender/editors/space_nla/nla_edit.c
    branches/soc-2011-salad/source/blender/editors/space_nla/nla_intern.h
    branches/soc-2011-salad/source/blender/editors/space_nla/nla_ops.c
    branches/soc-2011-salad/source/blender/editors/space_outliner/CMakeLists.txt
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner_intern.h
    branches/soc-2011-salad/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2011-salad/source/blender/editors/space_time/space_time.c
    branches/soc-2011-salad/source/blender/editors/space_view3d/drawanimviz.c
    branches/soc-2011-salad/source/blender/editors/space_view3d/drawarmature.c
    branches/soc-2011-salad/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-salad/source/blender/makesdna/DNA_armature_types.h
    branches/soc-2011-salad/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2011-salad/source/blender/makesdna/DNA_sequence_types.h
    branches/soc-2011-salad/source/blender/makesrna/RNA_access.h
    branches/soc-2011-salad/source/blender/makesrna/RNA_enum_types.h
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_armature.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_fcurve.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_pose.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_sequencer.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_sound.c
    branches/soc-2011-salad/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-salad/source/gameengine/Converter/BL_ArmatureObject.cpp
    branches/soc-2011-salad/source/gameengine/Converter/BL_ArmatureObject.h
    branches/soc-2011-salad/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/soc-2011-salad/source/gameengine/Converter/BL_ShapeDeformer.cpp
    branches/soc-2011-salad/source/gameengine/Converter/BL_SkinDeformer.cpp
    branches/soc-2011-salad/source/gameengine/Converter/BL_SkinDeformer.h
    branches/soc-2011-salad/source/gameengine/Converter/CMakeLists.txt
    branches/soc-2011-salad/source/gameengine/Converter/SConscript
    branches/soc-2011-salad/source/gameengine/Ketsji/BL_Action.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/BL_ActionManager.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/CMakeLists.txt
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_GameObject.h
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_KetsjiEngine.h
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_Scene.h
    branches/soc-2011-salad/source/gameengine/Ketsji/KX_SoundActuator.cpp
    branches/soc-2011-salad/source/gameengine/SceneGraph/SG_IObject.h

Added Paths:
-----------
    branches/soc-2011-salad/intern/audaspace/intern/AUD_AnimateableProperty.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_AnimateableProperty.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerEntry.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerEntry.h
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerHandle.cpp
    branches/soc-2011-salad/intern/audaspace/intern/AUD_SequencerHandle.h
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner_draw.c
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner_edit.c
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner_select.c
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner_tools.c
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner_tree.c

Removed Paths:
-------------
    branches/soc-2011-salad/source/blender/editors/space_outliner/outliner.c

Property Changed:
----------------
    branches/soc-2011-salad/
    branches/soc-2011-salad/intern/audaspace/OpenAL/


Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38833
/trunk/blender:36834-38831
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38846
/branches/soc-2011-tomato:36831-38833
/trunk/blender:36834-38846

Modified: branches/soc-2011-salad/build_files/cmake/cmake_consistency_check.py
===================================================================
--- branches/soc-2011-salad/build_files/cmake/cmake_consistency_check.py	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/build_files/cmake/cmake_consistency_check.py	2011-07-30 11:03:18 UTC (rev 38849)
@@ -211,6 +211,10 @@
             sources_h[:] = []
             sources_c[:] = []
 
+            # reset
+            sources_h[:] = []
+            sources_c[:] = []
+
     filen.close()
 
 

Modified: branches/soc-2011-salad/doc/python_api/rst/bge.types.rst
===================================================================
--- branches/soc-2011-salad/doc/python_api/rst/bge.types.rst	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/doc/python_api/rst/bge.types.rst	2011-07-30 11:03:18 UTC (rev 38849)
@@ -1564,24 +1564,38 @@
       :arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc)
 	  :type speed: float
 
-   .. method:: getActionFrame(layer)
+   .. method:: stopAction(layer=0)
+      
+	  Stop playing the action on the given layer.
+	  
+	  :arg layer: The layer to stop playing.
+	  :type layer: integer
+	  
+   .. method:: getActionFrame(layer=0)
    
-      Gets the current frame of the action playing in the supplied layer
+      Gets the current frame of the action playing in the supplied layer.
 	  
 	  :arg layer: The layer that you want to get the frame from.
 	  :type layer: integer
 	  
 	  :return: The current frame of the action
 	  
-   .. method:: setActionFrame(layer, frame)
+   .. method:: setActionFrame(frame, layer=0)
    
-      Set the current frame of the action playing in the supplied layer
+      Set the current frame of the action playing in the supplied layer.
 	  
 	  :arg layer: The layer where you want to set the frame
 	  :type layer: integer
 	  :arg frame: The frame to set the action to
 	  :type frame: float
 
+   .. method:: isPlayingAction(layer=0)
+   
+       Checks to see if there is an action playing in the given layer.
+	   
+	   :arg layer: The layer to check for a playing action.
+	   :type layer: integer
+
 .. class:: KX_IpoActuator(SCA_IActuator)
 
    IPO actuator activates an animation.

Modified: branches/soc-2011-salad/intern/audaspace/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/intern/audaspace/CMakeLists.txt	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/intern/audaspace/CMakeLists.txt	2011-07-30 11:03:18 UTC (rev 38849)
@@ -68,6 +68,8 @@
 	FX/AUD_SuperposeReader.cpp
 	FX/AUD_VolumeFactory.cpp
 	intern/AUD_3DMath.h
+	intern/AUD_AnimateableProperty.cpp
+	intern/AUD_AnimateableProperty.h
 	intern/AUD_Buffer.cpp
 	intern/AUD_Buffer.h
 	intern/AUD_BufferReader.cpp
@@ -109,8 +111,12 @@
 	intern/AUD_ReferenceHandler.cpp
 	intern/AUD_ResampleReader.cpp
 	intern/AUD_ResampleReader.h
+	intern/AUD_SequencerEntry.cpp
+	intern/AUD_SequencerEntry.h
 	intern/AUD_SequencerFactory.cpp
 	intern/AUD_SequencerFactory.h
+	intern/AUD_SequencerHandle.cpp
+	intern/AUD_SequencerHandle.h
 	intern/AUD_SequencerReader.cpp
 	intern/AUD_SequencerReader.h
 	intern/AUD_SilenceFactory.cpp

Modified: branches/soc-2011-salad/intern/audaspace/FX/AUD_DoubleReader.cpp
===================================================================
--- branches/soc-2011-salad/intern/audaspace/FX/AUD_DoubleReader.cpp	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/intern/audaspace/FX/AUD_DoubleReader.cpp	2011-07-30 11:03:18 UTC (rev 38849)
@@ -33,9 +33,6 @@
 
 #include <cstring>
 
-static const char* specs_error = "AUD_DoubleReader: Both readers have to have "
-								 "the same specs.";
-
 AUD_DoubleReader::AUD_DoubleReader(AUD_Reference<AUD_IReader> reader1,
 								   AUD_Reference<AUD_IReader> reader2) :
 		m_reader1(reader1), m_reader2(reader2), m_finished1(false)

Modified: branches/soc-2011-salad/intern/audaspace/FX/AUD_LimiterReader.cpp
===================================================================
--- branches/soc-2011-salad/intern/audaspace/FX/AUD_LimiterReader.cpp	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/intern/audaspace/FX/AUD_LimiterReader.cpp	2011-07-30 11:03:18 UTC (rev 38849)
@@ -32,8 +32,6 @@
 #include "AUD_LimiterReader.h"
 #include "AUD_Buffer.h"
 
-#include <iostream>
-
 AUD_LimiterReader::AUD_LimiterReader(AUD_Reference<AUD_IReader> reader,
 									 float start, float end) :
 		AUD_EffectReader(reader),


Property changes on: branches/soc-2011-salad/intern/audaspace/OpenAL
___________________________________________________________________
Deleted: svn:mergeinfo
   - /branches/soc-2010-jwilkins/intern/audaspace/OpenAL:28499-37009
/branches/soc-2010-nicolasbishop/intern/audaspace/OpenAL:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38833
/trunk/blender/intern/audaspace/OpenAL:36834-38831

Modified: branches/soc-2011-salad/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
===================================================================
--- branches/soc-2011-salad/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp	2011-07-30 11:03:18 UTC (rev 38849)
@@ -178,10 +178,14 @@
 
 	m_device->lock();
 
+	// AUD_XXX Create a reference of our own object so that it doesn't get
+	// deleted before the end of this function
+	AUD_Reference<AUD_OpenALHandle> This = this;
+
 	if(m_status == AUD_STATUS_PLAYING)
-		m_device->m_playingSounds.remove(this);
+		m_device->m_playingSounds.remove(This);
 	else
-		m_device->m_pausedSounds.remove(this);
+		m_device->m_pausedSounds.remove(This);
 
 	m_device->unlock();
 
@@ -492,10 +496,10 @@
 
 bool AUD_OpenALDevice::AUD_OpenALHandle::isRelative()
 {
-	int result = std::numeric_limits<float>::quiet_NaN();
+	int result;
 
 	if(!m_status)
-		return result;
+		return false;
 
 	m_device->lock();
 
@@ -1164,7 +1168,7 @@
 
 	// check format
 	if(specs.channels == AUD_CHANNELS_INVALID)
-		return NULL;
+		return AUD_Reference<AUD_IHandle>();
 
 	if(m_specs.format != AUD_FORMAT_FLOAT32)
 		reader = new AUD_ConverterReader(reader, m_specs);
@@ -1172,7 +1176,7 @@
 	ALenum format;
 
 	if(!getFormat(format, specs))
-		return NULL;
+		return AUD_Reference<AUD_IHandle>();
 
 	lock();
 	alcSuspendContext(m_context);

Modified: branches/soc-2011-salad/intern/audaspace/intern/AUD_3DMath.h
===================================================================
--- branches/soc-2011-salad/intern/audaspace/intern/AUD_3DMath.h	2011-07-30 10:14:50 UTC (rev 38848)
+++ branches/soc-2011-salad/intern/audaspace/intern/AUD_3DMath.h	2011-07-30 11:03:18 UTC (rev 38849)
@@ -32,15 +32,16 @@
 #ifndef AUD_3DMATH
 #define AUD_3DMATH
 
-class AUD_Quaternion
+#include <cmath>
+
+class AUD_Vector3
 {
 private:
 	union
 	{
-		float m_v[4];
+		float m_v[3];
 		struct
 		{
-			float m_w;
 			float m_x;
 			float m_y;
 			float m_z;
@@ -49,28 +50,18 @@
 
 public:
 	/**
-	 * Creates a new quaternion.
-	 * \param w The w component.
+	 * Creates a new 3 dimensional vector.
 	 * \param x The x component.
 	 * \param y The y component.
 	 * \param z The z component.
 	 */
-	inline AUD_Quaternion(float w, float x, float y, float z) :
-		m_w(w), m_x(x), m_y(y), m_z(z)
+	inline AUD_Vector3(float x = 0, float y = 0, float z = 0) :
+		m_x(x), m_y(y), m_z(z)
 	{
 	}
 
 	/**
-	 * Retrieves the w component of the quarternion.
-	 * \return The w component.
-	 */
-	inline const float& w() const
-	{
-		return m_w;
-	}
-
-	/**
-	 * Retrieves the x component of the quarternion.
+	 * Retrieves the x component of the vector.
 	 * \return The x component.
 	 */
 	inline const float& x() const
@@ -79,7 +70,7 @@
 	}
 
 	/**
-	 * Retrieves the y component of the quarternion.
+	 * Retrieves the y component of the vector.
 	 * \return The y component.
 	 */
 	inline const float& y() const
@@ -88,7 +79,7 @@
 	}
 
 	/**
-	 * Retrieves the z component of the quarternion.
+	 * Retrieves the z component of the vector.
 	 * \return The z component.
 	 */
 	inline const float& z() const
@@ -98,34 +89,80 @@
 
 	/**
 	 * Retrieves the components of the vector.
-	 * \param destination Where the 4 float values should be saved to.
+	 * \param destination Where the 3 float values should be saved to.
 	 */
 	inline void get(float* destination) const
 	{
-		destination[0] = m_w;
-		destination[1] = m_x;
-		destination[2] = m_y;
-		destination[3] = m_z;
+		destination[0] = m_x;
+		destination[1] = m_y;
+		destination[2] = m_z;
 	}
 
 	/**
 	 * Retrieves the components of the vector.
-	 * \return The components as float[4].
+	 * \return The components as float[3].
 	 */
 	inline const float* get() const
 	{
 		return m_v;
 	}
+
+	/**
+	 * Retrieves the length of the vector.
+	 * \return The length of the vector.
+	 */
+	inline float length() const
+	{
+		return sqrt(m_x*m_x + m_y*m_y + m_z*m_z);
+	}
+
+	inline AUD_Vector3 cross(const AUD_Vector3& op) const
+	{
+		return AUD_Vector3(m_y * op.m_z - m_z * op.m_y,
+						   m_z * op.m_x - m_x * op.m_z,
+						   m_x * op.m_y - m_y * op.m_x);
+	}
+
+	/**
+	 * Retrieves the dot product.

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list