38 lines
1000 B
Go
38 lines
1000 B
Go
package raycast
|
|
|
|
// Default configuration values for raycast mesh creation
|
|
const (
|
|
// DefaultMaxDepth is the default maximum recursion depth for the AABB tree
|
|
DefaultMaxDepth = 15
|
|
|
|
// DefaultMinLeafSize is the default minimum triangles to treat as a 'leaf' node
|
|
DefaultMinLeafSize = 4
|
|
|
|
// DefaultMinAxisSize is the default minimum axis size for subdivision
|
|
DefaultMinAxisSize = 0.01
|
|
|
|
// EpsilonFloat is the floating point epsilon for comparisons
|
|
EpsilonFloat = 1e-6
|
|
|
|
// EpsilonDouble is the double precision epsilon for comparisons
|
|
EpsilonDouble = 1e-12
|
|
)
|
|
|
|
// Triangle indices for accessing vertex components
|
|
const (
|
|
// Vertex component indices
|
|
X = 0
|
|
Y = 1
|
|
Z = 2
|
|
|
|
// Triangle vertex indices (3 vertices * 3 components each)
|
|
V0X = 0 // First vertex X
|
|
V0Y = 1 // First vertex Y
|
|
V0Z = 2 // First vertex Z
|
|
V1X = 3 // Second vertex X
|
|
V1Y = 4 // Second vertex Y
|
|
V1Z = 5 // Second vertex Z
|
|
V2X = 6 // Third vertex X
|
|
V2Y = 7 // Third vertex Y
|
|
V2Z = 8 // Third vertex Z
|
|
) |