Property definitions

gamnit $ OffsetPoint3d :: defaultinit
# Position relative to another point or usually a `CameraAnchor`
private class OffsetPoint3d
	super Point3d[Float]

	autoinit ref, offset_x, offset_y, offset_z

	# Reference point to which the offsets are applied
	var ref: IPoint3d[Float]

	# Difference on the X axis
	var offset_x: Float

	# Difference on the X axis
	var offset_y: Float

	# Difference on the X axis
	var offset_z: Float

	redef fun x do return ref.x + offset_x
	redef fun y do return ref.y + offset_y
	redef fun z do return ref.z + offset_z

	redef fun x=(value) do if value != null then offset_x += value - x
	redef fun y=(value) do if value != null then offset_y += value - y
	redef fun z=(value) do if value != null then offset_z += value - z

	redef fun offset(x, y, z) do return new OffsetPoint3d(self, x.to_f, y.to_f, z.to_f)
end
lib/gamnit/cameras.nit:302,1--329,3