NWH Aerodynamics
Search Results for

    Show / Hide Table of Contents

    Class AirfoilTransform

    Lightweight transform replacement for airfoil positioning and orientation calculations. Provides efficient local-to-world coordinate transformations without the overhead of Unity's Transform component.

    Inheritance
    object
    AirfoilTransform
    Namespace: NWH.Aerodynamics.Airfoils
    Assembly: NWH.Aerodynamics.dll
    Syntax
    [Serializable]
    public class AirfoilTransform

    Constructors

    | Edit this page View Source

    AirfoilTransform()

    Declaration
    public AirfoilTransform()
    | Edit this page View Source

    AirfoilTransform(Transform)

    Creates a new AirfoilTransform with the specified parent transform.

    Declaration
    public AirfoilTransform(Transform t)
    Parameters
    Type Name Description
    Transform t

    Parent transform to use as reference.

    Fields

    | Edit this page View Source

    transform

    Parent Unity Transform used as reference for coordinate transformations.

    Declaration
    public Transform transform
    Field Value
    Type Description
    Transform

    Properties

    | Edit this page View Source

    Forward

    Gets or sets the forward direction vector in world space. Setting this value updates the rotation to look in the specified direction.

    Declaration
    public Vector3 Forward { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    Position

    Gets or sets the world space position. Automatically converts between world and local coordinates using the parent transform.

    Declaration
    public Vector3 Position { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    Right

    Gets or sets the right direction vector in world space. Setting this value updates the rotation to align the right axis with the specified direction.

    Declaration
    public Vector3 Right { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    Rotation

    Gets or sets the world space rotation. Automatically converts between world and local rotation using the parent transform.

    Declaration
    public Quaternion Rotation { get; set; }
    Property Value
    Type Description
    Quaternion
    | Edit this page View Source

    Up

    Gets or sets the up direction vector in world space. Setting this value updates the rotation to align the up axis with the specified direction.

    Declaration
    public Vector3 Up { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    localPosition

    Gets or sets the local position relative to the parent transform. Setting this value automatically updates the transformation matrices.

    Declaration
    public Vector3 localPosition { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    localRotation

    Gets or sets the local rotation relative to the parent transform. Setting this value automatically updates the transformation matrices.

    Declaration
    public Quaternion localRotation { get; set; }
    Property Value
    Type Description
    Quaternion

    Methods

    | Edit this page View Source

    Initialize(Transform)

    Initializes the AirfoilTransform with a parent transform and updates transformation matrices.

    Declaration
    public void Initialize(Transform t)
    Parameters
    Type Name Description
    Transform t

    Parent transform to use as reference.

    | Edit this page View Source

    InverseTransformDirection(Vector3)

    Transforms a direction vector from world space to local space and normalizes the result.

    Declaration
    public Vector3 InverseTransformDirection(Vector3 value)
    Parameters
    Type Name Description
    Vector3 value

    Direction in world coordinates.

    Returns
    Type Description
    Vector3

    Normalized direction in local coordinates.

    | Edit this page View Source

    InverseTransformPoint(Vector3)

    Transforms a point from world space to local space.

    Declaration
    public Vector3 InverseTransformPoint(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    Point in world coordinates.

    Returns
    Type Description
    Vector3

    Point in local coordinates.

    | Edit this page View Source

    InverseTransformVector(Vector3)

    Transforms a vector from world space to local space using rotation only.

    Declaration
    public Vector3 InverseTransformVector(Vector3 value)
    Parameters
    Type Name Description
    Vector3 value

    Vector in world coordinates.

    Returns
    Type Description
    Vector3

    Vector in local coordinates.

    | Edit this page View Source

    TransformDirection(Vector3)

    Transforms a direction vector from local space to world space and normalizes the result.

    Declaration
    public Vector3 TransformDirection(Vector3 value)
    Parameters
    Type Name Description
    Vector3 value

    Direction in local coordinates.

    Returns
    Type Description
    Vector3

    Normalized direction in world coordinates.

    | Edit this page View Source

    TransformPoint(Vector3)

    Transforms a point from local space to world space.

    Declaration
    public Vector3 TransformPoint(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    Point in local coordinates.

    Returns
    Type Description
    Vector3

    Point in world coordinates.

    | Edit this page View Source

    TransformVector(Vector3)

    Transforms a vector from local space to world space using rotation only.

    Declaration
    public Vector3 TransformVector(Vector3 value)
    Parameters
    Type Name Description
    Vector3 value

    Vector in local coordinates.

    Returns
    Type Description
    Vector3

    Vector in world coordinates.

    | Edit this page View Source

    UpdateTRSMatrix()

    Updates the local-to-world and world-to-local transformation matrices. Call this after modifying local position or rotation to ensure accurate coordinate transformations.

    Declaration
    public void UpdateTRSMatrix()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics