UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

111 lines (86 loc) 3.14 kB
/** * OpenAPI definition * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: v0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ import {ApiClient} from '../ApiClient.js'; /** * The Rotation model module. * @module model/Rotation * @version v0 */ export class Rotation { /** * Constructs a new <code>Rotation</code>. * Rotation of an can be represented either by 3 or 4 coordinates (euler angles, quaternions), the server will store and distribute it either way. * @alias Rotation */ constructor() { /** x * @type {Number} */ this.x = undefined; /** y * @type {Number} */ this.y = undefined; /** z * @type {Number} */ this.z = undefined; /** angle * Typically null, if not, rotation is quaternion * @type {Number} */ this.angle = undefined; Rotation.initialize(this); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ static initialize(obj) { } /** * Constructs a <code>Rotation</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {Rotation} obj Optional instance to populate. * @return {Rotation} The populated <code>Rotation</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new Rotation(); if (data.hasOwnProperty('x')) { obj['x'] = ApiClient.convertToType(data['x'], 'Number'); } if (data.hasOwnProperty('y')) { obj['y'] = ApiClient.convertToType(data['y'], 'Number'); } if (data.hasOwnProperty('z')) { obj['z'] = ApiClient.convertToType(data['z'], 'Number'); } if (data.hasOwnProperty('angle')) { obj['angle'] = ApiClient.convertToType(data['angle'], 'Number'); } } return obj; } /** * Validates the JSON data with respect to <code>Rotation</code>. * @param {Object} data The plain JavaScript object bearing properties of interest. * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Rotation</code>. */ static validateJSON(data) { return true; } } export default Rotation;