cesium-native 0.61.0
Loading...
Searching...
No Matches
CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec Struct Reference

glTF extension encoding the visibility of the edges of a triangles primitive More...

#include <CesiumGltf/ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h>

Inheritance diagram for CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec:
CesiumUtility::ExtensibleObject CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibility

Public Member Functions

int64_t getSizeBytes () const
 Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
 
- Public Member Functions inherited from CesiumUtility::ExtensibleObject
template<typename T>
bool hasExtension () const noexcept
 Checks if an extension exists given its static type.
 
template<typename T>
const T * getExtension () const noexcept
 Gets an extension given its static type.
 
template<typename T>
T * getExtension () noexcept
 Gets an extension given its static type.
 
const JsonValuegetGenericExtension (const std::string &extensionName) const noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
JsonValuegetGenericExtension (const std::string &extensionName) noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
template<typename T, typename... ConstructorArgumentTypes>
T & addExtension (ConstructorArgumentTypes &&... constructorArguments)
 Adds a statically-typed extension to this object.
 
template<typename T>
void removeExtension ()
 Removes a statically-typed extension from this object.
 
int64_t getSizeBytes () const
 Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object.
 

Public Attributes

int32_t visibility = -1
 The index of the accessor encoding the visibility of each triangle edge as a bitfield with two bits per edge.
 
int32_t material = -1
 The index of a glTF material with which the edges are to be drawn.
 
int32_t silhouetteNormals = -1
 The index of the accessor encoding the pair of outward-facing normals for the two faces sharing each silhouette edge (visibility 1) encoded in visibility.
 
std::vector< CesiumGltf::LineStringlineStrings
 An array of edges encoded as line strings.
 
- Public Attributes inherited from CesiumUtility::ExtensibleObject
std::unordered_map< std::string, std::any > extensions
 The extensions attached to this object.
 
JsonValue::Object extras
 Application-specific data.
 
JsonValue::Object unknownProperties
 Unknown properties that exist on this object but do not have any representation in the statically-typed classes.
 

Static Public Attributes

static constexpr const char * TypeName
 The original name of this type.
 
static constexpr const char * ExtensionName
 The official name of the extension. This should be the same as its key in the extensions object.
 

Protected Member Functions

 ExtensionExtMeshPrimitiveEdgeVisibilitySpec ()=default
 This class is not meant to be instantiated directly. Use ExtensionExtMeshPrimitiveEdgeVisibility instead.
 

Friends

struct ExtensionExtMeshPrimitiveEdgeVisibility
 

Detailed Description

glTF extension encoding the visibility of the edges of a triangles primitive

Definition at line 17 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

Member Function Documentation

◆ getSizeBytes()

int64_t CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::getSizeBytes ( ) const
inline

Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.

Definition at line 71 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

Friends And Related Symbol Documentation

◆ ExtensionExtMeshPrimitiveEdgeVisibility

Member Data Documentation

◆ ExtensionName

const char* CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::ExtensionName
staticconstexpr
Initial value:
=
"EXT_mesh_primitive_edge_visibility"

The official name of the extension. This should be the same as its key in the extensions object.

Definition at line 26 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

◆ lineStrings

std::vector<CesiumGltf::LineString> CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::lineStrings

An array of edges encoded as line strings.

Edges encoded as line strings MUST NOT also be encoded by the visibility property.

Definition at line 63 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

◆ material

int32_t CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::material = -1

The index of a glTF material with which the edges are to be drawn.

If omitted, the edges are drawn using the same material as the triangle mesh primitive.

Definition at line 45 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

◆ silhouetteNormals

int32_t CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::silhouetteNormals = -1

The index of the accessor encoding the pair of outward-facing normals for the two faces sharing each silhouette edge (visibility 1) encoded in visibility.

This property MUST be defined if and only if visibility encodes at least one edge with visibility value 1.

Definition at line 55 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

◆ TypeName

const char* CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::TypeName
staticconstexpr
Initial value:
=
"ExtensionExtMeshPrimitiveEdgeVisibility"

The original name of this type.

Definition at line 22 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.

◆ visibility

int32_t CesiumGltf::ExtensionExtMeshPrimitiveEdgeVisibilitySpec::visibility = -1

The index of the accessor encoding the visibility of each triangle edge as a bitfield with two bits per edge.

An edge visibility of 0 indicates the edge is never drawn; 1 indicates the edge is only drawn in silhouette; 2 indicates a 'hard' (always-drawn) edge; and 3 indicates a repeated occurrence of a 'hard' edge.

Definition at line 37 of file ExtensionExtMeshPrimitiveEdgeVisibilitySpec.h.


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