Open CASCADE Technology  7.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
RWGltf_PrimitiveArrayReader Class Referenceabstract

Interface for reading primitive array from glTF buffer. More...

#include <RWGltf_PrimitiveArrayReader.hxx>

Inheritance diagram for RWGltf_PrimitiveArrayReader:
Inheritance graph
[legend]

Public Member Functions

 RWGltf_PrimitiveArrayReader ()
 Constructor. More...
 
const TCollection_AsciiStringErrorPrefix () const
 Return prefix for reporting issues. More...
 
void SetErrorPrefix (const TCollection_AsciiString &theErrPrefix)
 Set prefix for reporting issues. More...
 
const RWMesh_CoordinateSystemConverterCoordinateSystemConverter () const
 Return transformation from glTF to OCCT coordinate system. More...
 
void SetCoordinateSystemConverter (const RWMesh_CoordinateSystemConverter &theConverter)
 Set transformation from glTF to OCCT coordinate system. More...
 
Handle< Poly_TriangulationLoad (const Handle< RWGltf_GltfLatePrimitiveArray > &theMesh)
 Load primitive array. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Member Functions

virtual void reset ()=0
 Reset cache before loading primitive array. More...
 
virtual bool load (const Handle< RWGltf_GltfLatePrimitiveArray > &theMesh)
 Load primitive array. More...
 
virtual Handle< Poly_Triangulationresult ()=0
 Return result primitive array. More...
 
virtual bool readBuffer (std::istream &theStream, const TCollection_AsciiString &theName, const RWGltf_GltfAccessor &theAccessor, RWGltf_GltfArrayType theType, RWGltf_GltfPrimitiveMode theMode)=0
 Read primitive array data. More...
 
virtual void reportError (const TCollection_AsciiString &theText)
 Report error. More...
 

Protected Attributes

TCollection_AsciiString myErrorPrefix
 
RWGltf_GltfSharedIStream mySharedStream
 
RWMesh_CoordinateSystemConverter myCoordSysConverter
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

Interface for reading primitive array from glTF buffer.

Constructor & Destructor Documentation

◆ RWGltf_PrimitiveArrayReader()

RWGltf_PrimitiveArrayReader::RWGltf_PrimitiveArrayReader ( )
inline

Constructor.

Member Function Documentation

◆ CoordinateSystemConverter()

const RWMesh_CoordinateSystemConverter& RWGltf_PrimitiveArrayReader::CoordinateSystemConverter ( ) const
inline

Return transformation from glTF to OCCT coordinate system.

◆ ErrorPrefix()

const TCollection_AsciiString& RWGltf_PrimitiveArrayReader::ErrorPrefix ( ) const
inline

Return prefix for reporting issues.

◆ Load()

Handle< Poly_Triangulation > RWGltf_PrimitiveArrayReader::Load ( const Handle< RWGltf_GltfLatePrimitiveArray > &  theMesh)
inline

Load primitive array.

◆ load()

virtual bool RWGltf_PrimitiveArrayReader::load ( const Handle< RWGltf_GltfLatePrimitiveArray > &  theMesh)
protectedvirtual

Load primitive array.

◆ readBuffer()

virtual bool RWGltf_PrimitiveArrayReader::readBuffer ( std::istream &  theStream,
const TCollection_AsciiString theName,
const RWGltf_GltfAccessor theAccessor,
RWGltf_GltfArrayType  theType,
RWGltf_GltfPrimitiveMode  theMode 
)
protectedpure virtual

Read primitive array data.

Parameters
theStreaminput stream to read from
theNameentity name for logging errors
theAccessorbuffer accessor
theTypearray type
theModeprimitive mode
Returns
FALSE on error

Implemented in RWGltf_TriangulationReader.

◆ reportError()

virtual void RWGltf_PrimitiveArrayReader::reportError ( const TCollection_AsciiString theText)
protectedvirtual

Report error.

◆ reset()

virtual void RWGltf_PrimitiveArrayReader::reset ( )
protectedpure virtual

Reset cache before loading primitive array.

Implemented in RWGltf_TriangulationReader.

◆ result()

virtual Handle< Poly_Triangulation > RWGltf_PrimitiveArrayReader::result ( )
protectedpure virtual

Return result primitive array.

Implemented in RWGltf_TriangulationReader.

◆ SetCoordinateSystemConverter()

void RWGltf_PrimitiveArrayReader::SetCoordinateSystemConverter ( const RWMesh_CoordinateSystemConverter theConverter)
inline

Set transformation from glTF to OCCT coordinate system.

◆ SetErrorPrefix()

void RWGltf_PrimitiveArrayReader::SetErrorPrefix ( const TCollection_AsciiString theErrPrefix)
inline

Set prefix for reporting issues.

Field Documentation

◆ myCoordSysConverter

RWMesh_CoordinateSystemConverter RWGltf_PrimitiveArrayReader::myCoordSysConverter
protected

◆ myErrorPrefix

TCollection_AsciiString RWGltf_PrimitiveArrayReader::myErrorPrefix
protected

◆ mySharedStream

RWGltf_GltfSharedIStream RWGltf_PrimitiveArrayReader::mySharedStream
protected

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