Using addWKT() and addWKTToWKT() functions custom geometries can be added as a layer.
These WKT primitives are supported :
Please specify geometries with a Z component for 3D data. Data without a Z component will be projected on an imaginary ground plane, calculated using the current photo position and camera height.
Some examples can be found here : http://en.wikipedia.org/wiki/Well-known_text
For multipoint geometries, only the syntax where each point is enclosed by brackts is supported.
MULTIPOINT ((10 40), (40 30), (20 20), (30 10))
MULTIPOINT (10 40, 40 30, 20 20, 30 10)