VTK  9.4.20241128
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
TreeInformation Class Reference

Additional information and routines for 3D Tiles octree nodes. More...

#include <TreeInformation.h>

Public Member Functions

void PrintNode (vtkIncrementalOctreeNode *node)
 
void AddGeometricError (vtkPolyData *representation)
 Adds a node geometric error cell attribute for the bounding box representation for nodes on a level.
 
void Compute ()
 Computes the additional information for all nodes.
 
void SaveTilesBuildings (bool mergeTilePolyData, size_t mergedTextureWidth)
 
void SaveTilesMesh ()
 
void SaveTilesPoints ()
 
void SaveTileset (const std::string &output)
 
 TreeInformation (vtkIncrementalOctreeNode *root, int numberOfNodes, const std::vector< vtkSmartPointer< vtkCompositeDataSet > > *buildings, const std::string &textureBaseDirectory, const std::string &propertyTextureFile, bool saveTextures, bool contentGLTF, bool contentGLTFSaveGLB, const char *crs, const std::string &outputDir)
 Constructors for buildings, points and meshes.
 
 TreeInformation (vtkIncrementalOctreeNode *root, int numberOfNodes, vtkPointSet *points, bool contentGLTF, bool contentGLTFSaveGLB, const char *crs, const std::string &output)
 Constructors for buildings, points and meshes.
 
 TreeInformation (vtkIncrementalOctreeNode *root, int numberOfNodes, vtkPolyData *mesh, const std::string &textureBaseDirectory, const std::string &propertyTextureFile, bool saveTextures, bool contentGLTF, bool contentGLTFSaveGLB, const char *crs, const std::string &output)
 Constructors for buildings, points and meshes.
 

Static Public Member Functions

static void PrintBounds (const char *name, const double *bounds)
 
static void PrintBounds (const std::string &name, const double *bounds)
 
static std::array< double, 6 > ExpandBounds (double *first, double *second)
 

Protected Member Functions

void PostOrderTraversal (void(TreeInformation::*Visit)(vtkIncrementalOctreeNode *node, void *aux), vtkIncrementalOctreeNode *node, void *aux)
 
void PreOrderTraversal (void(TreeInformation::*Visit)(vtkIncrementalOctreeNode *node, void *aux), vtkIncrementalOctreeNode *node, void *aux)
 
void SaveTileset (vtkIncrementalOctreeNode *root, const std::string &output)
 
nlohmann::json GenerateTileJson (vtkIncrementalOctreeNode *node)
 
bool ConvertTileCartesianBuildings (vtkIncrementalOctreeNode *node)
 
bool ConvertDataSetCartesian (vtkPointSet *points)
 
void SaveTileBuildings (vtkIncrementalOctreeNode *node, void *auxData)
 
void SaveTileMesh (vtkIncrementalOctreeNode *node, void *auxData)
 
void WriteTileTexture (vtkIncrementalOctreeNode *node, const std::string &fileName, vtkImageData *tileImage)
 
vtkSmartPointer< vtkImageDataSplitTileTexture (vtkPolyData *tileMesh, vtkImageData *textureImage, vtkDataArray *tcoordsTile)
 Compute the texture image for the tile and recompute texture coordinates.
 
void SaveTilePoints (vtkIncrementalOctreeNode *node, void *auxData)
 
std::array< double, 6 > ComputeTightBB (vtkIdList *tileBuildings)
 
std::string ContentTypeExtension () const
 
void Initialize ()
 
double GetRootLength2 ()
 
bool ForEachBuilding (vtkIncrementalOctreeNode *node, std::function< bool(vtkPolyData *)> Execute)
 Execute the passed functor for each polydata.
 
void VisitCompute (vtkIncrementalOctreeNode *node, void *aux)
 Computes the additional information for 'node'.
 
void VisitComputeGeometricError (vtkIncrementalOctreeNode *node, void *aux)
 Computes the additional information for 'node'.
 
double ComputeGeometricErrorTilesetBuildings ()
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorTilesetPoints ()
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorTilesetMesh ()
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorTileset ()
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorNodeBuildings (vtkIncrementalOctreeNode *node, void *aux)
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorNodePoints (vtkIncrementalOctreeNode *node, void *aux)
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorNodeMesh (vtkIncrementalOctreeNode *node, void *aux)
 Compute geometric error for the tileset and for a node.
 
double ComputeGeometricErrorNode (vtkIncrementalOctreeNode *node, void *aux)
 Compute geometric error for the tileset and for a node.
 
