[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 function
Example
Parameters
| Name | Type | Description |
|---|---|---|
| Imp | any | Object Implementation |
Methods
addLines
▸ addLines(vecLinePoints): void
Add temporary drawing line data
Example
Parameters
| Name | Type |
|---|---|
vecLinePoints | McGePoint3dArray |
Returns
void
addTriangles
▸ addTriangles(vecTrianglesPoints): void
Add temporary drawing to fill triangle data
Example
Parameters
| Name | Type |
|---|---|
vecTrianglesPoints | McGePoint3dArray |
Returns
void
clear
▸ clear(): void
Clear temporary drawing data
Example
Returns
void
clearAll
▸ clearAll(): void
Clear all
Example
Returns
void
clearMcDbEntitysDisplay
▸ clearMcDbEntitysDisplay(): void
Clear temporary data drawn by McDbEntities
Example
Returns
void
disableDepthTestMcDbEntitysDisplay
▸ disableDepthTestMcDbEntitysDisplay(isDisable?): void
Disable temporary rendering of McDbEntities in OpenGL DepthTest
Example
Parameters
| Name | Type | Default value |
|---|---|---|
isDisable | boolean | true |
Returns
void
freeMcDbEntitysDisplay
▸ freeMcDbEntitysDisplay(): void
Release the temporary drawing context for McDbEntities.
Example
Returns
void
readyMcDbEntitysWorldDraw
▸ readyMcDbEntitysWorldDraw(): void
Prepare temporary drawing context for McDbEntities.
Example
Returns
void
setDrawColor
▸ setDrawColor(color): void
Set Draw color
Example
Parameters
| Name | Type |
|---|---|
color | number |
Returns
void
setDrawOrder
▸ setDrawOrder(iDrawOrder, iMcDbEntityDrawOrder): void
Set display order
Example
Parameters
| Name | Type |
|---|---|
iDrawOrder | number |
iMcDbEntityDrawOrder | number |
Returns
void
worldDrawMcDbEntitys
▸ worldDrawMcDbEntitys(ent): boolean
Generate temporary drawn data for McDbEntities
Example
Parameters
| Name | Type |
|---|---|
ent | McDbEntity |
Returns
boolean
