commonMain.dsl.functions.UIntVector2Functions.kt Maven / Gradle / Ivy
package org.openrndr.orsl.shadergenerator.dsl.functions
import org.openrndr.orsl.shadergenerator.dsl.*
import org.openrndr.math.*
import kotlin.jvm.JvmName
@Suppress("INAPPLICABLE_JVM_NAME")
interface UIntVector2Functions {
@JvmName("divVdSuiv2")
operator fun Double.div(right: Symbol): Symbol = functionSymbol(this, right, "($0 / vec2($1))")
@JvmName("timesSuiv2Vd")
operator fun Symbol.times(right: Double): Symbol = functionSymbol(this, right, "(vec2($0) * $1)")
@JvmName("timesSuiv2Sd")
operator fun Symbol.times(right: Symbol): Symbol =
functionSymbol(this, right, "($0 * $1)")
val Symbol.x: Symbol
@JvmName("xSuiv2")
get() = functionSymbol(this, "$0.x")
val Symbol.y: Symbol
@JvmName("ySuiv2")
get() = functionSymbol(this, "$0.y")
@Suppress("FunctionName")
@JvmName("uivec2SuiSui")
fun UIntVector2(x: Symbol, y: Symbol): Symbol =
functionSymbol(x, y, "ivec2($0, $1)")
/**
* cast UIntVector3 to IntVector3
*/
val Symbol.int: Symbol
@JvmName("intSuiv2")
get() = functionSymbol(this, "ivec2($0)")
/**
* cast UIntVector3 to Vector3
*/
val Symbol.double: Symbol
@JvmName("doubleSuiv2")
get() = functionSymbol(this, "vec2($0)")
}
//val UIntVector3.symbol: Symbol
// get() {
// return symbol(glsl(this)!!)
// }
© 2015 - 2024 Weber Informatics LLC | Privacy Policy