std::array< double, 6 > GetNodeTightBounds (int i)
 Returns the bounds for node with index 'i' The versions that returns a bool returns true if the node is not empty, false otherwise.
 
bool GetNodeTightBounds (int i, double *bounds)
 Returns the bounds for node with index 'i' The versions that returns a bool returns true if the node is not empty, false otherwise.
 
static bool GetNodeTightBounds (void *data, vtkIncrementalOctreeNode *node, double *bounds)
 Returns the bounds for node with index 'i' The versions that returns a bool returns true if the node is not empty, false otherwise.
 

Detailed Description

Additional information and routines for 3D Tiles octree nodes.

Additional information for all nodes in the octree used to generate the 3D Tiles representation.

Definition at line 36 of file TreeInformation.h.

Constructor & Destructor Documentation

◆ TreeInformation() [1/3]

TreeInformation::TreeInformation ( vtkIncrementalOctreeNode root,
int  numberOfNodes,
const std::vector< vtkSmartPointer< vtkCompositeDataSet > > *  buildings,
const std::string &  textureBaseDirectory,
const std::string &  propertyTextureFile,
bool  saveTextures,
bool  contentGLTF,
bool  contentGLTFSaveGLB,
const char *  crs,
const std::string &  outputDir 
)

Constructors for buildings, points and meshes.

◆ TreeInformation() [2/3]

TreeInformation::TreeInformation ( vtkIncrementalOctreeNode root,
int  numberOfNodes,
vtkPointSet points,
bool  contentGLTF,
bool  contentGLTFSaveGLB,
const char *  crs,
const std::string &  output 
)

Constructors for buildings, points and meshes.

◆ TreeInformation() [3/3]

TreeInformation::TreeInformation ( vtkIncrementalOctreeNode root,
int  numberOfNodes,
vtkPolyData mesh,
const std::string &  textureBaseDirectory,
const std::string &  propertyTextureFile,
bool  saveTextures,
bool  contentGLTF,
bool  contentGLTFSaveGLB,
const char *  crs,
const std::string &  output 
)

Constructors for buildings, points and meshes.

Member Function Documentation

◆ PrintNode()

void TreeInformation::PrintNode ( vtkIncrementalOctreeNode node)

◆ GetNodeTightBounds() [1/3]

std::array< double, 6 > TreeInformation::GetNodeTightBounds ( int  i)
inline

Returns the bounds for node with index 'i' The versions that returns a bool returns true if the node is not empty, false otherwise.

For the third version we read the node index from 'node'.

Definition at line 67 of file TreeInformation.h.

◆ GetNodeTightBounds() [2/3]

bool TreeInformation::GetNodeTightBounds ( int  i,
double *  bounds 
)

Returns the bounds for node with index 'i' The versions that returns a bool returns true if the node is not empty, false otherwise.

For the third version we read the node index from 'node'.

◆ GetNodeTightBounds() [3/3]

static bool TreeInformation::GetNodeTightBounds ( void *  data,
vtkIncrementalOctreeNode node,
double *  bounds 
)
static

Returns the bounds for node with index 'i' The versions that returns a bool returns true if the node is not empty, false otherwise.

For the third version we read the node index from 'node'.

◆ AddGeometricError()

void TreeInformation::AddGeometricError ( vtkPolyData representation)

Adds a node geometric error cell attribute for the bounding box representation for nodes on a level.

Works on the poly data generated for a tree level by vtkIncrementalOctrePointLocator::GenerateRepresentation.

◆ Compute()

void TreeInformation::Compute ( )

Computes the additional information for all nodes.

This includes the tight bounding box around the buildings, if the node is empty or not, and the geometric error.

◆ SaveTilesBuildings()

void TreeInformation::SaveTilesBuildings ( bool  mergeTilePolyData,
size_t  mergedTextureWidth 
)

◆ SaveTilesMesh()

void TreeInformation::SaveTilesMesh ( )

◆ SaveTilesPoints()

void TreeInformation::SaveTilesPoints ( )

◆ SaveTileset() [1/2]

void TreeInformation::SaveTileset ( const std::string &  output)

◆ PrintBounds() [1/2]

static void TreeInformation::PrintBounds ( const char *  name,
const double *  bounds 
)
static

◆ PrintBounds() [2/2]

static void TreeInformation::PrintBounds ( const std::string &  name,
const double *  bounds 
)
inlinestatic

Definition at line 90 of file TreeInformation.h.

◆ ExpandBounds()

static std::array< double, 6 > TreeInformation::ExpandBounds ( double *  first,
double *  second 
)
static

