/** * Saves the local-to-world transform before appending a transform. * The specified transform matrix is post-multiplied with the current * local-to-world transform, such that the specified transform is applied * first when transforming local coordinates to world coordinates. * @param transform the transform to append. */ public void pushLocalToWorld(Matrix44 transform) { super.pushLocalToWorld(transform); for (int i=0,plane=1; i<6; ++i,plane<<=1) { // for all planes _planesStack.push(new Plane(_planes[i])); // save plane if ((_active&plane)!=0) // if plane is active _planes[i].transformWithInverse(transform); // transform it } }
/** * Saves the local-to-world transform before appending a transform. * The specified transform matrix is post-multiplied with the current * local-to-world transform, such that the specified transform is applied * first when transforming local coordinates to world coordinates. * @param transform the transform to append. */ public void pushLocalToWorld(Matrix44 transform) { super.pushLocalToWorld(transform); _pickSegmentStack.push(new Segment(_pickSegment)); _pickSegment.transform(transform.inverse()); _nearPoint = _pickSegment.getA(); _farPoint = _pickSegment.getB(); }