Преглед изворни кода

vectors and matrices should be passed by reference. Fixes compile error on 32-bit windows

rdb пре 11 година
родитељ
комит
9184fe71a9

+ 1 - 1
panda/src/physx/physxActor.cxx

@@ -163,7 +163,7 @@ get_name() const {
 //               transform from the controller's transform.
 ////////////////////////////////////////////////////////////////////
 void PhysxActor::
-update_transform(const LMatrix4f m) {
+update_transform(const LMatrix4f &m) {
 
   // Active transforms are update AFTER scene.fetchResults() has
   // been called, and thus can contain removed objects. So either

+ 1 - 1
panda/src/physx/physxActor.h

@@ -180,7 +180,7 @@ PUBLISHED:
   INLINE void ls(ostream &out, int indent_level=0) const;
 
 public:
-  void update_transform(const LMatrix4f m);
+  void update_transform(const LMatrix4f &m);
 
 ////////////////////////////////////////////////////////////////////
 PUBLISHED:

+ 2 - 2
panda/src/physx/physxBodyDesc.cxx

@@ -279,7 +279,7 @@ get_sleep_damping() const {
 //               of mass.
 ////////////////////////////////////////////////////////////////////
 void PhysxBodyDesc::
-set_mass_local_mat(const LMatrix4f mat) {
+set_mass_local_mat(const LMatrix4f &mat) {
 
   _desc.massLocalPose = PhysxManager::mat4_to_nxMat34(mat);
 }
@@ -303,7 +303,7 @@ get_mass_local_mat() const {
 //               bodies mass frame.
 ////////////////////////////////////////////////////////////////////
 void PhysxBodyDesc::
-set_mass_space_inertia(const LVector3f inertia) {
+set_mass_space_inertia(const LVector3f &inertia) {
 
   _desc.massSpaceInertia = PhysxManager::vec3_to_nxVec3(inertia);
 }

+ 2 - 2
panda/src/physx/physxBodyDesc.h

@@ -46,8 +46,8 @@ PUBLISHED:
   void set_solver_iteration_count(unsigned int count);
   void set_sleep_energy_threshold(float threshold);
   void set_sleep_damping(float damping);
-  void set_mass_local_mat(const LMatrix4f mat);
-  void set_mass_space_inertia(const LVector3f inertia);
+  void set_mass_local_mat(const LMatrix4f &mat);
+  void set_mass_space_inertia(const LVector3f &inertia);
   void set_flag(PhysxBodyFlag flag, bool value);
   void set_ccd_motion_threshold(float threshold);
   void set_wake_up_counter(float value);