Examples of multiplyLocal()


Examples of com.ardor3d.math.Vector3.multiplyLocal()

            if (_floor.getNormal().smallestAngleBetween(tempVect1) > MathUtils.HALF_PI) {
                // reflect our velocity vector across the floor plane
                _floor.reflectVector(tempVect1, tempVect1);

                // apply the "bounciness" factor
                tempVect1.multiplyLocal(scale * _bounciness);

                // write back to particle
                particle.setVelocity(tempVect1);
            }
            Vector3.releaseTempInstance(tempVect1);
View Full Code Here

Examples of com.ardor3d.math.Vector3.multiplyLocal()

                    if (orient != 0) {
                        tempQuat.apply(triModel.get(x), tempVec3);
                    } else {
                        tempVec3.set(triModel.get(x));
                    }
                    tempVec3.multiplyLocal(currSize).addLocal(_position);
                    BufferUtils.setInBuffer(tempVec3, vertexBuffer, startIndex + x);
                }
                Quaternion.releaseTempInstance(tempQuat);
                break;
            }
View Full Code Here

Examples of com.ardor3d.math.Vector3.multiplyLocal()

        }
        result.setX(MathUtils.cos(randDir) * MathUtils.sin(randAngle));
        result.setY(MathUtils.cos(randAngle));
        result.setZ(MathUtils.sin(randDir) * MathUtils.sin(randAngle));
        rotateVectorSpeed(result);
        result.multiplyLocal(getInitialVelocity());
        return result;
    }

    /**
     * Apply the rotation matrix to a given vector representing a particle velocity.
View Full Code Here

Examples of com.ardor3d.math.Vector3.multiplyLocal()

        final double distance = Math.max(radius, _minimumLightDistance);

        final Vector3 tmpVec = Vector3.fetchTempInstance();
        tmpVec.set(direction);
        tmpVec.negateLocal();
        tmpVec.multiplyLocal(distance);
        tmpVec.addLocal(center);

        // temporary location
        shadowCam.setLocation(tmpVec);
        shadowCam.lookAt(center, Vector3.UNIT_Y);
View Full Code Here

Examples of com.ardor3d.math.Vector4.multiplyLocal()

     *            the position (in terms of vectors, not floats) of the vector to multiply
     */
    public static void multInBuffer(final ReadOnlyVector4 toMult, final FloatBuffer buf, final int index) {
        final Vector4 temp = Vector4.fetchTempInstance();
        populateFromBuffer(temp, buf, index);
        temp.multiplyLocal(toMult);
        setInBuffer(temp, buf, index);
        Vector4.releaseTempInstance(temp);
    }

    /**
 
View Full Code Here

Examples of com.ardor3d.math.Vector4.multiplyLocal()

        final Vector4 position = Vector4.fetchTempInstance();
        position.set((screenPosition.getX() / getWidth() - _viewPortLeft) / (_viewPortRight - _viewPortLeft) * 2 - 1,
                (screenPosition.getY() / getHeight() - _viewPortBottom) / (_viewPortTop - _viewPortBottom) * 2 - 1,
                zDepth * 2 - 1, 1);
        _modelViewProjectionInverse.applyPre(position, position);
        position.multiplyLocal(1.0 / position.getW());
        store.setX(position.getX());
        store.setY(position.getY());
        store.setZ(position.getZ());

        Vector4.releaseTempInstance(position);
View Full Code Here

Examples of com.ardor3d.math.Vector4.multiplyLocal()

        }
        checkModelViewProjection();
        final Vector4 position = Vector4.fetchTempInstance();
        position.set(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), 1);
        _modelViewProjection.applyPre(position, position);
        position.multiplyLocal(1.0 / position.getW());
        store.setX(position.getX());
        store.setY(position.getY());
        store.setZ(position.getZ());
        Vector4.releaseTempInstance(position);
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.