editor › Globals › CellMembraneJointRenderer
Class: CellMembraneJointRenderer
Renders CellMembraneJoints. Is set by the CellDescriptorRealizer.
Hierarchy
↳ CellMembraneJointRenderer
Index
Constructors
Properties
Methods
- calculateFlexShapeChanges
- calculateShapeChanges
- _buildMiddlePadding
- _buildPlatesContext
- _buildRoundRectangle
- _buildShapeFromFingersForTop
- _calculateTeeShapeChanges
- _getEdgeRadius
- _getSectionRotation
- _groupShapeChanges
- _transformShapes
- _ungroupShapeChanges
- canRender
Constructors
constructor
+ new CellMembraneJointRenderer(jointInstance: CellMembraneJoint): CellMembraneJointRenderer
Inherited from JointRenderer.constructor
Defined in src/model/visualization/Joints/Renderer/JointRenderer.ts:33
Parameters:
| Name | Type |
|---|---|
jointInstance |
CellMembraneJoint |
Returns: CellMembraneJointRenderer
Properties
Protected Readonly jointInstance
• jointInstance: CellMembraneJoint
Inherited from JointRenderer.jointInstance
Defined in src/model/visualization/Joints/Renderer/JointRenderer.ts:35
Methods
calculateFlexShapeChanges
▸ calculateFlexShapeChanges(plate: Plate, config: PlatePipelineConfig, rasterizedOutlines: RasterizedOutline[], plateMatrix: Matrix4): IFlexShapeChanges
Inherited from JointRenderer.calculateFlexShapeChanges
Defined in src/model/visualization/Joints/Renderer/JointRenderer.ts:46
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
config |
PlatePipelineConfig |
rasterizedOutlines |
RasterizedOutline[] |
plateMatrix |
Matrix4 |
Returns: IFlexShapeChanges
calculateShapeChanges
▸ calculateShapeChanges(physicalObject: PhysicalObject, options: Options, rasterizedOutlines: RasterizedOutline[]): IShapeChanges
Overrides JointRenderer.calculateShapeChanges
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:222
Calculates the shapes for both top plates and membrane plate.
Parameters:
| Name | Type |
|---|---|
physicalObject |
PhysicalObject |
options |
Options |
rasterizedOutlines |
RasterizedOutline[] |
Returns: IShapeChanges
Static Private _buildMiddlePadding
▸ _buildMiddlePadding(joint: CellMembraneJoint, first: number, last: number, options: Options): object
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:153
The middle section has TeeJoints for each CellFinger. Since the CellFingers don't cover the whole middle sections, there are parts at the start and end that are empty. Because TeeJoints subtract from the material the empty parts would be longer which makes it unbuildable. To fix this we subtract material (padding) from start and end.
Parameters:
| Name | Type |
|---|---|
joint |
CellMembraneJoint |
first |
number |
last |
number |
options |
Options |
Returns: object
-
firstShape: Polygon
-
lastShape: Polygon
Static Private _buildPlatesContext
▸ _buildPlatesContext(isMiddle: boolean, middle: Plate, topPlate: Plate, start: Vector3, end: Vector3): JoinedPlatesContext
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:82
Parameters:
| Name | Type | Default |
|---|---|---|
isMiddle |
boolean | - |
middle |
Plate | - |
topPlate |
Plate | - |
start |
Vector3 | new Vector3() |
end |
Vector3 | new Vector3() |
Returns: JoinedPlatesContext
Static Private _buildRoundRectangle
▸ _buildRoundRectangle(shape: IShapeChangeInfo): Polygon
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:72
Parameters:
| Name | Type |
|---|---|
shape |
IShapeChangeInfo |
Returns: Polygon
Static Private _buildShapeFromFingersForTop
▸ _buildShapeFromFingersForTop(joint: CellMembraneJoint, fingers: IShapeChangeInfo[], options: Options): ShapeChange[]
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:47
Builds a Round Rectangle and Tee-Cutouts for each given Finger. The output Shapes are placed on the x-axis from (0, 0) to (joint.length, 0)
Parameters:
| Name | Type | Description |
|---|---|---|
joint |
CellMembraneJoint | The CellMembraneJoint to render |
fingers |
IShapeChangeInfo[] | Fingers that will be rendered into Shapes. Actual Fingers become Additions, else they will become Cutouts. |
options |
Options | Contains FabricationConfig for building Tee-Cutouts |
Returns: ShapeChange[]
Static Private _calculateTeeShapeChanges
▸ _calculateTeeShapeChanges(joint: CellMembraneJoint, shapes: IShapeChangeInfo[], options: Options, isMiddle: boolean): ShapeChange[]
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:94
Parameters:
| Name | Type |
|---|---|
joint |
CellMembraneJoint |
shapes |
IShapeChangeInfo[] |
options |
Options |
isMiddle |
boolean |
Returns: ShapeChange[]
Static Private _getEdgeRadius
▸ _getEdgeRadius(): number
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:34
Returns: number
Static Private _getSectionRotation
▸ _getSectionRotation(section: OutlineSection, mirrored: boolean): Quaternion
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:198
Parameters:
| Name | Type | Default |
|---|---|---|
section |
OutlineSection | - |
mirrored |
boolean | false |
Returns: Quaternion
Static Private _groupShapeChanges
▸ _groupShapeChanges(shapes: ShapeChange[]): IShapeChanges
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:207
Parameters:
| Name | Type |
|---|---|
shapes |
ShapeChange[] |
Returns: IShapeChanges
Static Private _transformShapes
▸ _transformShapes(section: OutlineSection, shapes: ShapeChange[]): ShapeChange[]
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:61
Parameters:
| Name | Type |
|---|---|
section |
OutlineSection |
shapes |
ShapeChange[] |
Returns: ShapeChange[]
Static Private _ungroupShapeChanges
▸ _ungroupShapeChanges(shapes: IShapeChanges): ShapeChange[]
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:215
Parameters:
| Name | Type |
|---|---|
shapes |
IShapeChanges |
Returns: ShapeChange[]
Static canRender
▸ canRender(joint: any): boolean
Overrides JointRenderer.canRender
Defined in src/model/visualization/Joints/Renderer/CellMembraneJointRenderer.ts:30
Parameters:
| Name | Type |
|---|---|
joint |
any |
Returns: boolean