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

Introduced properties

fun b: Float

gamnit :: Vec3 :: b

B value
fun b=(value: Float)

gamnit :: Vec3 :: b=

Set B value (redirection for z=)
fun g: Float

gamnit :: Vec3 :: g

G value
fun g=(value: Float)

gamnit :: Vec3 :: g=

Set G value (redirection for y=)
fun r: Float

gamnit :: Vec3 :: r

R value
fun r=(value: Float)

gamnit :: Vec3 :: r=

Set R value (redirection for x=)
fun to_a: Array[Float]

gamnit :: Vec3 :: to_a

Return all values into a new Array[Float]
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 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

Redefined properties

redef type SELF: Vec3

gamnit $ Vec3 :: SELF

Type of this instance, automatically specialized in every class
redef fun to_s: String

gamnit $ Vec3 :: 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 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 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::Vec3 Vec3 core::Object Object gamnit::Vec3->core::Object gamnit::Vec4 Vec4 gamnit::Vec4->gamnit::Vec3

Parents

interface Object

core :: Object

The root of the class hierarchy.

Children

class Vec4

gamnit :: Vec4

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

Class definitions

gamnit $ Vec3
# Vector of 3 values, either `x, y, z`, `u, v, z` or `r, g, b`
class Vec3

	# X value
	var x = 0.0 is writable

	# Y value
	var y = 0.0 is writable

	# Z value
	var z = 0.0 is writable

	# U value (redirection as `x`)
	fun u: Float do return x

	# Set U value (redirection for `x=`)
	fun u=(value: Float) do x = value

	# V value (redirection as `y`)
	fun v: Float do return y

	# Set V value (redirection for `y=`)
	fun v=(value: Float) do y = value

	# R value
	fun r: Float do return x

	# Set R value (redirection for `x=`)
	fun r=(value: Float) do x = value

	# G value
	fun g: Float do return y

	# Set G value (redirection for `y=`)
	fun g=(value: Float) do y = value

	# B value
	fun b: Float do return z

	# Set B value (redirection for `z=`)
	fun b=(value: Float) do z = value

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

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