All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.cesium.DebugModelMatrixPrimitive.kt Maven / Gradle / Ivy

// Automatically generated - do not modify!

@file:JsModule("cesium")

@file:Suppress(
    "NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE",
)

package cesium

/**
 * Draws the axes of a reference frame defined by a matrix that transforms to world
 * coordinates, i.e., Earth's WGS84 coordinates.  The most prominent example is
 * a primitives `modelMatrix`.
 *
 * The X axis is red; Y is green; and Z is blue.
 *
 * This is for debugging only; it is not optimized for production use.
 * ```
 * primitives.add(new DebugModelMatrixPrimitive({
 *   modelMatrix : primitive.modelMatrix,  // primitive to debug
 *   length : 100000.0,
 *   width : 10.0
 * }));
 * ```
 * @see Online Documentation
 */
external class DebugModelMatrixPrimitive {
    /**
     * The length of the axes in meters.
     * @see Online Documentation
     */
    var length: Int

    /**
     * The width of the axes in pixels.
     * @see Online Documentation
     */
    var width: Double

    /**
     * Determines if this primitive will be shown.
     * @see Online Documentation
     */
    var show: Boolean

    /**
     * The 4x4 matrix that defines the reference frame, i.e., origin plus axes, to visualize.
     * @see Online Documentation
     */
    var modelMatrix: Matrix4

    /**
     * User-defined value returned when the primitive is picked.
     * @see Online Documentation
     */
    var id: Any

    /**
     * Returns true if this object was destroyed; otherwise, false.
     *
     * If this object was destroyed, it should not be used; calling any function other than
     * `isDestroyed` will result in a [DeveloperError] exception.
     * @return `true` if this object was destroyed; otherwise, `false`.
     * @see Online Documentation
     */
    fun isDestroyed(): Boolean

    /**
     * Destroys the WebGL resources held by this object.  Destroying an object allows for deterministic
     * release of WebGL resources, instead of relying on the garbage collector to destroy this object.
     *
     * Once an object is destroyed, it should not be used; calling any function other than
     * `isDestroyed` will result in a [DeveloperError] exception.  Therefore,
     * assign the return value (`undefined`) to the object as done in the example.
     * ```
     * p = p && p.destroy();
     * ```
     * @see Online Documentation
     */
    fun destroy()
}

inline fun DebugModelMatrixPrimitive(
    block: DebugModelMatrixPrimitive.() -> Unit,
): DebugModelMatrixPrimitive =
    DebugModelMatrixPrimitive().apply(block)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy