editor › Globals › EquilateralTriangleGrid
Class: EquilateralTriangleGrid
This grid repeats equilateral triangles in a space-filling way as shown here. _ _ _ /\ /\ /\ /\ / \ / \ / \ / \ /__\/_\/\/\ /\ /\ /\ /\ / \ / \ / \ / \ /\/\/\/___\
Hierarchy
↳ ObbGrid
↳ EquilateralTriangleGrid
Index
Constructors
Properties
Methods
Constructors
constructor
+ new EquilateralTriangleGrid(surface: MeshSurface): EquilateralTriangleGrid
Inherited from ObbGrid.constructor
Overrides Grid.constructor
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:26
Parameters:
| Name | Type |
|---|---|
surface |
MeshSurface |
Returns: EquilateralTriangleGrid
Properties
Protected obbBasisRotation
• obbBasisRotation: Quaternion‹› = new Quaternion()
Inherited from ObbGrid.obbBasisRotation
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:26
Protected obbBasisRotationInverse
• obbBasisRotationInverse: Quaternion
Inherited from ObbGrid.obbBasisRotationInverse
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:23
Protected obbDimensions
• obbDimensions: Vector3
Inherited from ObbGrid.obbDimensions
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:25
Protected obbPosition
• obbPosition: Vector3‹› = new Vector3()
Inherited from ObbGrid.obbPosition
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:24
Protected surface
• surface: MeshSurface
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/Grid.ts:13
Methods
Protected _getObb
▸ _getObb(): OBB‹›
Inherited from ObbGrid._getObb
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:77
Returns: OBB‹›
Private _mapToObbSpace
▸ _mapToObbSpace(meshPoint: Vector3, translation: Vector3, rotation: Quaternion): Vector3‹›
Inherited from ObbGrid._mapToObbSpace
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/ObbGrid.ts:64
Maps the meshPoint to the local OBB space of this surface and stores the result in _tempMeshPointObbSpace, assuming, that the mesh of this.surface were rotated with rotation and translated by translation.
Parameters:
| Name | Type | Description |
|---|---|---|
meshPoint |
Vector3 | - |
translation |
Vector3 | - |
rotation |
Quaternion | - |
Returns: Vector3‹›
getGridCellOffset
▸ getGridCellOffset(meshPoint: Vector3, translation: Vector3, rotation: Quaternion, targetOffset: Vector3, targetRotation: Quaternion): void
Overrides ObbGrid.getGridCellOffset
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/EquilateralTriangleGrid.ts:39
Parameters:
| Name | Type |
|---|---|
meshPoint |
Vector3 |
translation |
Vector3 |
rotation |
Quaternion |
targetOffset |
Vector3 |
targetRotation |
Quaternion |
Returns: void
Static isGridCell
▸ isGridCell(surface: MeshSurface): boolean
Overrides ObbGrid.isGridCell
Defined in src/modules/kyub.core.boxel/src/GridInferring/grids/EquilateralTriangleGrid.ts:26
This assesses whether the given surface is eligible to be one cell of this grid.
Parameters:
| Name | Type | Description |
|---|---|---|
surface |
MeshSurface | - |
Returns: boolean