Class: Grid
Hierarchy
- Grid
↳ ObbGrid
Index
Constructors
Properties
Methods
Constructors
constructor
+ new Grid(surface: MeshSurface): Grid
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/Grid.ts:13
Parameters:
| Name | Type |
|---|---|
surface |
MeshSurface |
Returns: Grid
Properties
Protected surface
• surface: MeshSurface
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/Grid.ts:13
Methods
Abstract getGridCellOffset
▸ getGridCellOffset(meshPoint: Vector3, translation: Vector3, rotation: Quaternion, targetOffset: Vector3, targetRotation: Quaternion): any
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/Grid.ts:34
Computes the offset and rotation, that is needed to transform the surface from the location given by translation and rotation to contain the meshPoint.
The results are stored in targetOffset and targetRotation in mesh-coordinates. translation and rotation are applied to the surface after applying the transforms given by targetOffset and targetRotation.
Note that the targetRotation is applied first, so that the targetOffset also has to account for that.
Parameters:
| Name | Type | Description |
|---|---|---|
meshPoint |
Vector3 | - |
translation |
Vector3 | - |
rotation |
Quaternion | - |
targetOffset |
Vector3 | - |
targetRotation |
Quaternion | - |
Returns: any
Static isGridCell
▸ isGridCell(surface: MeshSurface): boolean
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/Grid.ts:9
This assesses whether the given surface is eligible to be one cell of this grid.
Parameters:
| Name | Type | Description |
|---|---|---|
surface |
MeshSurface | - |
Returns: boolean