mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032086: Visualization - support deferred data loading
1) Extend Poly_Triangulation by mesh purpose, possibility to be cleared and late-load deferred data interfaces. 2) Update BRep_TFace to store list of triangulations istead of single one. And also active one. Update getter and setter of single triangulation and add new methods to interaction with whole triangulations list. 3) Update BRep_Tool to get single triangulation of face according to the input mesh purpose or whole triangulations list. 4) Update BRep_Builder to make face by not only single triangulation but whole triangulations list with specified active one. 5) Add new methods to BRepTools to interact with shape triangulations (Load/Unload/Activate/LoadAll/UnloadAllTriangulation(s)) 6) Add new 'tlateload'command for shape to load/unload/activate triangulations. 7) Update 'trinfo' command by '-lods' options to print detailaed information about LODs of this shape 8) Support empty triangulations by selection. Use bounding box selection in this case. 9) Add new 'outdisplist' option to XDispaly command to print list of displayed objects to output variable but not to theDI 10) Add new '-noecho' option to vdisplay command to skip printing of displayed objects to theDI 11) Create new RWMesh_TriangulationSource as mesh data wrapper for delayed triangulation loading. 12) Create new RWMesh_TriangulationReader as base interface for reading primitive array from the buffer. 13) Cache nodes/triangles number defined in glTF file 14) Use RWMesh_TriangulationSource class as base of RWGltf_GltfLatePrimitiveArray one and RWMesh_TriangulationReader class as base of RWGltf_TriangulationReader one 15) Add possibilty to support of LODs by glTF reader. It is possible to skip data loading and load them later 16) Add new '-skiplateloading' (to skip triangulation loading), '-keeplate' (to keep information about deferred storage to load/unload triangulation later), '-toprintdebuginfo' (to print additional debug information) options to ReadGltf command 17) Add new test of glTF late loading
This commit is contained in:
@@ -103,6 +103,9 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI,
|
||||
Standard_Boolean toListExternalFiles = Standard_False;
|
||||
Standard_Boolean isParallel = Standard_False;
|
||||
Standard_Boolean isDoublePrec = Standard_False;
|
||||
Standard_Boolean toSkipLateDataLoading = Standard_False;
|
||||
Standard_Boolean toKeepLateData = Standard_True;
|
||||
Standard_Boolean toPrintDebugInfo = Standard_False;
|
||||
Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readgltf");
|
||||
for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter)
|
||||
{
|
||||
@@ -144,6 +147,34 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI,
|
||||
isDoublePrec = !isDoublePrec;
|
||||
}
|
||||
}
|
||||
else if (anArgCase == "-skiplateloading")
|
||||
{
|
||||
toSkipLateDataLoading = Standard_True;
|
||||
if (anArgIter + 1 < theNbArgs
|
||||
&& Draw::ParseOnOff (theArgVec[anArgIter + 1], toSkipLateDataLoading))
|
||||
{
|
||||
++anArgIter;
|
||||
}
|
||||
}
|
||||
else if (anArgCase == "-keeplate")
|
||||
{
|
||||
toKeepLateData = Standard_True;
|
||||
if (anArgIter + 1 < theNbArgs
|
||||
&& Draw::ParseOnOff (theArgVec[anArgIter + 1], toKeepLateData))
|
||||
{
|
||||
++anArgIter;
|
||||
}
|
||||
}
|
||||
else if (anArgCase == "-toprintinfo"
|
||||
|| anArgCase == "-toprintdebuginfo")
|
||||
{
|
||||
toPrintDebugInfo = Standard_True;
|
||||
if (anArgIter + 1 < theNbArgs
|
||||
&& Draw::ParseOnOff (theArgVec[anArgIter + 1], toPrintDebugInfo))
|
||||
{
|
||||
++anArgIter;
|
||||
}
|
||||
}
|
||||
else if (anArgCase == "-listexternalfiles"
|
||||
|| anArgCase == "-listexternals"
|
||||
|| anArgCase == "-listexternal"
|
||||
@@ -202,6 +233,9 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI,
|
||||
aReader.SetDocument (aDoc);
|
||||
aReader.SetParallel (isParallel);
|
||||
aReader.SetDoublePrecision (isDoublePrec);
|
||||
aReader.SetToSkipLateDataLoading (toSkipLateDataLoading);
|
||||
aReader.SetToKeepLateData (toKeepLateData);
|
||||
aReader.SetToPrintDebugMessages (toPrintDebugInfo);
|
||||
if (toListExternalFiles)
|
||||
{
|
||||
aReader.ProbeHeader (aFilePath);
|
||||
@@ -1743,7 +1777,12 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands)
|
||||
"\n\t\t: -listExternalFiles do not read mesh and only list external files"
|
||||
"\n\t\t: -noCreateDoc read into existing XDE document"
|
||||
"\n\t\t: -doublePrecision store triangulation with double or single floating point"
|
||||
"\n\t\t: precision (single by default)",
|
||||
"\n\t\t: precision (single by default)"
|
||||
"\n\t\t: -skipLateLoading data loading is skipped and can be performed later"
|
||||
"\n\t\t: (false by default)"
|
||||
"\n\t\t: -keepLate data is loaded into itself with preservation of information"
|
||||
"\n\t\t: about deferred storage to load/unload this data later.",
|
||||
"\n\t\t: -toPrintDebugInfo print additional debug inforamtion during data reading"
|
||||
__FILE__, ReadGltf, g);
|
||||
theCommands.Add ("readgltf",
|
||||
"readgltf shape file"
|
||||
|
Reference in New Issue
Block a user