editor › Globals › PrismCriterion
Class: PrismCriterion
Scores better when the added boxel maintains the (local) prism property of the base mesh. The weight of the "local" prism is determined as the area of the smaller surface of the presumed base/top surface.
A "local" prism is defined as two base surfaces, the point in opposite directions. All surfaces, that connect the two, are considered side plates of the prism and need to be perpendicular to the base surfaces.
Hierarchy
↳ PrismCriterion
Index
Constructors
Methods
- _determinePrismHeight
- _findPrisms
- _getCommonNeighbors
- _getPrismValue
- _maintainsPrismProperty
- _planesEqual
- score
Constructors
constructor
+ new PrismCriterion(): PrismCriterion
Inherited from GridInferrerCriterion.constructor
Defined in src/modules/kyub.core.boxel/src/GridInferring/GridInferrerCriterion.ts:10
Returns: PrismCriterion
Methods
Private _determinePrismHeight
▸ _determinePrismHeight(baseSurface: MeshSurface, oppositeSurface: MeshSurface): number
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:111
Parameters:
| Name | Type |
|---|---|
baseSurface |
MeshSurface |
oppositeSurface |
MeshSurface |
Returns: number
Private _findPrisms
▸ _findPrisms(startSurface: MeshSurface): IPrism[]
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:39
Parameters:
| Name | Type |
|---|---|
startSurface |
MeshSurface |
Returns: IPrism[]
Private _getCommonNeighbors
▸ _getCommonNeighbors(surfaceA: any, surfaceB: any): MeshSurface[]
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:82
Parameters:
| Name | Type |
|---|---|
surfaceA |
any |
surfaceB |
any |
Returns: MeshSurface[]
Private _getPrismValue
▸ _getPrismValue(prism: IPrism): number
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:88
Parameters:
| Name | Type |
|---|---|
prism |
IPrism |
Returns: number
Private _maintainsPrismProperty
▸ _maintainsPrismProperty(basePrism: IPrism, candidatePrism: IPrism, context: AlignmentContext): boolean
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:92
Parameters:
| Name | Type |
|---|---|
basePrism |
IPrism |
candidatePrism |
IPrism |
context |
AlignmentContext |
Returns: boolean
Private _planesEqual
▸ _planesEqual(planeA: Plane, planeB: Plane): boolean
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:105
Parameters:
| Name | Type |
|---|---|
planeA |
Plane |
planeB |
Plane |
Returns: boolean
score
▸ score(context: AlignmentContext): number
Overrides GridInferrerCriterion.score
Defined in src/modules/kyub.core.boxel/src/GridInferring/PrismCriterion.ts:22
Parameters:
| Name | Type |
|---|---|
context |
AlignmentContext |
Returns: number