Ptr<Material>getMaterial()

Return value

Ptr<Material>getMaterialInherit()

Inherits material for the decal (creates a material instance). Modifications made in a new material instance will not affect the source material.

Return value

Smart pointer to the inherited material.

intisMaterialInherited()

Returns the value indicating if a given material is inherited (instanced). Modifications made in a material instance do not affect the source material.

Return value

1 if the material is inherited successfully; otherwise, 0.

const char *getMaterialName()

Returns the name of a decal material.

Return value

The material name.

voidsetMaxFadeDistance(floatdistance)

Updates the maximum fade-out distance, across which the decal smoothly becomes invisible due to the alpha fading. It is counted starting from the maximum visibility distance value.

Arguments

floatdistance - A new minimum fade-out distance, in units. If a negative value is provided, 0 will be used instead.

floatgetMaxFadeDistance()

Returns the maximum fade-out distance, across which the decal smoothly becomes invisible due to the alpha fading. It is counted starting from the maximum visibility distance value.

Return value

The distance value, in units.

voidsetMaxVisibleDistance(floatdistance)

Updates the maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible.

Arguments

floatdistance - A new maximum visibility distance, in units. If a negative value is provided, 0 will be used instead.

floatgetMaxVisibleDistance()

Returns the maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible.

Return value

The distance value, in units.

voidsetMinFadeDistance(floatdistance)

Updates the minimum fade-in distance, across which the decal smoothly becomes visible due to the alpha fading. It is counted starting from the minimum visibility distance value.

Arguments

floatdistance - A new minimum fade-in distance, in units. If a negative value is provided, 0 will be used instead.

floatgetMinFadeDistance()

Returns the minimum fade-in distance, across which the decal smoothly becomes visible due to the alpha fading. It is counted starting from the minimum visibility distance value.

Return value

The distance value, in units.

voidsetMinVisibleDistance(floatdistance)

Updates the minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible.

Arguments

floatdistance - A new minimum visibility distance, in units. If a negative value is provided, 0 will be used instead.

floatgetMinVisibleDistance()

Returns The minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible.

Return value

The distance value, in units.

voidsetTexCoord(const Math::vec4 &coord)

Sets texture coordinates for the decal (a texture atlas can be used).

The first pair of coordinates (x and y) set texture scale by the X and Y axes. For example, by the scale of 2 the texture is repeated twice on one decal.

The second pair (z and w) set texture offset along the X and Y axes. For example, by the offset of 0.5 along the X axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center).

Arguments

const Math::vec4 &coord - Texture coordinates for the decal.

Math::vec4getTexCoord()

Returns the texture coordinates for the decal (a texture atlas can be used).

The first pair of coordinates (x and y) set texture scale by the X and Y axes. For example, by the scale of 2 the texture is repeated twice on one decal.

The second pair (z and w) set texture offset along the X and Y axes. For example, by the offset of 0.5 along theX axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center).

Return value

The current texture coordinates for the decal.

voidsetViewportMask(intmask)

Sets a bit mask for rendering a decal into the viewport. The decal is rendered, if its mask matches the camera viewport mask and the viewport mask of the decal's material.

Arguments

intmask - An integer value, each bit of which is used to set a mask.

intgetViewportMask()

Returns the current bit mask for rendering into the viewport. The decal is rendered, if its mask matches the camera viewport mask and the viewport mask of the decal's material.

Return value

The integer value, each bit of which is used to set a mask.

voidsetIntersectionMask(intmask)

Sets a new intersection mask for the decal. This mask can be used to cut out areas intersected by the decal from grass, mesh clutter and world clutter
(e.g. to remove grass or forest from the surface of roads projected using decals).

Notice

The areas will be cut out only if intersection masks of grass and clutter objects matches this mask (one bit at least).

Arguments

intmask - Integer, each bit of which is a mask.

intgetIntersectionMask()

Returns the current intersection mask of the decal. This mask can be used to cut out areas intersected by the decal from grass, mesh clutter and world clutter
(e.g. to remove grass or forest from the surface of roads projected using decals).

Notice

The areas will be cut out only if intersection masks of grass and clutter objects matches this mask (one bit at least).

Return value

Integer, each bit of which is a mask.

Last update: 2018-06-04

We use cookies to ensure that we give you the best experience on our website. Click here for more information.