Author Topic: How to convert simplevector to Vector3f?  (Read 1574 times)

Offline jumong

  • byte
  • *
  • Posts: 19
    • View Profile
How to convert simplevector to Vector3f?
« on: September 03, 2010, 11:58:56 am »
hi,
How to convert simplevector to Vector3f?
What different of simplevector and vector3f?
help

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: How to convert simplevector to Vector3f?
« Reply #1 on: September 03, 2010, 12:29:42 pm »
What is Vector3f?

Offline jumong

  • byte
  • *
  • Posts: 19
    • View Profile
Re: How to convert simplevector to Vector3f?
« Reply #2 on: September 03, 2010, 12:33:38 pm »
vector3f is used in DynamicsWorld

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: How to convert simplevector to Vector3f?
« Reply #3 on: September 03, 2010, 12:46:27 pm »
Well...i assume that you are talking about the javax.vecmath Vector3f then? In that case, the actual conversion is sv.x=v3f.x, sv.y=v3f.y and sv.z=v3f.z. However, coordinate systems of the actual vectors may differ (http://www.jpct.net/wiki/index.php/Coordinate_system). The most usual form is that the coordinate system of jPCT is rotated 90 around the x-axis compared to others. If that is the case, just negate y and z to convert between the two.

Offline jumong

  • byte
  • *
  • Posts: 19
    • View Profile
Re: How to convert simplevector to Vector3f?
« Reply #4 on: September 03, 2010, 04:06:16 pm »
thank you very much!!!