CurrentPointofgcaBB

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 5.0, Creation date: 2020-09-19, Last change: 2025-09-14

returns for a given coordinate and the current camera position the CurrentPoint result of a virtual mouse click

Description

get(gca,'CurrentPoint') returns in fact the start point and the end point of a beam from the camera position along the mouse postion crossing the bounding box of the axis. In case that a 3D point is known in the scene, sometimes we need the result similar to get(gca,'CurrentPoint') despite that not the cross hair but a given 3D point defines the point of interest.
This function CurrentPointofgcaBB emulates for a known Point in 3D coordinate the same concept and returns for a given point the netry point and the exit point of a beam from the camera through the figevn point crossing the bounding box of gca.
It is used for a modification of select3D

See Also: select3D

Example Illustration

 missing image of CurrentPointofgcaBB(p)

Syntax

pc=CurrentPointofgcaBB(p)

Input Parameter

p: point in 3D that is inspected from the current camera position

Output Parameter

pc: [cp1; cp2] entry point of BB and exit point of bb from camera beam through p

Examples


SGcolorsample; % now rotate the boxes for testing
CurrentPoint([250 0 0]) %




Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21