载入中...
搜索中...
未找到
PointSet.h 文件参考
#include "common/Export.h"
#include "procgen/AttributeTable.h"
#include <cstdint>
#include <string>
#include <string_view>
#include <vector>

浏览源代码.

类

struct  eve::procgen::ProcgenPoint
 One deterministic sample used by script-first procedural pipelines. 更多...
 
class  eve::procgen::PointSet
 Script-friendly collection of attributed 3D samples. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::procgen
 

函数

uint32_t eve::procgen::deriveSeed (uint32_t parent, const std::string &scope)
 Stable label-based seed derivation; independent pipeline branches do not perturb each other.
 
std::uint64_t eve::procgen::derivePointId (std::uint64_t namespaceId, std::uint64_t ordinal)
 Deterministically derive a non-zero stable point identity.
 
PointSet eve::procgen::sampleGridPoints (int width, int depth, float spacing, uint32_t seed, float jitter)
 Sample grid points.
 
PointSet eve::procgen::poissonDiskPoints (int width, int depth, float radius, uint32_t seed, int maxPoints)
 Bridson blue-noise (Poisson disk) samples in a width x depth area (XZ, y=0).
 
PointSet eve::procgen::filterPointHeight (const PointSet &input, float minHeight, float maxHeight)
 Filter point height.
 
PointSet eve::procgen::filterPointDensity (const PointSet &input, float minDensity, float maxDensity)
 Filter point density.
 
PointSet eve::procgen::filterPointBox (const PointSet &input, float minX, float minY, float minZ, float maxX, float maxY, float maxZ, bool invert)
 Filter point box.
 
PointSet eve::procgen::filterPointSlope (const PointSet &input, float minDegrees, float maxDegrees)
 Filter point slope.
 
PointSet eve::procgen::filterPointsByPolygon (const PointSet &input, const PointSet &polygon, bool invert)
 Filter points by polygon.
 
PointSet eve::procgen::filterPointsBySplineDistance (const PointSet &input, const PointSet &controlPoints, float minDistance, float maxDistance)
 Filter points by spline distance.
 
PointSet eve::procgen::excludePointRadius (const PointSet &input, float x, float z, float radius)
 Exclude point radius.
 
Result< PointSet > eve::procgen::excludePointsByGridMask (const PointSet &input, const Grid2D &mask, float originX, float originZ, float cellSize, int semantic, float clearance, std::size_t maximumChecks)
 Remove points covered by a semantic grid mask plus optional world-space clearance.
 
PointSet eve::procgen::jitterPointPositions (const PointSet &input, uint32_t seed, float amountX, float amountZ)
 Jitter point positions.
 
PointSet eve::procgen::selfPrunePoints (const PointSet &input, float radius)
 Self prune points.
 
PointSet eve::procgen::projectPointsToHeightmap (const PointSet &input, const Heightmap &heightmap, float originX, float originZ, float cellSize, float heightScale)
 Project points to heightmap.
 
PointSet eve::procgen::samplePolylinePoints (const PointSet &controlPoints, float spacing, uint32_t seed, float lateralJitter)
 Sample polyline points.
 
PointSet eve::procgen::mergePointSets (const PointSet &first, const PointSet &second)
 Concatenate two attributed point collections while preserving order.
 
PointSet eve::procgen::unionPointSets (const PointSet &first, const PointSet &second)
 Stable union by non-zero point id, with legacy position-and-seed fallback.
 
PointSet eve::procgen::intersectPointSets (const PointSet &first, const PointSet &second)
 Keep first-set points whose stable or legacy identity occurs in the second set.
 
PointSet eve::procgen::differencePointSets (const PointSet &first, const PointSet &second)
 Remove first-set points whose stable or legacy identity occurs in the second set.
 
PointSet eve::procgen::transformPointSet (const PointSet &input, float translateX, float translateY, float translateZ, float yawDegrees, float scaleX, float scaleY, float scaleZ)
 Apply translation, yaw rotation and non-uniform scale to points and their transforms.
 
PointSet eve::procgen::transformPointSet3D (const PointSet &input, float translateX, float translateY, float translateZ, float pitchDegrees, float yawDegrees, float rollDegrees, float scaleX, float scaleY, float scaleZ)
 Apply translation, pitch/yaw/roll rotation and non-uniform scale.
 
PointSet eve::procgen::copyPointsToTargets (const PointSet &source, const PointSet &targets, bool inheritTargetAttributes)
 Instantiate source points relative to targets in stable target-major order.
 
PointSet eve::procgen::remapPointDensity (const PointSet &input, float inputMin, float inputMax, float outputMin, float outputMax, bool clampOutput)
 Linearly remap point density between ranges with optional output clamping.
 
void eve::procgen::ensurePointSetDataRow (PointSet &points)
 Return whether name is a known $-prefixed float point-field selector.
 
bool eve::procgen::isPointFloatSelector (std::string_view name) noexcept
 True when point float selector.
 
bool eve::procgen::isPointFloatChannel (std::string_view name) noexcept
 Return whether name is a valid float channel (builtin selector or metadata name).
 
EVENGINE_API_DOMAINS Result< float > eve::procgen::readPointFloatChannel (const PointSet &points, int index, std::string_view name, float defaultValue)
 Read a float metadata column or closed $ point-field selector.
 
