Cesium for Unity 1.15.2
Loading...
Searching...
No Matches
CesiumForUnity.CesiumFeatureIdTexture Class Reference

Represents a feature ID texture from a glTF primitive. More...

Inheritance diagram for CesiumForUnity.CesiumFeatureIdTexture:
CesiumForUnity.CesiumFeatureIdSet

Public Member Functions

partial Int64 GetFeatureIdForUV (Vector2 uv)
 Gets the feature ID corresponding to the pixel specified by the UV texture coordinates.
 
override partial Int64 GetFeatureIdForVertex (Int64 vertexIndex)
 Gets the feature ID associated with a given vertex.The feature ID can be used with a CesiumPropertyTable to retrieve the corresponding metadata.This returns -1 if the given vertex is out-of-bounds, or if the feature ID set is invalid.
 
override partial Int64 GetFeatureIdFromRaycastHit (RaycastHit hitInfo)
 Gets the feature ID from the feature ID set using the given raycast hit.This returns a more accurate value for feature ID textures, since they define feature IDs per-texel instead of per-vertex. The feature ID can be used with a CesiumPropertyTable to retrieve the corresponding metadata.This can still retrieve the feature IDs for non-texture feature ID sets. For attribute or implicit feature IDs, the first feature ID associated with the first vertex of the intersected face is returned.

This returns -1 if the feature ID set is invalid.
 
- Public Member Functions inherited from CesiumForUnity.CesiumFeatureIdSet
virtual void Dispose ()
 

Properties

CesiumFeatureIdTextureStatus status [get, set]
 The status of this feature ID texture.
 
- Properties inherited from CesiumForUnity.CesiumFeatureIdSet
CesiumFeatureIdSetType type [get, protected set]
 The type of this feature ID set.
 
String label [get, set]
 The label assigned to this feature ID set.
 
Int64 featureCount [get, set]
 The number of features this primitive has.
 
Int64 nullFeatureId [get, set]
 The null feature ID, i.e., the value that indicates no feature is associated with the owner.In other words, if a vertex or texel returns this value, then it is not associated with any feature.
 
Int64 propertyTableIndex [get, set]
 The index of the property table corresponding to this feature ID set.
 

Detailed Description

Represents a feature ID texture from a glTF primitive.

Provides access to per-texel feature IDs which can be used with the corresponding CesiumPropertyTable to access per-texel metadata.

Definition at line 36 of file CesiumFeatureIdTexture.cs.

Member Function Documentation

◆ GetFeatureIdForUV()

partial Int64 CesiumForUnity.CesiumFeatureIdTexture.GetFeatureIdForUV ( Vector2 uv)

Gets the feature ID corresponding to the pixel specified by the UV texture coordinates.

The feature ID can be used with a CesiumPropertyTable to retrieve the per-texel metadata.

Parameters
uvThe texture coordinates.
Returns
The feature ID at the given texture coordinates, or -1 if the feature ID texture is invalid.

◆ GetFeatureIdForVertex()

override partial Int64 CesiumForUnity.CesiumFeatureIdTexture.GetFeatureIdForVertex ( Int64 vertexIndex)
virtual

Gets the feature ID associated with a given vertex.The feature ID can be used with a CesiumPropertyTable to retrieve the corresponding metadata.This returns -1 if the given vertex is out-of-bounds, or if the feature ID set is invalid.

Reimplemented from CesiumForUnity.CesiumFeatureIdSet.

◆ GetFeatureIdFromRaycastHit()

override partial Int64 CesiumForUnity.CesiumFeatureIdTexture.GetFeatureIdFromRaycastHit ( RaycastHit hitInfo)
virtual

Gets the feature ID from the feature ID set using the given raycast hit.This returns a more accurate value for feature ID textures, since they define feature IDs per-texel instead of per-vertex. The feature ID can be used with a CesiumPropertyTable to retrieve the corresponding metadata.This can still retrieve the feature IDs for non-texture feature ID sets. For attribute or implicit feature IDs, the first feature ID associated with the first vertex of the intersected face is returned.

This returns -1 if the feature ID set is invalid.

Reimplemented from CesiumForUnity.CesiumFeatureIdSet.

Property Documentation

◆ status

CesiumFeatureIdTextureStatus CesiumForUnity.CesiumFeatureIdTexture.status
getset

The status of this feature ID texture.

Definition at line 41 of file CesiumFeatureIdTexture.cs.


The documentation for this class was generated from the following file: