OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
PackedMesh Class Reference

#include <packedmesh.h>

Classes

struct  BVHNode
 
struct  Cluster
 
struct  Leaf64
 
struct  PrimitiveHeap
 
struct  SubMesh
 

Public Types

enum  { MaxVert = 64 , MaxPrim = 64 , MaxInd = MaxPrim * 3 , MaxMeshlets = 16 }
 
enum  PkgType { PK_Visual , PK_VisualLnd , PK_VisualMorph , PK_Physic }
 
enum  BVH_NodeType : uint32_t { BVH_NullNode = 0x00000000 , BVH_BoxNode = 0x10000000 , BVH_Tri1Node = 0x20000000 , BVH_Tri2Node = 0x30000000 }
 
using Vertex = Resources::Vertex
 
using VertexA = Resources::VertexA
 
using UVec4 = Tempest::BasicPoint< uint32_t, 4 >
 

Public Member Functions

 PackedMesh (const zenkit::MultiResolutionMesh &mesh, PkgType type)
 
 PackedMesh (const zenkit::Mesh &mesh, PkgType type)
 
 PackedMesh (const zenkit::SoftSkinMesh &mesh)
 
void debug (std::ostream &out) const
 
std::pair< Tempest::Vec3, Tempest::Vec3 > bbox () const
 

Public Attributes

std::vector< Vertexvertices
 
std::vector< VertexAverticesA
 
std::vector< uint32_t > indices
 
std::vector< uint8_t > indices8
 
std::vector< SubMeshsubMeshes
 
std::vector< ClustermeshletBounds
 
std::vector< uint32_t > verticesId
 
bool isUsingAlphaTest = true
 
std::vector< BVHNodebvhNodes
 
std::vector< UVec4bvh8Nodes
 

Detailed Description

Definition at line 15 of file packedmesh.h.

Member Typedef Documentation

◆ UVec4

using PackedMesh::UVec4 = Tempest::BasicPoint<uint32_t,4>

Definition at line 66 of file packedmesh.h.

◆ Vertex

Definition at line 17 of file packedmesh.h.

◆ VertexA

Definition at line 18 of file packedmesh.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MaxVert 
MaxPrim 
MaxInd 
MaxMeshlets 

Definition at line 20 of file packedmesh.h.

◆ BVH_NodeType

enum PackedMesh::BVH_NodeType : uint32_t
Enumerator
BVH_NullNode 
BVH_BoxNode 
BVH_Tri1Node 
BVH_Tri2Node 

Definition at line 45 of file packedmesh.h.

◆ PkgType

Enumerator
PK_Visual 
PK_VisualLnd 
PK_VisualMorph 
PK_Physic 

Definition at line 27 of file packedmesh.h.

Constructor & Destructor Documentation

◆ PackedMesh() [1/3]

PackedMesh::PackedMesh ( const zenkit::MultiResolutionMesh &  mesh,
PkgType  type 
)

Definition at line 429 of file packedmesh.cpp.

◆ PackedMesh() [2/3]

PackedMesh::PackedMesh ( const zenkit::Mesh &  mesh,
PkgType  type 
)

Definition at line 408 of file packedmesh.cpp.

◆ PackedMesh() [3/3]

PackedMesh::PackedMesh ( const zenkit::SoftSkinMesh &  mesh)

Definition at line 444 of file packedmesh.cpp.

Member Function Documentation

◆ bbox()

std::pair< Vec3, Vec3 > PackedMesh::bbox ( ) const

Definition at line 1453 of file packedmesh.cpp.

◆ debug()

void PackedMesh::debug ( std::ostream &  out) const

Definition at line 1437 of file packedmesh.cpp.

Member Data Documentation

◆ bvh8Nodes

std::vector<UVec4> PackedMesh::bvh8Nodes

Definition at line 81 of file packedmesh.h.

◆ bvhNodes

std::vector<BVHNode> PackedMesh::bvhNodes

Definition at line 80 of file packedmesh.h.

◆ indices

std::vector<uint32_t> PackedMesh::indices

Definition at line 70 of file packedmesh.h.

◆ indices8

std::vector<uint8_t> PackedMesh::indices8

Definition at line 71 of file packedmesh.h.

◆ isUsingAlphaTest

bool PackedMesh::isUsingAlphaTest = true

Definition at line 77 of file packedmesh.h.

◆ meshletBounds

std::vector<Cluster> PackedMesh::meshletBounds

Definition at line 74 of file packedmesh.h.

◆ subMeshes

std::vector<SubMesh> PackedMesh::subMeshes

Definition at line 73 of file packedmesh.h.

◆ vertices

std::vector<Vertex> PackedMesh::vertices

Definition at line 68 of file packedmesh.h.

◆ verticesA

std::vector<VertexA> PackedMesh::verticesA

Definition at line 69 of file packedmesh.h.

◆ verticesId

std::vector<uint32_t> PackedMesh::verticesId

Definition at line 76 of file packedmesh.h.


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