40 #ifndef vtkGLTFDocumentLoader_h 41 #define vtkGLTFDocumentLoader_h 43 #include "vtkIOGeometryModule.h" 75 ELEMENT_ARRAY_BUFFER = 34963
101 UNSIGNED_BYTE = 5121,
103 UNSIGNED_SHORT = 5123,
249 void UpdateTransform();
352 NEAREST_MIPMAP_NEAREST = 9984,
353 LINEAR_MIPMAP_NEAREST = 9985,
354 NEAREST_MIPMAP_LINEAR = 9986,
355 LINEAR_MIPMAP_LINEAR = 9987
359 CLAMP_TO_EDGE = 33071,
360 MIRRORED_REPEAT = 33648,
422 void GetInterpolatedData(
float t,
size_t numberOfComponents, std::vector<float>* output,
423 bool forceStep =
false,
bool isRotation =
false)
const;
532 bool ApplyAnimation(
float t,
int animationId,
bool forceStep =
false);
537 void ResetAnimation(
int animationId);
543 bool LoadFileBuffer(
const std::string& fileName, std::vector<char>& glbBuffer);
549 bool LoadModelMetaDataFromFile(
std::string FileName);
554 bool LoadModelData(
const std::vector<char>& glbBuffer);
559 bool BuildModelVTKGeometry();
564 std::shared_ptr<Model> GetInternalModel();
574 const std::vector<std::string>& GetSupportedExtensions();
579 const std::vector<std::string>& GetUsedExtensions();
586 struct AccessorLoadingWorker;
588 struct SparseAccessorLoadingWorker;
590 template <
typename Type>
591 struct BufferDataExtractionWorker;
599 bool LoadSkinMatrixData();
605 bool ExtractPrimitiveAttributes(
Primitive& primitive);
613 bool ExtractPrimitiveAccessorData(
Primitive& primitive);
619 bool BuildPolyDataFromPrimitive(
Primitive& primitive);
624 bool LoadAnimationData();
629 bool LoadImageData();
639 std::shared_ptr<Model> InternalModel;
641 static const std::vector<std::string> SupportedExtensions;
642 std::vector<std::string> UsedExtensions;
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.
std::vector< float > Scale
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
This struct describes a glTF animation object.
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
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
std::vector< BufferView > BufferViews
double SpotOuterConeAngle
object to represent cell connectivity
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
vtkSmartPointer< vtkTransform > Transform
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.
vtkSmartPointer< vtkTransform > GlobalTransform
This struct describes a glTF Morph Target object.
dynamic, self-adjusting array of unsigned short
std::vector< Animation::Sampler > Samplers