Skip to content

Commit

Permalink
Add lines and points support to PerformanceModel #569
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Feb 17, 2021
1 parent 7e85712 commit fdf4d04
Show file tree
Hide file tree
Showing 34 changed files with 282 additions and 794 deletions.
32 changes: 16 additions & 16 deletions src/viewer/scene/PerformanceModel/PerformanceModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2307,74 +2307,74 @@ class PerformanceModel extends Component {
}

/** @private */
drawXRayedSilhouette(frameCtx) {
drawSilhouetteXRayed(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawXRayedSilhouette(frameCtx);
this._layerList[layerIndex].drawSilhouetteXRayed(frameCtx);
}
}

/** @private */
drawHighlightedSilhouette(frameCtx) {
drawSilhouetteHighlighted(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawHighlightedSilhouette(frameCtx);
this._layerList[layerIndex].drawSilhouetteHighlighted(frameCtx);
}
}

/** @private */
drawSelectedSilhouette(frameCtx) {
drawSilhouetteSelected(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawSelectedSilhouette(frameCtx);
this._layerList[layerIndex].drawSilhouetteSelected(frameCtx);
}
}

/** @private */
drawEdgesOpaque(frameCtx) {
drawEdgesColorOpaque(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawEdgesOpaque(frameCtx);
this._layerList[layerIndex].drawEdgesColorOpaque(frameCtx);
}
}

/** @private */
drawEdgesTransparent(frameCtx) {
drawEdgesColorTransparent(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawEdgesTransparent(frameCtx);
this._layerList[layerIndex].drawEdgesColorTransparent(frameCtx);
}
}

/** @private */
drawXRayedEdges(frameCtx) {
drawEdgesXRayed(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawXRayedEdges(frameCtx);
this._layerList[layerIndex].drawEdgesXRayed(frameCtx);
}
}

/** @private */
drawHighlightedEdges(frameCtx) {
drawEdgesHighlighted(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawHighlightedEdges(frameCtx);
this._layerList[layerIndex].drawEdgesHighlighted(frameCtx);
}
}

/** @private */
drawSelectedEdges(frameCtx) {
drawEdgesSelected(frameCtx) {
const renderFlags = this.renderFlags;
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this._layerList[layerIndex].drawSelectedEdges(frameCtx);
this._layerList[layerIndex].drawEdgesSelected(frameCtx);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/viewer/scene/PerformanceModel/lib/RENDER_PASSES.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const RENDER_PASSES = {

// Skipped
// Skipped - suppress rendering

NOT_RENDERED: 0,

Expand All @@ -12,16 +12,16 @@ const RENDER_PASSES = {
COLOR_OPAQUE: 1,
COLOR_TRANSPARENT: 2,

// Emphasis rendering - mutually exclusive modes
// Emphasis silhouette rendering - mutually exclusive modes

SILHOUETTE_HIGHLIGHTED: 3,
SILHOUETTE_SELECTED: 4,
SILHOUETTE_XRAYED: 5,

// Edges rendering - mutually exclusive modes

EDGES_OPAQUE: 6,
EDGES_TRANSPARENT: 7,
EDGES_COLOR_OPAQUE: 6,
EDGES_COLOR_TRANSPARENT: 7,
EDGES_HIGHLIGHTED: 8,
EDGES_SELECTED: 9,
EDGES_XRAYED: 10,
Expand Down
Loading

0 comments on commit fdf4d04

Please sign in to comment.