Files
godot-docs/classes/class_pointmesh.rst
2020-09-15 15:09:00 +02:00

28 lines
1.7 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the PointMesh.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_PointMesh:
PointMesh
=========
**Inherits:** :ref:`PrimitiveMesh<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
Mesh with a single Point primitive.
Description
-----------
The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud).
PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with ``POINT_SIZE``, or in a :ref:`SpatialMaterial<class_SpatialMaterial>` by setting :ref:`SpatialMaterial.flags_use_point_size<class_SpatialMaterial_property_flags_use_point_size>` and the variable :ref:`SpatialMaterial.params_point_size<class_SpatialMaterial_property_params_point_size>`.
When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`