[mxcad_2d API documentation] (../README. md)/[2d] (../modules/2d. md)/McObject TempDraw
Class: McObjectTempDraw
2d.McObjectTempDraw
McObject TempDraw is used to draw some graphics on temporary graphics without adding objects to the graphics database.
Table of contents
Constructors
Methods
- addLines
- addTriangles
- clear
- clearAll
- clearMcDbEntitysDisplay
- disableDepthTestMcDbEntitysDisplay
- freeMcDbEntitysDisplay
- readyMcDbEntitysWorldDraw
- setDrawColor
- setDrawOrder
- worldDrawMcDbEntitys
Constructors
constructor
• new McObjectTempDraw(imp)
constructor
Parameters
| Name | Type | Description |
|---|---|---|
| Imp | any | Object Implementation |
Example
Methods
addLines
▸ addLines(vecLinePoints): void
Add temporary drawing line data
Parameters
| Name | Type |
|---|---|
vecLinePoints | McGePoint3dArray |
Returns
void
Example
addTriangles
▸ addTriangles(vecTrianglesPoints): void
Add temporary drawing to fill triangle data
Parameters
| Name | Type |
|---|---|
vecTrianglesPoints | McGePoint3dArray |
Returns
void
Example
clear
▸ clear(): void
Clear temporary drawing data
Returns
void
Example
clearAll
▸ clearAll(): void
Clear all
Returns
void
Example
clearMcDbEntitysDisplay
▸ clearMcDbEntitysDisplay(): void
Clear temporary data drawn by McDbEntities
Returns
void
Example
disableDepthTestMcDbEntitysDisplay
▸ disableDepthTestMcDbEntitysDisplay(isDisable?): void
Disable temporary rendering of McDbEntities in OpenGL DepthTest
Parameters
| Name | Type | Default value |
|---|---|---|
isDisable | boolean | true |
Returns
void
Example
freeMcDbEntitysDisplay
▸ freeMcDbEntitysDisplay(): void
Release the temporary drawing context for McDbEntities.
Returns
void
Example
readyMcDbEntitysWorldDraw
▸ readyMcDbEntitysWorldDraw(): void
Prepare temporary drawing context for McDbEntities.
Returns
void
Example
setDrawColor
▸ setDrawColor(color): void
Set Draw color
Parameters
| Name | Type |
|---|---|
color | number |
Returns
void
Example
setDrawOrder
▸ setDrawOrder(iDrawOrder, iMcDbEntityDrawOrder): void
Set display order
Parameters
| Name | Type |
|---|---|
iDrawOrder | number |
iMcDbEntityDrawOrder | number |
Returns
void
Example
worldDrawMcDbEntitys
▸ worldDrawMcDbEntitys(ent): boolean
Generate temporary drawn data for McDbEntities
Parameters
| Name | Type |
|---|---|
ent | McDbEntity |
Returns
boolean
Example
