Appearance
copper3d / Modules / Scene/commonSceneMethod / commonScene
Class: commonScene
Scene/commonSceneMethod.commonScene
Hierarchy
commonScene
Table of contents
Constructors
Properties
- camera
- container
- controls
- copperOrthographicCamera
- copperPerspectiveCamera
- depthStep
- pickableObjects
- preRenderCallbackFunctions
- renderNrrdVolume
- scene
- sort
- subCamera
- subCopperControl
- subDiv
- subRender
- subScene
Methods
- addObject
- addPreRenderCallbackFunction
- addSubView
- createDemoMesh
- loadDicom
- loadNrrd
- loadNrrdTexture3d
- loadOBJ
- pickModel
- pickSpecifiedModel
- removePreRenderCallbackFunction
- setDepth
- setDicomFilesOrder
- updateControls
Constructors
constructor
• new commonScene(container
, opt?
)
Parameters
Name | Type |
---|---|
container | HTMLDivElement |
opt? | ICopperSceneOpts |
Defined in
src/Scene/commonSceneMethod.ts:48
Properties
camera
• camera: PerspectiveCamera
| OrthographicCamera
Defined in
src/Scene/commonSceneMethod.ts:29
container
• container: HTMLDivElement
Defined in
src/Scene/commonSceneMethod.ts:27
controls
• controls: Copper3dTrackballControls
| OrbitControls
| TrackballControls
Defined in
src/Scene/commonSceneMethod.ts:37
copperOrthographicCamera
• copperOrthographicCamera: OrthographicCamera
Defined in
src/Scene/commonSceneMethod.ts:32
copperPerspectiveCamera
• copperPerspectiveCamera: PerspectiveCamera
Defined in
src/Scene/commonSceneMethod.ts:31
depthStep
• Protected
depthStep: number
= 0.4
Defined in
src/Scene/commonSceneMethod.ts:44
pickableObjects
• Protected
pickableObjects: Mesh
<BufferGeometry
<NormalBufferAttributes
>, Material
| Material
[], Object3DEventMap
>[] = []
Defined in
src/Scene/commonSceneMethod.ts:46
preRenderCallbackFunctions
• Protected
preRenderCallbackFunctions: preRenderCallbackFunctionType
Defined in
src/Scene/commonSceneMethod.ts:42
renderNrrdVolume
• Protected
renderNrrdVolume: boolean
= false
Defined in
src/Scene/commonSceneMethod.ts:40
scene
• scene: Scene
Defined in
src/Scene/commonSceneMethod.ts:28
sort
• Protected
sort: boolean
= true
Defined in
src/Scene/commonSceneMethod.ts:43
subCamera
• subCamera: null
| PerspectiveCamera
= null
Defined in
src/Scene/commonSceneMethod.ts:36
subCopperControl
• Protected
subCopperControl: null
| Controls
= null
Defined in
src/Scene/commonSceneMethod.ts:39
subDiv
• subDiv: null
| HTMLDivElement
= null
Defined in
src/Scene/commonSceneMethod.ts:34
subRender
• Protected
subRender: null
| WebGLRenderer
= null
Defined in
src/Scene/commonSceneMethod.ts:38
subScene
• subScene: Scene
Defined in
src/Scene/commonSceneMethod.ts:35
Methods
addObject
▸ addObject(obj
): void
Parameters
Name | Type |
---|---|
obj | any |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:107
addPreRenderCallbackFunction
▸ addPreRenderCallbackFunction(callbackFunction
): number
Parameters
Name | Type |
---|---|
callbackFunction | Function |
Returns
number
Defined in
src/Scene/commonSceneMethod.ts:122
addSubView
▸ addSubView(): HTMLDivElement
create a new sub view to display models
Returns
HTMLDivElement
Defined in
src/Scene/commonSceneMethod.ts:174
createDemoMesh
▸ createDemoMesh(): void
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:96
loadDicom
▸ loadDicom(urls
, opts?
): void
Parameters
Name | Type |
---|---|
urls | string | string [] |
opts? | dicomLoaderOptsType |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:198
loadNrrd
▸ loadNrrd(url
, loadingBar
, segmentation
, callback?
, opts?
): void
Parameters
Name | Type |
---|---|
url | string |
loadingBar | loadingBarType |
segmentation | boolean |
callback? | (volume : any , nrrdMeshes : nrrdMeshesType , nrrdSlices : nrrdSliceType , gui? : GUI ) => void |
opts? | optsType |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:314
loadNrrdTexture3d
▸ loadNrrdTexture3d(url
, callback?
): void
Parameters
Name | Type |
---|---|
url | string |
callback? | (volume : any , gui? : GUI ) => void |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:338
loadOBJ
▸ loadOBJ(url
, callback?
, opts?
): void
Parameters
Name | Type |
---|---|
url | string |
callback? | (mesh : Group <Object3DEventMap >) => void |
opts? | Object |
opts.color | string |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:350
pickModel
▸ pickModel(content
, callback
, options?
): void
Parameters
Name | Type |
---|---|
content | Group <Object3DEventMap > |
callback | (selectMesh : undefined | Mesh <BufferGeometry <NormalBufferAttributes >, Material | Material [], Object3DEventMap >) => void |
options? | string [] |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:132
pickSpecifiedModel
▸ pickSpecifiedModel(content
, mousePosition
): Object
Parameters
Name | Type |
---|---|
content | Mesh <BufferGeometry <NormalBufferAttributes >, Material | Material [], Object3DEventMap > | Mesh <BufferGeometry <NormalBufferAttributes >, Material | Material [], Object3DEventMap >[] |
mousePosition | mouseMovePositionType |
Returns
Object
Name | Type |
---|---|
intersectedObject | null | Object3D <Object3DEventMap > |
intersects | Intersection <Object3D <Object3DEventMap >>[] |
Defined in
src/Scene/commonSceneMethod.ts:154
removePreRenderCallbackFunction
▸ removePreRenderCallbackFunction(id
): void
Parameters
Name | Type |
---|---|
id | number |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:128
setDepth
▸ setDepth(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:111
setDicomFilesOrder
▸ setDicomFilesOrder(value
): void
Parameters
Name | Type |
---|---|
value | "ascending" | "descending" |
Returns
void
Defined in
src/Scene/commonSceneMethod.ts:114
updateControls
▸ updateControls(camera
): void
Parameters
Name | Type |
---|---|
camera | PerspectiveCamera | OrthographicCamera |
Returns
void