Plasma Engine  2.0
Loading...
Searching...
No Matches
plWorldGeoExtractionUtil Class Reference

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

#include <WorldGeoExtractionUtil.h>

Classes

struct  MeshObject
 

Public Types

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

Static Public Member Functions

static void ExtractWorldGeometry (MeshObjectList &ref_objects, const plWorld &world, ExtractionMode mode, plTagSet *pExcludeTags=nullptr)
 Extracts the desired geometry from all objects in a world.
 
static void ExtractWorldGeometry (MeshObjectList &ref_objects, const plWorld &world, ExtractionMode mode, const plDeque< plGameObjectHandle > &selection)
 Extracts the desired geometry from a specified subset of objects in a world.
 
static void WriteWorldGeometryToOBJ (const char *szFile, const MeshObjectList &objects, const plMat3 &mTransform)
 Writes the given geometry in .obj format to file.
 

Detailed Description

A utility to gather raw geometry from a world.

The utility sends plMsgExtractGeometry 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.

NavMeshGeneration 

The geometry that participates in navmesh generation is desired.

Member Function Documentation

◆ ExtractWorldGeometry() [1/2]

void plWorldGeoExtractionUtil::ExtractWorldGeometry ( MeshObjectList & ref_objects,
const plWorld & world,
ExtractionMode mode,
const plDeque< plGameObjectHandle > & 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 plWorldGeoExtractionUtil::ExtractWorldGeometry ( MeshObjectList & ref_objects,
const plWorld & world,
ExtractionMode mode,
plTagSet * 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: