Vector of 4 values, either x, y, z, w, u, v, z, w or r, g, b, a

Introduced properties

fun a: Float

gamnit :: Vec4 :: a

A value (redirection to z)
fun a=(value: Float)

gamnit :: Vec4 :: a=

Set A value (redirection for z=)
fun w: Float

gamnit :: Vec4 :: w

W value
fun w=(w: Float)

gamnit :: Vec4 :: w=

W value

Redefined properties

redef type SELF: Vec4

gamnit $ Vec4 :: SELF

Type of this instance, automatically specialized in every class
redef fun to_a: Array[Float]

gamnit $ Vec4 :: to_a

Return all values into a new Array[Float]
redef fun to_s: String

gamnit $ Vec4 :: to_s

User readable representation of self.

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
fun a: Float

gamnit :: Vec4 :: a

A value (redirection to z)
fun a=(value: Float)

gamnit :: Vec4 :: a=

Set A value (redirection for z=)
fun b: Float

gamnit :: Vec3 :: b

B value
fun b=(value: Float)

gamnit :: Vec3 :: b=

Set B value (redirection for z=)
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun g: Float

gamnit :: Vec3 :: g

G value
fun g=(value: Float)

gamnit :: Vec3 :: g=

Set G value (redirection for y=)
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun r: Float

gamnit :: Vec3 :: r

R value
fun r=(value: Float)

gamnit :: Vec3 :: r=

Set R value (redirection for x=)
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_a: Array[Float]

gamnit :: Vec3 :: to_a

Return all values into a new Array[Float]
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun u: Float

gamnit :: Vec3 :: u

U value (redirection as x)
fun u=(value: Float)

gamnit :: Vec3 :: u=

Set U value (redirection for x=)
fun v: Float

gamnit :: Vec3 :: v

V value (redirection as y)
fun v=(value: Float)

gamnit :: Vec3 :: v=

Set V value (redirection for y=)
fun w: Float

gamnit :: Vec4 :: w

W value
fun w=(w: Float)

gamnit :: Vec4 :: w=

W value
fun x: Float

gamnit :: Vec3 :: x

X value
fun x=(x: Float)

gamnit :: Vec3 :: x=

X value
fun y: Float

gamnit :: Vec3 :: y

Y value
fun y=(y: Float)

gamnit :: Vec3 :: y=

Y value
fun z: Float

gamnit :: Vec3 :: z

Z value
fun z=(z: Float)

gamnit :: Vec3 :: z=

Z value
package_diagram gamnit::Vec4 Vec4 gamnit::Vec3 Vec3 gamnit::Vec4->gamnit::Vec3 core::Object Object gamnit::Vec3->core::Object ...core::Object ... ...core::Object->core::Object

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

class Vec3

gamnit :: Vec3

Vector of 3 values, either x, y, z, u, v, z or r, g, b

Class definitions

gamnit $ Vec4
# Vector of 4 values, either `x, y, z, w`, `u, v, z, w` or `r, g, b, a`
class Vec4
	super Vec3

	# W value
	var w = 1.0 is writable

	# A value (redirection to `z`)
	fun a: Float do return z

	# Set A value (redirection for `z=`)
	fun a=(value: Float) do z = value

	# Return all values into a new `Array[Float]`
	redef fun to_a do return [x, y, z, w]

	redef fun to_s do return "<{class_name} {x} {y} {z} {w}>"
end
lib/gamnit/model_parsers/model_parser_base.nit:68,1--85,3