# Unigine::DecalProj Class

This class describes how to create and modify proj decals.

## static DecalProjPtr create(float radius, float fov, float aspect, const char * name)

Constructor. Creates a new projected decal with the given properties.

### Arguments

• float radius - The height of the projection pyramid along the Z axis, in units.
• float fov - The field of view of the decal's projector, in degrees.
• float aspect - The aspect ratio of the decal, in units.
• const char * name - A material of the decal.

## Ptr<DecalProj>cast(const Ptr<Decal> & base)

### Arguments

• const Ptr<Decal> & base

## Ptr<DecalProj>cast(const Ptr<Node> & node)

### Arguments

• const Ptr<Node> & node

## voidsetAspect(float aspect)

Sets the new aspect ratio of the decal, in units.

### Arguments

• float aspect - The aspect ratio of the decal, in units. If a negative value is provided, 0 will be used instead.

## floatgetAspect()

Returns the current aspect ratio of the decal.

### Return value

The aspect ratio of the decal, in units.

## voidsetFov(float fov)

Sets a new field of view of the decal's projector.

### Arguments

• float fov - A field of view of the decal's projector, in degrees. The provided value will be clamped in the range [1;90].

## floatgetFov()

Returns the current field of view of the decal's projector.

### Return value

The field of view of the decal's projector, in degrees.

## Math::mat4getProjection()

Sets a new height of the projection pyramid along the Z axis, in units.

### Arguments

• float radius - A height of the projection pyramid along the Z axis, in units. If a too small value is provided, 1E-6 will be used instead.

Returns the current height of the projection pyramid along the Z axis, in units.

### Return value

The height of the projection pyramid along the Z axis, in units.

## voidsetZNear(float znear)

Sets a distance to the near clipping plane of the decal.

### Arguments

• float znear - A new distance to the near clipping plane, in units. If a negative value is provided, 0 will be used instead.

## floatgetZNear()

Returns the distance to the near clipping plane of the decal.

### Return value

The distance to the near clipping plane, in units.

## inttype()

Last update: 2017-07-03
{"ft_lang_label":"__label__en","ft_lang_prob":0.6273269,"math_prob":0.7565186,"size":2359,"snap":"2020-10-2020-16","text_gpt3_token_len":581,"char_repetition_ratio":0.17070064,"word_repetition_ratio":0.2958115,"special_character_ratio":0.22933446,"punctuation_ratio":0.12555066,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9632264,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-19T01:18:23Z\",\"WARC-Record-ID\":\"<urn:uuid:478fd16a-4541-4c9f-b5cc-869d6d8dd270>\",\"Content-Length\":\"210418\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1f108805-fcd5-4ec2-a285-15f6690c5d58>\",\"WARC-Concurrent-To\":\"<urn:uuid:1311a157-2814-43a5-8ffd-28120fe719e5>\",\"WARC-IP-Address\":\"190.2.154.84\",\"WARC-Target-URI\":\"https://developer.unigine.com/en/docs/2.3/api/library/decals/class.decalproj?rlang=cpp\",\"WARC-Payload-Digest\":\"sha1:H67B6UL5AKSZOLPMBAL634QNCGOKK2KW\",\"WARC-Block-Digest\":\"sha1:2ANJF3E4UQW3NEVXPHOIYIGIYNQ4TEOV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875143963.79_warc_CC-MAIN-20200219000604-20200219030604-00248.warc.gz\"}"}