#include <opennurbs_subd.h>
◆ ON_SubDVertexSharpnessCalculator() [1/4]
ON_SubDVertexSharpnessCalculator::ON_SubDVertexSharpnessCalculator |
( |
| ) |
|
|
default |
◆ ~ON_SubDVertexSharpnessCalculator()
ON_SubDVertexSharpnessCalculator::~ON_SubDVertexSharpnessCalculator |
( |
| ) |
|
|
default |
◆ ON_SubDVertexSharpnessCalculator() [2/4]
◆ ON_SubDVertexSharpnessCalculator() [3/4]
ON_SubDVertexSharpnessCalculator::ON_SubDVertexSharpnessCalculator |
( |
const ON_SubDVertex * |
vertex | ) |
|
This constructor completely initializes the class and you may immediately call VertexSharpness() and VertexSharpPoint().
- Parameters
-
vertex | Vertex where sharpness information is desired. |
◆ ON_SubDVertexSharpnessCalculator() [4/4]
ON_SubDVertexSharpnessCalculator::ON_SubDVertexSharpnessCalculator |
( |
ON_SubDVertexTag |
vertex_tag, |
|
|
ON_3dPoint |
vertex_control_net_point, |
|
|
double |
maximum_sharpness_at_interior_crease_vertex |
|
) |
| |
This constructor begins the initialization of the class. You must call AddEdgeSharpnessAndControlNetPoint() or AddCreaseEdgeControlNetPoint() for each edge attached to the vertex. This technique is useful when iteratove subdivision calculations are being performed an no explicit ON_SubDVertex exists.
- Parameters
-
vertex_tag | |
vertex_control_net_point | |
maximum_sharpness_at_interior_crease_vertex | If the vertex_tag parameter is ON_SubDVertexTag::Crease and the vertex is an interior crease (two crease sectors),
then maximum_sharpness_at_interior_crease_vertex should be the maximum value of the edge sharpnesses of all non-crease edges at this vertex. In all other cases pass 0.0. When vertex_tag is not ON_SubDVertexTag::Crease, this parameter is always ignored. |
◆ AddCreaseEdgeControlNetPoint()
bool ON_SubDVertexSharpnessCalculator::AddCreaseEdgeControlNetPoint |
( |
ON_3dPoint |
other_end_control_net_point | ) |
|
You may call this function if the edge in question is a crease edge attached to the vertex.
- Parameters
-
other_end_control_net_point | The control net point at edge's other vertex. |
◆ AddEdgeSharpnessAndControlNetPoint()
bool ON_SubDVertexSharpnessCalculator::AddEdgeSharpnessAndControlNetPoint |
( |
double |
sharpness_at_vertex, |
|
|
ON_3dPoint |
other_end_control_net_point |
|
) |
| |
If this class was created using the constructor that has a vertex tag and that tag was ON_SubDVertexTag::Smooth or ON_SubDVertexTag::Dart, or ON_SubDVertexTag::Crease, then you you must call this function for every sharp edge connected to the vertex.
- Parameters
-
sharpness_at_vertex | If the associated edge is a crease, then pass ON_SubDEdgeSharpness::CreaseValue (or call AddCreaseEdge(other_end)). If the associated edge is smooth, then pass the edge sharpness at the the end connect to the vertex in question. |
other_end_control_net_point | The control net point at edge's other vertex. |
- Returns
- True if successful. False otherwise.
◆ CreaseEdgeCount()
unsigned ON_SubDVertexSharpnessCalculator::CreaseEdgeCount |
( |
| ) |
const |
- Returns
- Number of crease edges attached to the vertex.
◆ EdgeCount()
unsigned ON_SubDVertexSharpnessCalculator::EdgeCount |
( |
| ) |
const |
- Returns
- Number of edges attached to the vertex.
◆ IsSharpVertex()
bool ON_SubDVertexSharpnessCalculator::IsSharpVertex |
( |
| ) |
const |
- Returns
- True if the vertex has nonzero sharpness.
◆ operator=()
◆ SetVertex() [1/2]
bool ON_SubDVertexSharpnessCalculator::SetVertex |
( |
const ON_SubDVertex * |
vertex | ) |
|
◆ SetVertex() [2/2]
bool ON_SubDVertexSharpnessCalculator::SetVertex |
( |
ON_SubDVertexTag |
vertex_tag, |
|
|
ON_3dPoint |
vertex_control_net_point, |
|
|
double |
maximum_sharpness_at_interior_crease_vertex |
|
) |
| |
This constructor begins the initialization of the class. You must call AddEdgeSharpnessAndControlNetPoint() or AddCreaseEdgeControlNetPoint() for each edge attached to the vertex. This technique is useful when iteratove subdivision calculations are being performed an no explicit ON_SubDVertex exists.
- Parameters
-
vertex_tag | |
vertex_control_net_point | |
maximum_sharpness_at_interior_crease_vertex | If the vertex_tag parameter is ON_SubDVertexTag::Crease and the vertex is an interior crease (two crease sectors),
then maximum_sharpness_at_interior_crease_vertex should be the maximum value of the edge sharpnesses of all non-crease edges at this vertex. In all other cases pass 0.0. When vertex_tag is not ON_SubDVertexTag::Crease, this parameter is always ignored. |
- Returns
- True if successful. False otherwise.
◆ SharpEdgeCount()
unsigned ON_SubDVertexSharpnessCalculator::SharpEdgeCount |
( |
| ) |
const |
- Returns
- Number of sharp edges attached to the vertex.
◆ VertexControlNetPoint()
const ON_3dPoint ON_SubDVertexSharpnessCalculator::VertexControlNetPoint |
( |
| ) |
const |
- Returns
- If the vertex has been set, the vertex's control net point is returned. Otherwise, ON_3dPoint::NanPoint is returned.
◆ VertexIsSet()
bool ON_SubDVertexSharpnessCalculator::VertexIsSet |
( |
| ) |
const |
- Returns
- If the vertex has been set, true is returned. Otherwise, false is returned.
◆ VertexSharpness()
double ON_SubDVertexSharpnessCalculator::VertexSharpness |
( |
| ) |
const |
When the vertex sharpness is > 0, the vertex subdivision point is a blend of this->VertexSharpPoint() and the Catmull-Clark subdivision point calculated as if there were no sharpness.
- Returns
- The vertex sharpness.
◆ VertexSharpPoint()
const ON_3dPoint ON_SubDVertexSharpnessCalculator::VertexSharpPoint |
( |
| ) |
const |
- Returns
- If this->VertexSharpness() > 0, then this point must be blended with the Catmull-Clark subdivision point calculated as if there were no sharpness. Otherwise, 0 is returned.
◆ VertexTag()
◆ m_max_edge_sharpness_at_vertex
double ON_SubDVertexSharpnessCalculator::m_max_edge_sharpness_at_vertex = 0.0 |
◆ m_vertex_sharpness
double ON_SubDVertexSharpnessCalculator::m_vertex_sharpness |
◆ Unset