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

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

#include <TreeInformation.h>

Public Member Functions

 TreeInformation (vtkIncrementalOctreeNode *root, int numberOfNodes, const std::vector< vtkSmartPointer< vtkCompositeDataSet > > *buildings, const std::string &textureBaseDirectory, bool saveTextures, bool contentGLTF, const char *crs, const std::string &outputDir)
 Constructors for buildings, points and meshes.
 
 TreeInformation (vtkIncrementalOctreeNode *root, int numberOfNodes, vtkPointSet *points, bool contentGLTF, const char *crs, const std::string &output)
 
 TreeInformation (vtkIncrementalOctreeNode *root, int numberOfNodes, vtkPolyData *mesh, const std::string &textureBaseDirectory, bool saveTextures, bool contentGLTF, const char *crs, const std::string &output)
 
void PrintNode (vtkIncrementalOctreeNode *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)
 
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)
 
void SaveTilesMesh ()
 
void SaveTilesPoints ()
 
void SaveTileset (const std::string &output)
 

Static Public Member Functions

static bool GetNodeTightBounds (void *data, vtkIncrementalOctreeNode *node, double *bounds)
 
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)
 
vtkSmartPointer< vtkImageDataComputeTileMeshTexture (vtkPolyData *tileMesh, vtkImageData *textureImage)
 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 ()
 
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.
 

Detailed Description

Additional information and routins for 3D Tiles octree nodes.

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

Definition at line 45 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,
bool  saveTextures,
bool  contentGLTF,
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,
const char *  crs,
const std::string &  output 
)

◆ TreeInformation() [3/3]

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

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 71 of file TreeInformation.h.

◆ GetNodeTightBounds() [2/3]

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

◆ GetNodeTightBounds() [3/3]

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

◆ 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)

◆ 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 94 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

◆ ComputeTileMeshTexture()

vtkSmartPointer< vtkImageData > TreeInformation::ComputeTileMeshTexture ( vtkPolyData tileMesh,
vtkImageData textureImage 
)
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

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