x
, y
and z
geometry :: Point3d :: defaultinit
geometry $ Point3d :: core_serialize_to
Actual serialization ofself
to serializer
geometry $ Point3d :: from_deserializer
Create an instance of this class from thedeserializer
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePackserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
geometry :: IPoint :: defaultinit
geometry :: IPoint3d :: defaultinit
geometry :: Boxed :: defaultinit
geometry :: Point :: defaultinit
geometry :: Boxed3d :: defaultinit
core :: Object :: defaultinit
geometry :: Point3d :: defaultinit
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
geometry :: Boxed :: intersects
Doesself
intersect with other
?
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraycore :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
Serializer::serialize
redef class Point3d[N]
# ---
# Associate each point to its sprites
private var sprites: nullable Array[Sprite] = null
private fun sprites_add(sprite: Sprite)
do
var sprites = sprites
if sprites == null then
sprites = new Array[Sprite]
self.sprites = sprites
end
sprites.add sprite
end
private fun sprites_remove(sprite: Sprite)
do
var sprites = sprites
assert sprites != null
sprites.remove sprite
end
# ---
# Notify `sprites` on attribute modification
private fun needs_update
do
var sprites = sprites
if sprites != null then for s in sprites do s.needs_update
end
redef fun x=(v)
do
if isset _x and v != x then needs_update
super
end
redef fun y=(v)
do
if isset _y and v != y then needs_update
super
end
redef fun z=(v)
do
if isset _z and v != z then needs_update
super
end
end
lib/gamnit/flat/flat_core.nit:820,1--869,3