Examples of applyPost()


Examples of com.ardor3d.math.Matrix3.applyPost()

        transMatrix.setValue(2, 0, Math.abs(transMatrix.getM20()));
        transMatrix.setValue(2, 1, Math.abs(transMatrix.getM21()));
        transMatrix.setValue(2, 2, Math.abs(transMatrix.getM22()));

        _compVect1.set(getXExtent() * scale.getX(), getYExtent() * scale.getY(), getZExtent() * scale.getZ());
        transMatrix.applyPost(_compVect1, _compVect1);
        // Assign the biggest rotations after scales.
        box.setXExtent(Math.abs(_compVect1.getX()));
        box.setYExtent(Math.abs(_compVect1.getY()));
        box.setZExtent(Math.abs(_compVect1.getZ()));

View Full Code Here

Examples of com.ardor3d.math.Matrix3.applyPost()

        }

        _compVect1.set(bs.getCenter()).subtractLocal(_center);
        final Matrix3 tempMa = Matrix3.fetchTempInstance().fromAxes(_xAxis, _yAxis, _zAxis);

        tempMa.applyPost(_compVect1, _compVect1);

        boolean result = false;
        if (Math.abs(_compVect1.getX()) < bs.getRadius() + _extent.getX()
                && Math.abs(_compVect1.getY()) < bs.getRadius() + _extent.getY()
                && Math.abs(_compVect1.getZ()) < bs.getRadius() + _extent.getZ()) {
View Full Code Here

Examples of com.ardor3d.math.Matrix3.applyPost()

        // Compute the additional rotation required for the billboard to face
        // the camera. To do this, the camera must be inverse-transformed into
        // the model space of the billboard.
        _look.set(camera.getLocation()).subtractLocal(_worldTransform.getTranslation());
        final Matrix3 worldMatrix = Matrix3.fetchTempInstance().set(_worldTransform.getMatrix());
        worldMatrix.applyPost(_look, _left); // coopt left for our own purposes.
        final ReadOnlyVector3 scale = _worldTransform.getScale();
        _left.divideLocal(scale);

        // squared length of the camera projection in the xz-plane
        final double lengthSquared = _left.getX() * _left.getX() + _left.getZ() * _left.getZ();
 
View Full Code Here

Examples of com.ardor3d.math.Matrix3.applyPost()

                if ((Double.doubleToLongBits(pVelocity.lengthSquared()) & 0x1d) != 0) {
                    workMat.fromAngleAxis(_turnSpeed * dt, axis);
                } else {
                    workMat.fromAngleAxis(-_turnSpeed * dt, axis);
                }
                workMat.applyPost(pVelocity, pVelocity);
            }
        } else {
            final Vector3 axis = workVect2.crossLocal(workVect);
            // IN THE INNER ZONE...
            // Alter the heading based on how fast we are going
View Full Code Here

Examples of com.ardor3d.math.Matrix3.applyPost()

            if ((index & 0x1f) != 0) {
                workMat.fromAngleAxis(_turnSpeed * dt, axis);
            } else {
                workMat.fromAngleAxis(-_turnSpeed * dt, axis);
            }
            workMat.applyPost(pVelocity, pVelocity);
        }
        Vector3.releaseTempInstance(workVect);
        Vector3.releaseTempInstance(workVect2);
        Matrix3.releaseTempInstance(workMat);
    }
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix3.applyPost()

        } else {
            box = (BoundingBox) store;
        }

        _center.multiply(scale, box._center);
        rotate.applyPost(box._center, box._center);
        box._center.addLocal(translate);

        final Matrix3 transMatrix = Matrix3.fetchTempInstance();
        transMatrix.set(rotate);
        // Make the rotation matrix all positive to get the maximum x/y/z extent
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix3.applyPost()

        @Override
        public void prepare(final ParticleSystem system) {
            _vector.set(_windDirection);
            final ReadOnlyMatrix3 mat = system.getEmitterTransform().getMatrix();
            if (_rotateWithScene && !mat.isIdentity()) {
                mat.applyPost(_vector, _vector);
            }
        }

        @Override
        public void apply(final double dt, final Particle p, final int index) {
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix3.applyPost()

        @Override
        public void prepare(final ParticleSystem system) {
            vector.set(gravity);
            final ReadOnlyMatrix3 mat = system.getEmitterTransform().getMatrix();
            if (rotateWithScene && !mat.isIdentity()) {
                mat.applyPost(vector, vector);
            }
        }

        @Override
        public void apply(final double dt, final Particle p, final int index) {
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix3.applyPost()

            _line.setOrigin(_axis.getOrigin());
            _line.setDirection(_axis.getDirection());
            final ReadOnlyMatrix3 mat = system.getEmitterTransform().getMatrix();
            if (_transformWithScene && !mat.isIdentity()) {
                final Vector3 temp = Vector3.fetchTempInstance();
                mat.applyPost(_line.getOrigin(), temp);
                _line.setOrigin(temp);
                mat.applyPost(_line.getDirection(), temp);
                _line.setDirection(temp);
                Vector3.releaseTempInstance(temp);
            }
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyMatrix3.applyPost()

            final ReadOnlyMatrix3 mat = system.getEmitterTransform().getMatrix();
            if (_transformWithScene && !mat.isIdentity()) {
                final Vector3 temp = Vector3.fetchTempInstance();
                mat.applyPost(_line.getOrigin(), temp);
                _line.setOrigin(temp);
                mat.applyPost(_line.getDirection(), temp);
                _line.setDirection(temp);
                Vector3.releaseTempInstance(temp);
            }
            if (_type == VT_CYLINDER) {
                _rot.fromAngleAxis(-_divergence, _line.getDirection());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.