ezEngine  Release 25.03
ezWorldGeoExtractionUtil Class Reference

A utility to gather raw geometry from a world. More...

#include <WorldGeoExtractionUtil.h>

Classes

struct  MeshObject
 

Public Types

enum  ExtractionMode { ExtractionMode::RenderMesh, ExtractionMode::CollisionMesh }
 Describes what the geometry is needed for. More...
 
using MeshObjectList = ezDeque< MeshObject >
 

Static Public Member Functions

static void ExtractWorldGeometry (MeshObjectList &ref_objects, const ezWorld &world, ExtractionMode mode, ezTagSet *pExcludeTags=nullptr)
 Extracts the desired geometry from all objects in a world. More...
 
static void ExtractWorldGeometry (MeshObjectList &ref_objects, const ezWorld &world, ExtractionMode mode, const ezDeque< ezGameObjectHandle > &selection)
 Extracts the desired geometry from a specified subset of objects in a world. More...
 
static void WriteWorldGeometryToOBJ (const char *szFile, const MeshObjectList &objects, const ezMat3 &mTransform)
 Writes the given geometry in .obj format to file.
 

Detailed Description

A utility to gather raw geometry from a world.

The utility sends ezMsgExtractGeometry to world components and they may fill out the geometry information. ExtractionMode defines what the geometry is needed for. This ranges from finding geometry that is used to generate the navmesh from to exporting the geometry to a file for use in another program, e.g. a modeling software.

Member Enumeration Documentation

◆ ExtractionMode

Describes what the geometry is needed for.

Enumerator
RenderMesh 

The render geometry is desired. Typically for exporting it to file.

CollisionMesh 

The collision geometry is desired. Typically for exporting it to file.

Member Function Documentation

◆ ExtractWorldGeometry() [1/2]

void ezWorldGeoExtractionUtil::ExtractWorldGeometry ( MeshObjectList ref_objects,
const ezWorld world,
ExtractionMode  mode,
const ezDeque< ezGameObjectHandle > &  selection 
)
static

Extracts the desired geometry from a specified subset of objects in a world.

The geometry object is not cleared, so this can be called repeatedly to append more data.

◆ ExtractWorldGeometry() [2/2]

void ezWorldGeoExtractionUtil::ExtractWorldGeometry ( MeshObjectList ref_objects,
const ezWorld world,
ExtractionMode  mode,
ezTagSet pExcludeTags = nullptr 
)
static

Extracts the desired geometry from all objects in a world.

The geometry object is not cleared, so this can be called repeatedly to append more data.


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