Package com.ardor3d.math.type

Examples of com.ardor3d.math.type.ReadOnlyVector3


        // 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();
        if (lengthSquared < MathUtils.EPSILON) {
View Full Code Here


            final Vector3 target) {

        assert (null != from) : "parameter 'from' can not be null";
        assert (null != to) : "parameter 'to' can not be null";

        final ReadOnlyVector3 p0 = getControlPointStart();
        final ReadOnlyVector3 p3 = getCotnrolPointEnd();

        final Spline spline = getCurve().getSpline();

        return spline.interpolate(p0, from, to, p3, delta, target);
    }
View Full Code Here

    /**
     * @return The initial control point, will not be <code>null</code>.
     */
    protected ReadOnlyVector3 getControlPointStart() {
        ReadOnlyVector3 control = null;

        final int fromIndex = getIndex();

        switch (getRepeatType()) {
            case CLAMP:
View Full Code Here

    /**
     * @return The final control point, will not be <code>null</code>.
     */
    protected ReadOnlyVector3 getCotnrolPointEnd() {
        ReadOnlyVector3 control = null;

        final int toIndex = getIndex();

        switch (getRepeatType()) {
            case CLAMP:
View Full Code Here

        if (normalsMode != NormalsMode.Off) {
            final ContextCapabilities caps = context.getCapabilities();
            switch (normalsMode) {
                case NormalizeIfScaled:
                    if (worldTransform.isRotationMatrix()) {
                        final ReadOnlyVector3 scale = worldTransform.getScale();
                        if (!(scale.getX() == 1.0 && scale.getY() == 1.0 && scale.getZ() == 1.0)) {
                            if (scale.getX() == scale.getY() && scale.getY() == scale.getZ()
                                    && caps.isOpenGL1_2Supported()
                                    && rendRecord.getNormalMode() != GL2ES1.GL_RESCALE_NORMAL) {
                                if (rendRecord.getNormalMode() == GLLightingFunc.GL_NORMALIZE) {
                                    gl.glDisable(GLLightingFunc.GL_NORMALIZE);
                                }
View Full Code Here

        // If we are currently in the process of rendering this container to a texture...
        if (UIContainer._drawingStandin) {
            renderer.setOrtho();

            // hold onto our old translation
            final ReadOnlyVector3 wTrans = getWorldTranslation();
            final double x = wTrans.getX(), y = wTrans.getY(), z = wTrans.getZ();
            final Matrix3 rot = Matrix3.fetchTempInstance().set(getWorldRotation());

            // set our new translation so that we are drawn in the bottom left corner of the texture.
            double newX = 0, newY = 0;
            if (width > dispWidth && x < 0) {
View Full Code Here

    /**
     * @param x
     *            the new screen x coordinate of this component's origin (usually its lower left corner.)
     */
    public void setHudX(final int x) {
        final ReadOnlyVector3 translation = getTranslation();
        setTranslation(getHudX() - translation.getX() + x, translation.getY(), translation.getZ());
    }
View Full Code Here

    /**
     * @param y
     *            the new screen y coordinate of this component's origin (usually its lower left corner.)
     */
    public void setHudY(final int y) {
        final ReadOnlyVector3 translation = getTranslation();
        setTranslation(translation.getX(), getHudY() - translation.getY() + y, translation.getZ());
    }
View Full Code Here

     * Set the x translation from the lower left corner of our parent's content area to the origin of this component.
     *
     * @param x
     */
    public void setLocalX(final int x) {
        final ReadOnlyVector3 translation = getTranslation();
        setTranslation(x, translation.getY(), translation.getZ());
        fireComponentDirty();
    }
View Full Code Here

     * Set the y translation from the lower left corner of our parent's content area to the origin of this component.
     *
     * @param y
     */
    public void setLocalY(final int y) {
        final ReadOnlyVector3 translation = getTranslation();
        setTranslation(translation.getX(), y, translation.getZ());
        fireComponentDirty();
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.math.type.ReadOnlyVector3

Copyright © 2018 www.massapicom. 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.