/** * Sets the transform component of this SceneGraphPath to the value of * the passed transform. * @param trans the transform to be copied. trans should be the * localToVworld matrix of this SceneGraphPath object. */ public final void setTransform(Transform3D trans) { transform.set(trans); }
/** * Returns the behaviors "home" transform. * * @param home transform to be returned * @since Java 3D 1.3 */ public void getHomeTransform(Transform3D home ) { home.set( homeTransform ); }
/** * Retrieve the SensorRead's transform and place it in result * @param result the recipient of the this sensor's reading */ public void get(Transform3D result) { result.set(read); }
/** * Constructs and initializes a transform from the 4 x 4 matrix. The * type of the constructed transform will be classified automatically. * @param m1 the 4 x 4 transformation matrix */ public Transform3D(Matrix4d m1) { set(m1); }
/** * Constructs and initializes a transform from the quaternion, * translation, and scale values. The scale is applied only to the * rotational components of the matrix (upper 3 x 3) and not to the * translational components of the matrix. * @param q1 the quaternion value representing the rotational component * @param t1 the translational component of the matrix * @param s the scale value applied to the rotational components */ public Transform3D(Quat4f q1, Vector3f t1, float s) { set(q1, t1, s); }
/** * Constructs a transform and initializes it to the upper 4 x 4 * of the GMatrix argument. If the parameter matrix is * smaller than 4 x 4, the remaining elements in the transform matrix are * assigned to zero. * @param m1 the GMatrix */ public Transform3D(GMatrix m1) { set(m1); }
/** * Constructs and initializes a transform from the rotation matrix, * translation, and scale values. The scale is applied only to the * rotational component of the matrix (upper 3x3) and not to the * translational component of the matrix. * @param m1 the rotation matrix representing the rotational component * @param t1 the translational component of the matrix * @param s the scale value applied to the rotational components */ public Transform3D(Matrix3f m1, Vector3d t1, double s) { set(m1, t1, s); }
/** * Retrieves the head to head-tracker coordinate system transform. * @param t the object that will receive the transform */ public void getHeadToHeadTracker(Transform3D t) { t.set(headToHeadTracker); }
/** * Retrieves the current model transform. * @param t the model transform that will receive the current * model transform */ public void getModelTransform(Transform3D t) { t.set(modelTransform); }
/** * Constructs and initializes a transform from the double precision array * of length 16; the top row of the matrix is initialized to the first * four elements of the array, and so on. The type of the transform is * classified internally. * @param matrix a float array of 16 */ public Transform3D(double[] matrix) { set(matrix); }
/** * Retrieves a copy of the texture transform object. * @param transform the transform object that will receive the * current texture transform. */ final void getTextureTransform(Transform3D transform) { transform.set(this.transform); }
final void set(SensorRead sensorRead) { this.time = sensorRead.time; this.numButtons = sensorRead.numButtons; this.read.set(sensorRead.read); if(numButtons > 0) System.arraycopy(sensorRead.buttonValues, 0, this.buttonValues, 0, sensorRead.numButtons); }
private void initHeadToHeadTracker() { // By default the center of the crystal eyes tracker is 20mm down // and 35 mm closer to the screen from the origin of head coordinates // (the center eye). Vector3d v = new Vector3d(0.0, 0.020, 0.035); headToHeadTracker.set(v); } }
void doSetModelTransform(Transform3D t) { this.modelTransform.set(t); computeCompositeTransform(); normalTransformNeedToUpdate = true; }
/** * Retrieves the last sensor reading and copies that value into * the specified argument. * * @param read the matrix that will receive the sensor reading */ public void getRead(Transform3D read) { if(demand_driven == true) device.pollAndProcessInput(); read.set(readings[currentIndex].read); }
public Transform3D readTransform3D( DataInput in ) throws IOException { Transform3D ret = new Transform3D(); ret.set( readMatrix4d( in )); return ret; }
/** * Sets the texture transform object used to transform texture * coordinates. A copy of the specified Transform3D object is * stored in this TextureAttributes object. * @param transform the new transform object */ final void setTextureTransform(Transform3D transform) { this.transform.set(transform); sendMessage(TRANSFORM_CHANGED, new Transform3D(transform), null); }
@Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); Transform3D trans = new Transform3D(); double[] matrix = new double[16]; for(int i=0; i<16; i++) matrix[i] = in.readDouble(); trans.set( matrix ); ((TransformGroup)node).setTransform( trans ); }
Transform3D getVworldToVpc() { if (vworldToVpc == null) vworldToVpc = new Transform3D(); vworldToVpc.set(getCurrentLocalToVworld(null)); vworldToVpc.invert(); return vworldToVpc; }
public void setCenter(final Point3f center) { this.center.set(center); final Vector3f translateV = new Vector3f(center); translate.set(translateV); translateTG.setTransform(translate); }