◆ PostOrderTraversal()

void TreeInformation::PostOrderTraversal ( void(TreeInformation::*)(vtkIncrementalOctreeNode *node, void *aux)  Visit,
vtkIncrementalOctreeNode node,
void *  aux 
)
protected

◆ PreOrderTraversal()

void TreeInformation::PreOrderTraversal ( void(TreeInformation::*)(vtkIncrementalOctreeNode *node, void *aux)  Visit,
vtkIncrementalOctreeNode node,
void *  aux 
)
protected

◆ SaveTileset() [2/2]

void TreeInformation::SaveTileset ( vtkIncrementalOctreeNode root,
const std::string &  output 
)
protected

◆ GenerateTileJson()

nlohmann::json TreeInformation::GenerateTileJson ( vtkIncrementalOctreeNode node)
protected

◆ ConvertTileCartesianBuildings()

bool TreeInformation::ConvertTileCartesianBuildings ( vtkIncrementalOctreeNode node)
protected

◆ ConvertDataSetCartesian()

bool TreeInformation::ConvertDataSetCartesian ( vtkPointSet points)
protected

◆ VisitCompute()

void TreeInformation::VisitCompute ( vtkIncrementalOctreeNode node,
void *  aux 
)
protected

Computes the additional information for 'node'.

This includes the tight bounding box around the buildings, if the node is empty or not, and the geometric error.

◆ VisitComputeGeometricError()

void TreeInformation::VisitComputeGeometricError ( vtkIncrementalOctreeNode node,
void *  aux 
)
protected

Computes the additional information for 'node'.

This includes the tight bounding box around the buildings, if the node is empty or not, and the geometric error.

◆ SaveTileBuildings()

void TreeInformation::SaveTileBuildings ( vtkIncrementalOctreeNode node,
void *  auxData 
)
protected

◆ SaveTileMesh()

void TreeInformation::SaveTileMesh ( vtkIncrementalOctreeNode node,
void *  auxData 
)
protected

◆ WriteTileTexture()

void TreeInformation::WriteTileTexture ( vtkIncrementalOctreeNode node,
const std::string &  fileName,
vtkImageData tileImage 
)
protected

◆ SplitTileTexture()

vtkSmartPointer< vtkImageData > TreeInformation::SplitTileTexture ( vtkPolyData tileMesh,
vtkImageData textureImage,
vtkDataArray tcoordsTile 
)
protected

Compute the texture image for the tile and recompute texture coordinates.

◆ SaveTilePoints()

void TreeInformation::SaveTilePoints ( vtkIncrementalOctreeNode node,
void *  auxData 
)
protected

◆ ComputeGeometricErrorTilesetBuildings()

double TreeInformation::ComputeGeometricErrorTilesetBuildings ( )
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorTilesetPoints()

double TreeInformation::ComputeGeometricErrorTilesetPoints ( )
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorTilesetMesh()

double TreeInformation::ComputeGeometricErrorTilesetMesh ( )
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorTileset()

double TreeInformation::ComputeGeometricErrorTileset ( )
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorNodeBuildings()

double TreeInformation::ComputeGeometricErrorNodeBuildings ( vtkIncrementalOctreeNode node,
void *  aux 
)
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorNodePoints()

double TreeInformation::ComputeGeometricErrorNodePoints ( vtkIncrementalOctreeNode node,
void *  aux 
)
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorNodeMesh()

double TreeInformation::ComputeGeometricErrorNodeMesh ( vtkIncrementalOctreeNode node,
void *  aux 
)
protected

Compute geometric error for the tileset and for a node.

◆ ComputeGeometricErrorNode()

double TreeInformation::ComputeGeometricErrorNode ( vtkIncrementalOctreeNode node,
void *  aux 
)
protected

Compute geometric error for the tileset and for a node.

◆ ComputeTightBB()

std::array< double, 6 > TreeInformation::ComputeTightBB ( vtkIdList tileBuildings)
protected

◆ ContentTypeExtension()

std::string TreeInformation::ContentTypeExtension ( ) const
protected

◆ Initialize()

void TreeInformation::Initialize ( )
protected

◆ GetRootLength2()

double TreeInformation::GetRootLength2 ( )
protected

◆ ForEachBuilding()

bool TreeInformation::ForEachBuilding ( vtkIncrementalOctreeNode node,
std::function< bool(vtkPolyData *)>  Execute 
)
protected

Execute the passed functor for each polydata.

The functor returns true if it should continue execution. The function returns true if it executed for all polydata inside each building.


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