3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HyperBezier Class Reference

HyperBezier intended to snap to complex surface. More...

#include <HyperBezier.h>

Public Member Functions

void SimplePrepare ()
 A sampling down version for realtime, working very good. More...
 
Vector3D GetFastSmoothedPosition (Vector3D pos, Vector3D *Nrm=NULL)
 Use after SimplePrepare() More...
 

Detailed Description

HyperBezier intended to snap to complex surface.

Let you have set of points and normals on input. You need to snap point to the surface that intesects all points and is orthogonal to each normal in that points. The general princuple

\[ P_{snapped} = \sum_{all nodes} \frac{\overrightarrow{P_i}}{ \| pos-Node_i \| ^4} \]

where pos is snapped point position, Node[i] is node position, P[i] is pos projected to some surface that crosses the node point. The different approaches use different types of surfaces to snap point. The main property of such surface is that it crosses all nodes points and overall surface is orthogonal to normals in nodes.

Usage:
Simple scenario:
In this case point will be snapped to each plane that intersects point.

1) Use AddNode to add points to HyperBezier
2) Use GetFastSmoothedPosition to snap any point to the interpolated surface.
Second scenario:
Each node has attached 2-nd order surface, the point in space will be snapped to 2-nd order surface then all coordinates will be mixed. It gives more accurate surface han simple scenario. Coefficients for 2-nd order surfaces will be chosen using least-squares method using all noodes coordinates
1) Use AddNode to add points to HyperBezier.
2) Use SimplePrepare() to initialize.
3) Use GetSmoothedPosition to snap. Set "uniform" true or false for beter result in your case.
Third scenario:
Each node has attached 2-nd order surface, the point in space will be snapped to 2-nd order surface then all coordinates will be mixed. Difference with the previous method is possibility to create 2-nd order surface more precisely. Coefficients for 2-nd order surfaces will be chosen using least-squares method using subnodes for each point. Additionally you may add ref points taht will be used for each node.
1) Use AddNode to add points to HyperBezier, it returns node index.
2) Use AddSubpoint to add points no specific node. Points will be used for best fitting of 2-nd order surface of this node
3) Use refs.Add(point) to add reference points that will be used for best fitting of all nodes surfaces
4) Call PrepareNodes
5) Use GetSmoothedPosition to snap points

Member Function Documentation

Vector3D HyperBezier::GetFastSmoothedPosition ( Vector3D  pos,
Vector3D Nrm = NULL 
)

Use after SimplePrepare()

void HyperBezier::SimplePrepare ( )

A sampling down version for realtime, working very good.


The documentation for this class was generated from the following files: