KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > Viewing Interfaces > ILookEx
ILookEx Interface

ILookEx Interface

ScreenTo3D
ProjectToScreen
ScreenTo3DEx

This interface allows mapping between the screen coordinates and 3D global coordinates of the correspondent point on the Viewing Plane

ILookEx can be queried from the correspondent IView interface. Note that this is a Pro level interface, which is not available in the standard KernelCAD or KernelCAD .NET.

See also Interface List


HRESULT ScreenTo3D( int xWnd, int yWnd, DIPoint *pPt )

Parameters

xWnd, yWnd- [in] - coordinates of the point in pixels relative to the upper left corner of the display window.

pPt - [out] - Correspondent 3D point on the Viewing Plane. Coordinates of pPt are relative the global frame.

Returns

S_OK in case of success.
Remarks:

This method allows mapping between the screen coordinates and 3D global coordinates of the correspondent point on the Viewing Plane. Coordinates of pPt are relative to the global frame. Normally xWnd, yWnd are coordinates of a point in pixels, which are supplied in a handler for a windows mouse action message like mouse down, mouse move, or mouse up messages.


HRESULT ProjectToScreen( DIPoint pt, int *pxWnd, int *pyWnd)

Parameters

pt - [in] 3D point in global coordinates.

pxWnd, pyWnd - [out] - mapped window coordinates in pixels of projection of pt to the Viewing Plane.

Return Values

S_OK in case of success.
Remarks:

For any 3D point pt in space the method will find projection if pt to the Viewing Plane and will return windows coordinates of its mapping to the computer screen.


HRESULT ScreenTo3DEx( int xWnd, int yWnd, double dist, DIPoint *pPt )

Parameters

xWnd, yWnd- [in] - coordinates of the point in pixels relative to the upper left corner of the display window.

pPt - [out] - Correspondent 3D point. Coordinates of pPt are relative the global frame.

dist - [in] Required distance from the Viewing Plane.

Returns

S_OK in case of success.
Remarks:

This method calculates point in 3D space, which is translation of point identical to one returned by ScreenTo3D above by dist along positive direction of normal to the Viewing Plane, which can be called line of view. There is no need to call ScreenTo3D prior this method. Call to this method with dist = 0.0 will return the same point as ScreenTo3D.