+++ /dev/null
-/*******************************************************************************\r
- * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.proconf.g3d.base;\r
-\r
-import javax.vecmath.Color4f;\r
-\r
-import com.jme.renderer.ColorRGBA;\r
-\r
-public class VecmathJmeTools {\r
- \r
- public static javax.vecmath.Vector3f get(com.jme.math.Vector3f v) {\r
- return new javax.vecmath.Vector3f(v.x,v.y,v.z);\r
- }\r
- \r
- public static javax.vecmath.Vector3d getD(com.jme.math.Vector3f v) {\r
- return new javax.vecmath.Vector3d(v.x,v.y,v.z);\r
- }\r
- \r
- public static com.jme.math.Vector3f get(javax.vecmath.Tuple3f v) {\r
- return new com.jme.math.Vector3f(v.x,v.y,v.z);\r
- }\r
- \r
- public static com.jme.math.Vector3f get(javax.vecmath.Tuple3d v) {\r
- return new com.jme.math.Vector3f((float)v.x,(float)v.y,(float)v.z);\r
- }\r
- \r
- public static com.jme.math.Matrix3f get(javax.vecmath.Matrix3d m) {\r
- return new com.jme.math.Matrix3f((float)m.m00,(float)m.m01,(float)m.m02,(float)m.m10,(float)m.m11,(float)m.m12,(float)m.m20,(float)m.m21,(float)m.m22);\r
- }\r
- \r
- public static javax.vecmath.Quat4f get(com.jme.math.Quaternion v) {\r
- return new javax.vecmath.Quat4f(v.x,v.y,v.z,v.w);\r
- }\r
- \r
- public static javax.vecmath.Quat4d getD(com.jme.math.Quaternion v) {\r
- return new javax.vecmath.Quat4d(v.x,v.y,v.z,v.w);\r
- }\r
- \r
- \r
- public static com.jme.math.Quaternion get(javax.vecmath.Quat4f v) {\r
- return new com.jme.math.Quaternion(v.x,v.y,v.z,v.w);\r
- }\r
- \r
- public static com.jme.math.Quaternion get(javax.vecmath.Quat4d v) {\r
- return new com.jme.math.Quaternion((float)v.x,(float)v.y,(float)v.z,(float)v.w);\r
- }\r
- \r
- public static com.jme.math.Quaternion get(javax.vecmath.AxisAngle4f aa) {\r
- javax.vecmath.Quat4f v = new javax.vecmath.Quat4f();\r
- v.set(aa);\r
- return new com.jme.math.Quaternion(v.x,v.y,v.z,v.w);\r
- \r
- }\r
- \r
- public static com.jme.math.Quaternion get(javax.vecmath.AxisAngle4d aa) {\r
- javax.vecmath.Quat4f v = new javax.vecmath.Quat4f();\r
- v.set(aa);\r
- return new com.jme.math.Quaternion(v.x,v.y,v.z,v.w);\r
- \r
- }\r
- \r
- public static ColorRGBA get(Color4f c) {\r
- return new ColorRGBA(c.x,c.y,c.z,c.w);\r
- }\r
- \r
- public static Color4f get(ColorRGBA c) {\r
- return new Color4f(c.r,c.g,c.b,c.a);\r
- }\r
-\r
-}\r