Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BABYLON.Mesh.prototype.{s,g}etLocalTranslation #116

Merged
merged 3 commits into from
Jan 7, 2014

Commits on Jan 2, 2014

  1. BABYLON.Mesh.prototype.{s,g}etLocalTranslation

    Fixed BABYLON.Mesh.prototype.{s,g}etLocalTranslation to take into account the parent.
    Renamed BABYLON.Mesh.prototype.{s,g}etLocalTranslation respectively by BABYLON.Mesh.prototype.setPositionWithLocalVector and BABYLON.Mesh.prototype.getPositionExpressedInLocalSpace
    Added BABYLON.Mesh.prototype.locallyTranslate
    
    BABYLON.Mesh.prototype.locallyTranslate adds the passed vector3 (expressed in local space; the origin of vector3 is the origin of the local space) after conversion to the parent space to the position (expressed in parent space)
    whereas BABYLON.Mesh.prototype.setPositionWithLocalVector sets the position (expressed in parent space) to the passed vector3 (expressed in local space but which the origin is the origin of the parent space) once it has been converted.
    
    The following code for BABYLON.Mesh.prototype.setPositionWithLocalVector could also be used. It explains itself the relation between setPositionWithLocalVector and locallyTranslate.
    
    BABYLON.Mesh.prototype.setPositionWithLocalVector = function(vector3) {
        this.position = BABYLON.Vector3.Zero();
        this.locallyTranslate(vector3);
    };
    gwenael-hagenmuller committed Jan 2, 2014
    Configuration menu
    Copy the full SHA
    be3128a View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2014

  1. Configuration menu
    Copy the full SHA
    7bae9a0 View commit details
    Browse the repository at this point in the history
  2. Changed as requested by deltakosh

    Left old functions with a comment (and a console.warn) on them to tag them as deprecated.
    gwenael-hagenmuller committed Jan 6, 2014
    Configuration menu
    Copy the full SHA
    423b20c View commit details
    Browse the repository at this point in the history