Result< void > eve::procgen::writePointFloatChannel (PointSet &points, int index, std::string_view name, float value)
 Write a float metadata column or closed $ point-field selector.
 
PointSet eve::procgen::mathPointFloatAttribute (const PointSet &input, const std::string &attribute, const std::string &outputAttribute, const std::string &operation, float operand, float defaultValue)
 Apply one scalar operation to a float metadata attribute or $ selector.
 
EVENGINE_API_DOMAINS PointSet eve::procgen::filterPointFloatAttribute (const PointSet &input, const std::string &name, float minValue, float maxValue, bool invert)
 Select points whose named float attribute or $ selector lies in an inclusive range.
 
PointSet eve::procgen::filterPointStringAttribute (const PointSet &input, const std::string &name, const std::string &value, bool invert)
 Select points whose named string attribute equals a value.
 
PointSet eve::procgen::filterPointIntAttribute (const PointSet &input, const std::string &name, std::int64_t minValue, std::int64_t maxValue, bool invert)
 Select points whose named int attribute lies in an inclusive range.
 
PointSet eve::procgen::filterPointBoolAttribute (const PointSet &input, const std::string &name, bool value, bool invert)
 Select points whose named bool attribute equals a value.
 
Result< PointSet > eve::procgen::copyPointAttribute (const PointSet &input, const std::string &source, const std::string &target)
 Copy one float channel or typed metadata column onto another name.
 
Result< PointSet > eve::procgen::renamePointAttribute (const PointSet &input, const std::string &from, const std::string &to)
 Rename one metadata column.
 
Result< PointSet > eve::procgen::deletePointAttribute (const PointSet &input, const std::string &name)
 Delete one metadata column.
 
Result< PointSet > eve::procgen::transferPointAttribute (const PointSet &target, const PointSet &source, const std::string &attribute, const std::string &outputAttribute, const std::string &mode)
 Transfer one attribute from source onto target points.
 
PointSet eve::procgen::setPointIntAttribute (const PointSet &input, const std::string &attribute, std::int64_t value)
 Write a constant int metadata column on every point.
 
PointSet eve::procgen::setPointBoolAttribute (const PointSet &input, const std::string &attribute, bool value)
 Write a constant bool metadata column on every point.
 
PointSet eve::procgen::setPointVectorAttribute (const PointSet &input, const std::string &attribute, float x, float y, float z)
 Write a constant vector metadata column on every point.
 
Result< PointSet > eve::procgen::comparePointFloatAttribute (const PointSet &input, const std::string &attribute, const std::string &comparison, float operand, const std::string &outputAttribute, float defaultValue)
 Compare a float channel against an operand and write a bool metadata column.
 
Result< PointSet > eve::procgen::selectPointFloatAttribute (const PointSet &input, const std::string &conditionAttribute, const std::string &trueAttribute, const std::string &falseAttribute, const std::string &outputAttribute, float trueDefault, float falseDefault)
 Select between two float channels using a bool metadata condition.
 
PointSet eve::procgen::densityCullPoints (const PointSet &input, uint32_t seed, float multiplier)
 Deterministically keep points according to density and a root seed.
 
PointSet eve::procgen::densityFromNormal (const PointSet &input, float minDegrees, float maxDegrees, float outputMin, float outputMax, bool invert)
 Remap surface slope (from normals) into density.
 
PointSet eve::procgen::modifyPointBounds (const PointSet &input, float scaleX, float scaleY, float scaleZ, float padX, float padY, float padZ)
 Scale and pad each point's local bounds about its center.
 
PointSet eve::procgen::assignWeightedMeshAttribute (const PointSet &input, uint32_t seed, const std::string &attribute, const std::string *meshes, const float *weights, int entryCount)
 Deterministically assign a weighted mesh path string attribute.
 
EVENGINE_API_DOMAINS PointSet eve::procgen::partitionPointAttribute (const PointSet &input, const std::string &attribute, const std::string &outputAttribute, const std::string &mode)
 Assign partition indices from a string/int attribute (mode: value|hash).
 
EVENGINE_API_DOMAINS PointSet eve::procgen::noisePointFloatAttribute (const PointSet &input, const std::string &attribute, uint32_t seed, float frequency, float amplitude, float offset)
 Write deterministic float noise into a metadata attribute.
 
PointSet eve::procgen::mathPointIntAttribute (const PointSet &input, const std::string &attribute, const std::string &outputAttribute, const std::string &operation, std::int64_t operand, std::int64_t defaultValue)
 Apply integer math to an int metadata column.
 
PointSet eve::procgen::mathPointVectorAttribute (const PointSet &input, const std::string &attribute, const std::string &outputAttribute, const std::string &operation, float operandX, float operandY, float operandZ, float defaultX, float defaultY, float defaultZ)
 Apply vector math to a vector metadata column.
 
EVENGINE_API_DOMAINS Result< void > eve::procgen::setPointDataFloatAttribute (PointSet &points, const std::string &attribute, float value)
 Write a float into the PointSet @Data domain.
 
Result< void > eve::procgen::setPointDataIntAttribute (PointSet &points, const std::string &attribute, std::int64_t value)
 Write an int into the PointSet @Data domain.
 
Result< void > eve::procgen::setPointDataStringAttribute (PointSet &points, const std::string &attribute, const std::string &value)
 Write a string into the PointSet @Data domain.