本文整理汇总了TypeScript中THREE.Box3.equals方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Box3.equals方法的具体用法?TypeScript Box3.equals怎么用?TypeScript Box3.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类THREE.Box3
的用法示例。
在下文中一共展示了Box3.equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: setParameters
/**
* Set representation parameters
* @alias SurfaceRepresentation#setParameters
* @param {SurfaceRepresentationParameters} params - surface parameter object
* @param {Object} [what] - buffer data attributes to be updated,
* note that this needs to be implemented in the
* derived classes. Generally it allows more
* fine-grained control over updating than
* forcing a rebuild.
* @param {Boolean} what.position - update position data
* @param {Boolean} what.color - update color data
* @param {Boolean} [rebuild] - whether or not to rebuild the representation
* @return {SurfaceRepresentation} this object
*/
setParameters (params: Partial<SurfaceRepresentationParameters>, what?: SurfaceDataFields, rebuild?: boolean) {
if (params && params.isolevelType !== undefined &&
this.volume
) {
if (this.isolevelType === 'value' &&
params.isolevelType === 'sigma'
) {
this.isolevel = this.volume.getSigmaForValue(this.isolevel)
} else if (this.isolevelType === 'sigma' &&
params.isolevelType === 'value'
) {
this.isolevel = this.volume.getValueForSigma(this.isolevel)
}
this.isolevelType = params.isolevelType
}
if (params && params.boxCenter) {
this.boxCenter.copy(params.boxCenter)
delete params.boxCenter
}
// Forbid wireframe && contour as in molsurface
if (params && params.wireframe && (
params.contour || (params.contour === undefined && this.contour)
)) {
params.wireframe = false
}
super.setParameters(params, what, rebuild)
if (this.volume) {
this.volume.getBox(this.boxCenter, this.boxSize, this.box)
}
if (params && params.colorVolume !== undefined) {
if (what) what.color = true
}
if (this.surface && (
params.isolevel !== undefined ||
params.negateIsolevel !== undefined ||
params.smooth !== undefined ||
params.wrap !== undefined ||
params.boxSize !== undefined ||
(this.boxSize > 0 &&
!this.__box.equals(this.box))
)) {
this.build({
'position': true,
'color': true,
'index': true,
'normal': !this.contour
})
}
return this
}