wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
Loading...
Searching...
No Matches
bgi_openlb_bridge.h
Go to the documentation of this file.
1#pragma once
2
3#include "bgi_dds.h"
4
5#include <string>
6#include <vector>
7
8#include <glm/glm.hpp>
9
10namespace bgi
11{
12
22{
24 bool matched{false};
25
30 bool occupied{false};
31
38 int material{0};
39
45 int priority{0};
46
48 std::string objectId;
49
55 std::string role;
56
62 std::string boundary;
63};
64
98bool openlbClassifyPoint(const DdsScene &scene,
99 const glm::vec3 &worldPoint,
101 int defaultFluidMaterial = 1,
102 int defaultSolidMaterial = 2);
103
139 float minX, float minY, float z,
140 int cols, int rows,
141 float stepX, float stepY,
142 std::vector<int> &materials,
143 int defaultFluidMaterial = 1,
144 int defaultSolidMaterial = 2);
145
146} // namespace bgi
Internal CHDOP (Class Hierarchy of Drawing Object Primitives) and DdsScene container for the Drawing ...
In-memory DDS scene graph.
Definition bgi_dds.h:502
Definition bgi_camera.h:28
bool openlbClassifyPoint(const DdsScene &scene, const glm::vec3 &worldPoint, OpenLbMaterialHit &hit, int defaultFluidMaterial=1, int defaultSolidMaterial=2)
Classify a single world-space point against all OpenLB-tagged render roots in a DDS scene and populat...
void openlbSampleMaterials2D(const DdsScene &scene, float minX, float minY, float z, int cols, int rows, float stepX, float stepY, std::vector< int > &materials, int defaultFluidMaterial=1, int defaultSolidMaterial=2)
Sample a 2-D axis-aligned grid of world-space points and write per-cell material IDs into a std::vect...
Result of classifying a single world-space point against an OpenLB-tagged DDS scene.
Definition bgi_openlb_bridge.h:22
bool occupied
true when the matched object's openlb.role is anything other than "fluid" (i.e., the point is inside ...
Definition bgi_openlb_bridge.h:30
std::string boundary
Value of the openlb.boundary attribute of the matched object.
Definition bgi_openlb_bridge.h:62
std::string role
Lower-cased value of the openlb.role attribute of the matched object.
Definition bgi_openlb_bridge.h:55
int priority
Sort key used to resolve conflicts when multiple DDS objects contain the same point.
Definition bgi_openlb_bridge.h:45
int material
Resolved material ID for the matched object.
Definition bgi_openlb_bridge.h:38
std::string objectId
ID string of the matched DDS object.
Definition bgi_openlb_bridge.h:48
bool matched
true if a DDS object containing the query point was found; false otherwise.
Definition bgi_openlb_bridge.h:24