www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: jumong on September 03, 2010, 11:58:56 am

Title: How to convert simplevector to Vector3f?
Post by: jumong on September 03, 2010, 11:58:56 am
hi,
How to convert simplevector to Vector3f?
What different of simplevector and vector3f?
help
Title: Re: How to convert simplevector to Vector3f?
Post by: EgonOlsen on September 03, 2010, 12:29:42 pm
What is Vector3f?
Title: Re: How to convert simplevector to Vector3f?
Post by: jumong on September 03, 2010, 12:33:38 pm
vector3f is used in DynamicsWorld
Title: Re: How to convert simplevector to Vector3f?
Post by: EgonOlsen 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 (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.
Title: Re: How to convert simplevector to Vector3f?
Post by: jumong on September 03, 2010, 04:06:16 pm
thank you very much!!!