Module pasture_core::layout::conversion
source · Structs
- Mapping between a source
PointAttributeMember
and a targetPointAttributeMember
. This type stores all the necessary data to convert a single source attribute value into the target attribute. It supports type conversion and transformations - A converter that can convert a point buffer from one
PointLayout
into another. This works by defining mappings between attributes from the source buffer and attributes in the target buffer. All mappings together define the way the sourcePointLayout
transforms into the targetPointLayout
. Here is an example: - Helper struct that encapsulates all
RawAttributeConverter
s necessary for converting a point in a specific layout
Functions
- Unit conversion function (when from and to represent the same datatype)
- Returns a conversion function for converting from
from_attribute
intoto_attribute
. Both attributes must have the same name but can have different datatypes. Conversion functions operate on raw byte buffers, where the first argument is a buffer that represents a single value offrom_attribute
and the second buffer is a single mutable value ofto_attribute
. If both attributes are equal,None
is returned. - Returns a generic converter that can convert between primitive types. These functions implement primitive type conversions as if using the
as
operator, using thenum_traits::AsPrimitive
trait
Type Aliases
- Function pointer type for functions that convert between attributes with different datatypes