28 #ifndef vtkGLTFDocumentLoader_h
29 #define vtkGLTFDocumentLoader_h
31 #include "vtkIOGeometryModule.h"
42 VTK_ABI_NAMESPACE_BEGIN
93 UNSIGNED_SHORT = 5123,
239 void UpdateTransform();
345 NEAREST_MIPMAP_NEAREST = 9984,
346 LINEAR_MIPMAP_NEAREST = 9985,
347 NEAREST_MIPMAP_LINEAR = 9986,
348 LINEAR_MIPMAP_LINEAR = 9987
352 CLAMP_TO_EDGE = 33071,
353 MIRRORED_REPEAT = 33648,
415 void GetInterpolatedData(
float t,
size_t numberOfComponents, std::vector<float>* output,
416 bool forceStep =
false,
bool isRotation =
false)
const;
527 bool ApplyAnimation(
float t,
int animationId,
bool forceStep =
false);
532 void ResetAnimation(
int animationId);
560 bool LoadModelData(
const std::vector<char>& glbBuffer);
565 bool BuildModelVTKGeometry();
570 std::shared_ptr<Model> GetInternalModel();
580 const std::vector<std::string>& GetSupportedExtensions();
585 const std::vector<std::string>& GetUsedExtensions();
598 void BuildGlobalTransforms();
603 static void ComputeJointMatrices(
const Model& model,
const Skin& skin,
Node& node,
611 struct AccessorLoadingWorker;
613 struct SparseAccessorLoadingWorker;
615 template <
typename Type>
616 struct BufferDataExtractionWorker;
624 bool LoadSkinMatrixData();
630 bool ExtractPrimitiveAttributes(
Primitive& primitive);
638 bool ExtractPrimitiveAccessorData(
Primitive& primitive);
644 bool BuildPolyDataFromPrimitive(
Primitive& primitive);
649 bool LoadAnimationData();
654 bool LoadImageData();
656 std::shared_ptr<Model> InternalModel;
658 static const std::vector<std::string> SupportedExtensions;
659 std::vector<std::string> UsedExtensions;
662 VTK_ABI_NAMESPACE_END
int InverseBindMatricesAccessorId
InterpolationMode Interpolation
std::vector< float > InitialWeights
This struct contains all data from a gltf asset.
std::vector< float > Rotation
std::string BufferMetaData
std::vector< double > Color
std::vector< int > Children
std::vector< Sampler > Samplers
abstract base class for most VTK objects
represent and manipulate 4x4 transformation matrices
AccessorType
Defines an accessor's type.
vtkSmartPointer< vtkResourceStream > Stream
std::vector< float > Scale
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Abstract class used for custom streams.
This struct describes a glTF animation object.
vtkSmartPointer< vtkMatrix4x4 > Transform
vtkSmartPointer< vtkMatrix4x4 > GlobalTransform
vtkSmartPointer< vtkFloatArray > OutputData
std::vector< Image > Images
vtkSmartPointer< vtkMatrix4x4 > Matrix
This struct describes a glTF textureInfo object, mostly used in material descriptions They contain tw...
std::map< std::string, int > AttributeIndices
dynamic, self-adjusting array of float
This struct describes a glTF scene object.
std::vector< struct Primitive > Primitives
Target
Define an openGL draw target.
vtkSmartPointer< vtkPolyData > Geometry
std::vector< vtkSmartPointer< vtkMatrix4x4 > > InverseBindMatrices
PbrMetallicRoughness PbrMetallicRoughness
std::map< std::string, vtkSmartPointer< vtkFloatArray > > AttributeValues
concrete dataset represents vertices, lines, polygons, and triangle strips
std::vector< Accessor > Accessors
std::vector< MorphTarget > Targets
Node::Extensions ExtensionMetaData
std::vector< Animation::Channel > Channels
std::vector< Light > Lights
std::vector< double > Min
ComponentType IndicesComponentType
Node::Extensions::KHRLightsPunctual KHRLightsPunctualMetaData
vtkSmartPointer< vtkURILoader > URILoader
unsigned int NumberOfComponents
vtkSmartPointer< vtkCellArray > Indices
TextureInfo NormalTexture
vtkSmartPointer< vtkFloatArray > InputData
double NormalTextureScale
std::vector< Skin > Skins
std::vector< double > EmissiveFactor
std::vector< Animation > Animations
This struct describes a glTF texture object.
This struct describes a glTF camera object.
This struct describes a glTF node object.
This struct describes a glTF primitive object.
std::vector< Texture > Textures
a simple class to control print indentation
double SpotInnerConeAngle
std::vector< float > Weights
topologically and geometrically regular array of data
abstract superclass for arrays of numeric data
Extensions ExtensionMetaData
std::map< std::string, vtkSmartPointer< vtkDataArray > > AttributeValues
std::vector< Mesh > Meshes
std::map< std::string, int > AttributeIndices
This struct describes an accessor.sparse glTF object.
std::vector< int > Joints
This struct contains extension metadata.
std::vector< Camera > Cameras
std::vector< float > InitialTranslation
std::vector< double > Max
This struct describes a glTF image object.
This struct describes a glTF material object.
std::vector< float > InitialRotation
#define ELEMENT_ARRAY_BUFFER
std::vector< BufferView > BufferViews
double SpotOuterConeAngle
object to represent cell connectivity
Helper class for readers and importer that need to load more than one resource.
std::vector< std::vector< char > > Buffers
std::vector< unsigned int > Nodes
std::vector< float > Translation
std::vector< Material > Materials
This struct describes a glTF sampler object.
TextureInfo OcclusionTexture
std::vector< float > InitialScale
vtkSmartPointer< vtkImageData > ImageData
double OcclusionTextureStrength
Deserialize a GLTF model file.
This struct describes an accessor glTF object.
ComponentType ComponentTypeValue
TextureInfo EmissiveTexture
This struct describes a glTF bufferView object.
std::vector< Scene > Scenes
std::vector< Node > Nodes
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
This struct describes a glTF asset.
KHRLightsPunctual KHRLightsPunctualMetaData
std::vector< float > Weights
This struct describes a glTF mesh object.
represent and manipulate 3D points
ComponentType
Define a type for different data components.
This struct describes a glTF Morph Target object.
dynamic, self-adjusting array of unsigned short
std::vector< Animation::Sampler > Samplers