User:Cron Stardust/LLVector Spec

From Second Life Wiki
< User:Cron Stardust
Revision as of 19:47, 2 April 2014 by Cron Stardust (talk | contribs) (Starting skeleton - just needs the methods.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a simple specification for all LLVector formats. This does NOT include the LLColor formats.

Everything below is to be considered a minimum compatibility specification. Specific type implementations are free to add extra items as their own use cases dictate.

Every type that is only differentiated from another type by the precision, or number of bits, in its components shall be directly compatible: all such related types are to implement the same public interface.

It is recommended that types be freely convertible between themselves, but this is not a requirement.

Public Static Properties

  • zero
  • [xyzw]_axis
  • [xyzw]_axis_neg

Where you see [xyzw] create one property for each applicable character - a 2D type will only need X and Y for instance.

Public Constructors

  • Basic Constructor: ()
  • Direct-value Constructor: (x, y, ...)
  • Array Constructor: (*vec, len=C) // where C is the expected count of elements in X, Y, Z, W order.

Public Properties

  • Array of values: mV or mdV
    • Each element in the array represents the, if applicable, X, Y, Z, and W values of the vector.

Public Methods